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.
This commit is contained in:
Chris Rendle-Short 2019-09-02 23:54:57 +10:00 committed by Oleg Shparber
parent 419ef8de85
commit 57908f9b45

View File

@ -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());