Skip to content

Commit 17741c9

Browse files
committed
removed qApp->processEvents from tray icon
1 parent ee484b7 commit 17741c9

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

apps/cmstapp/code/control_box/controlbox.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,14 +1710,7 @@ void ControlBox::createSystemTrayIcon(bool b_startminimized)
17101710
connect(trayicon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
17111711

17121712
// Assemble the tray icon (set the icon to display)
1713-
assembleTrayIcon();
1714-
1715-
// This code block I found several places on how to work around tray icons
1716-
// not showing properly with GTK based trays. May not be necessary with
1717-
// QT5.4 but leave it in if it does not hurt anything.
1718-
trayicon->setVisible(true);
1719-
trayicon->setVisible(false);
1720-
qApp->processEvents();
1713+
assembleTrayIcon();
17211714

17221715
// QT5.3 and XFCE don't play nicely. Hammer the XFCE tray up to
17231716
// maxtries to get a valid icon geometry.
@@ -1730,6 +1723,7 @@ void ControlBox::createSystemTrayIcon(bool b_startminimized)
17301723
qDebug() << "icon geometry: " << trayicon->geometry();
17311724
if (trayicon->geometry().left() > 0 || trayicon->geometry().top() > 0) break;
17321725
trayicon->setVisible(false);
1726+
qApp->processEvents();
17331727
} // hammer loop
17341728
if (i == maxtries - 1) {
17351729
qDebug() << QString("Failed to get a valid icon from the systemtray in %1 tries").arg(maxtries);

apps/resource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ DEALINGS IN THE SOFTWARE.
3434

3535
///////////////////////////////// Program Values ///////////////////////
3636
// Program Info
37-
#define VERSION "14.12.13-1"
37+
#define VERSION "14.12.13-2"
3838
#define RELEASE_DATE "5 December 2014"
3939
#define COPYRIGHT_DATE "2013-2014"
4040

0 commit comments

Comments
 (0)