diff options
author | David Schulz <david.schulz@digia.com> | 2012-11-23 14:27:50 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-25 01:34:07 +0100 |
commit | 4ac521354dfa575c31ecb732a0f8c1e18827c21e (patch) | |
tree | 20833a59d0c291c582332c4cc0f7e724d1c9b996 /examples/widgets/desktop/systray/window.cpp | |
parent | d5ec06be6397b807b743aa46707ff45aa9dccafa (diff) |
QtBase: example code style
Change-Id: I0685f7e2c7c698a4bf288b8b1ae909167932a3fb
Reviewed-by: hjk <qthjk@ovi.com>
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(); |