Fix empty menu if program compiled with qt5

Fixed by not adding dummy system tray under X env
Tested for:
Mate 1.22.1
XFCE4 4.12
KDE 5.14.5 (damn it's so ugly now)
GNOME (with topicons-plus extension)

This commit fixes #907, fixes #1097 and fixes #1155
This commit is contained in:
coozoo 2019-05-23 08:34:48 +03:00 committed by happiness
parent 13a321190f
commit 09a7d4db33

View file

@ -585,8 +585,11 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
connect( ui.menuHistory, SIGNAL( aboutToShow() ),
this, SLOT( updateHistoryMenu() ) );
#if !defined( HAVE_X11 ) || QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
// Show tray icon early so the user would be happy. It won't be functional
// though until the program inits fully.
// Do not create dummy tray icon in X. Cause QT5 failed to upgrade systemtray context menu.
// And as result menu for some DEs apppear to be empty, for example in MATE DE.
if ( cfg.preferences.enableTrayIcon )
{
@ -594,6 +597,7 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
trayIcon->setToolTip( tr( "Loading..." ) );
trayIcon->show();
}
#endif
connect( navBack, SIGNAL( triggered() ),
this, SLOT( backClicked() ) );