Show application icon in Plasma Wayland sessions (#3777)

This is required to show the keepassxc icon on Wayland windows in a
Plasma Wayland session.

kwin_wayland fetches application icons from .desktop files and it
expects the desktop filename to be set on the QGuiApplication instance.

Without this, kwin sets a generic Wayland icon as fallback.
This commit is contained in:
Elvis Angelaccio 2019-11-03 12:00:16 +01:00 committed by Janek Bevendorff
parent 38a663163d
commit 1722397040

View File

@ -55,6 +55,10 @@ int main(int argc, char** argv)
#endif
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
QGuiApplication::setDesktopFileName("org.keepassxc.KeePassXC.desktop");
#endif
Application app(argc, argv);
Application::setApplicationName("keepassxc");
Application::setApplicationVersion(KEEPASSXC_VERSION);