From 1722397040fc1f8adcc8e555fbad1e5057a9ee20 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Sun, 3 Nov 2019 12:00:16 +0100 Subject: [PATCH] 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. --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 91eb1b73e..5aff860e1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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);