aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pyne <[email protected]>2017-10-11 22:25:11 -0400
committerMichael Pyne <[email protected]>2017-10-11 22:25:11 -0400
commitee358b1b8d5a86678decd7cadbb1d390cbce38e5 (patch)
tree2c2e1b861c7c257715d304f829273a8fd6b987b0
parent57be37b33ef15665570b41870572ce1905e8bc1d (diff)
systemtray: Fix crash with scroll-to-next.
And crashes involving other action invocations. We need to guard against KSNI::action everywhere action() is called, not just in the ctor. A good Junior Job might be going through and renaming the JuK-specific ActionCollection and action() functions to something a little less likely to conflict with KDE or Qt namespace.
-rw-r--r--systemtray.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/systemtray.cpp b/systemtray.cpp
index f4f0686..0a66d37 100644
--- a/systemtray.cpp
+++ b/systemtray.cpp
@@ -432,13 +432,13 @@ void SystemTray::createButtonBox(QBoxLayout *parentLayout)
*/
void SystemTray::slotBack()
{
- action("back")->trigger();
+ ActionCollection::action("back")->trigger();
m_fade = false;
}
void SystemTray::slotForward()
{
- action("forward")->trigger();
+ ActionCollection::action("forward")->trigger();
m_fade = false;
}
@@ -512,15 +512,15 @@ void SystemTray::scrollEvent(int delta, Qt::Orientation orientation)
switch(QApplication::keyboardModifiers()) {
case Qt::ShiftModifier:
if(delta > 0)
- action("volumeUp")->trigger();
+ ActionCollection::action("volumeUp")->trigger();
else
- action("volumeDown")->trigger();
+ ActionCollection::action("volumeDown")->trigger();
break;
default:
if(delta > 0)
- action("forward")->trigger();
+ ActionCollection::action("forward")->trigger();
else
- action("back")->trigger();
+ ActionCollection::action("back")->trigger();
break;
}
}