File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 31
31
32
32
#include < chrono>
33
33
34
+ #include < QtGlobal>
34
35
#include < QMenu>
35
36
#include < QTimer>
36
37
@@ -300,11 +301,11 @@ QIcon DesktopIntegration::getSystrayIcon() const
300
301
icon = UIThemeManager::instance ()->getIcon (u" qbittorrent-tray-light" _s);
301
302
break ;
302
303
}
303
- #if ((QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && defined( Q_OS_UNIX) && !defined(Q_OS_MACOS))
304
+ #ifdef Q_OS_UNIX
304
305
// Workaround for invisible tray icon in KDE, https://bugreports.qt.io/browse/QTBUG-53550
305
- return {icon.pixmap (32 )};
306
- #else
307
- return icon;
306
+ if (qEnvironmentVariable (" XDG_CURRENT_DESKTOP" ).compare (u" KDE" , Qt::CaseInsensitive) == 0 )
307
+ return icon.pixmap (32 );
308
308
#endif
309
+ return icon;
309
310
}
310
311
#endif // Q_OS_MACOS
You can’t perform that action at this time.
0 commit comments