diff options
Diffstat (limited to 'examples/widgets/desktop/systray/window.cpp')
-rw-r--r-- | examples/widgets/desktop/systray/window.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/widgets/desktop/systray/window.cpp b/examples/widgets/desktop/systray/window.cpp index af56f47595..8de1f5843e 100644 --- a/examples/widgets/desktop/systray/window.cpp +++ b/examples/widgets/desktop/systray/window.cpp @@ -66,10 +66,8 @@ Window::Window() createTrayIcon(); connect(showMessageButton, SIGNAL(clicked()), this, SLOT(showMessage())); - connect(showIconCheckBox, SIGNAL(toggled(bool)), - trayIcon, SLOT(setVisible(bool))); - connect(iconComboBox, SIGNAL(currentIndexChanged(int)), - this, SLOT(setIcon(int))); + connect(showIconCheckBox, SIGNAL(toggled(bool)), trayIcon, SLOT(setVisible(bool))); + connect(iconComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setIcon(int))); connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(messageClicked())); connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason))); @@ -129,8 +127,7 @@ void Window::iconActivated(QSystemTrayIcon::ActivationReason reason) switch (reason) { case QSystemTrayIcon::Trigger: case QSystemTrayIcon::DoubleClick: - iconComboBox->setCurrentIndex((iconComboBox->currentIndex() + 1) - % iconComboBox->count()); + iconComboBox->setCurrentIndex((iconComboBox->currentIndex() + 1) % iconComboBox->count()); break; case QSystemTrayIcon::MiddleClick: showMessage(); |