From 57908f9b45529f57f01d6f2bed76fe468eb72b27 Mon Sep 17 00:00:00 2001 From: Chris Rendle-Short Date: Mon, 2 Sep 2019 23:54:57 +1000 Subject: [PATCH] fix(app): fix missing app icon on Wayland (#1130) Wayland uses the .desktop file to find the app icon. Without it being specified the correct icon is not shown. See: https://community.kde.org/Guidelines_and_HOWTOs/Wayland_Porting_Notes#Application_Icon Tested on Gnome/Wayland. --- src/app/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/main.cpp b/src/app/main.cpp index 2574bff24..21444ac3c 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -218,6 +218,10 @@ int main(int argc, char *argv[]) qapp->setWindowIcon(QIcon::fromTheme(QStringLiteral("zeal"), QIcon(QStringLiteral(":/zeal.ico")))); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) + qapp->setDesktopFileName(QStringLiteral("org.zealdocs.Zeal.desktop")); +#endif + QDir::setSearchPaths(QStringLiteral("typeIcon"), {QStringLiteral(":/icons/type")}); QScopedPointer app(new Core::Application());