Skip to content

Commit

Permalink
fix(app): fix missing app icon on Wayland (#1130)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lightbulbjim authored and trollixx committed Sep 2, 2019
1 parent 419ef8d commit 57908f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Core::Application> app(new Core::Application());
Expand Down

0 comments on commit 57908f9

Please sign in to comment.