From a600c27490186c43ba5b193d0037a6dcd89e89ed Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Sat, 24 Oct 2020 22:21:23 +0200 Subject: [PATCH] Set window icons for GUI executables Otherwise the task bar entry on Gnome won't have an icon. --- app/main.cpp | 2 ++ settings/main.cpp | 1 + smsapp/main.cpp | 1 + urlhandler/kdeconnect-handler.cpp | 1 + 4 files changed, 5 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index 7d6ca0793..15e9f54c0 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -16,6 +17,7 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); + app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"))); KAboutData aboutData(QStringLiteral("kdeconnect.app"), i18n("KDE Connect"), QStringLiteral("1.0"), i18n("KDE Connect"), KAboutLicense::GPL, i18n("(c) 2015, Aleix Pol Gonzalez")); aboutData.addAuthor(i18n("Aleix Pol Gonzalez"), i18n("Maintainer"), QStringLiteral("aleixpol@kde.org")); KAboutData::setApplicationData(aboutData); diff --git a/settings/main.cpp b/settings/main.cpp index 93c0d0291..00b76a2ae 100644 --- a/settings/main.cpp +++ b/settings/main.cpp @@ -17,6 +17,7 @@ int main(int argc, char** argv) { QApplication app(argc, argv); + app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"))); KAboutData about(QStringLiteral("kdeconnect-settings"), i18n("KDE Connect Settings"), QStringLiteral(KDECONNECT_VERSION_STRING), diff --git a/smsapp/main.cpp b/smsapp/main.cpp index 072fe0306..49efc2df0 100644 --- a/smsapp/main.cpp +++ b/smsapp/main.cpp @@ -26,6 +26,7 @@ int main(int argc, char *argv[]) { QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QApplication app(argc, argv); + app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"))); KAboutData aboutData(QStringLiteral("kdeconnect.sms"), i18n("KDE Connect SMS"), QStringLiteral(KDECONNECT_VERSION_STRING), diff --git a/urlhandler/kdeconnect-handler.cpp b/urlhandler/kdeconnect-handler.cpp index 004202ec6..dc234e493 100644 --- a/urlhandler/kdeconnect-handler.cpp +++ b/urlhandler/kdeconnect-handler.cpp @@ -31,6 +31,7 @@ int main(int argc, char** argv) { QApplication app(argc, argv); + app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"))); const QString description = i18n("KDE Connect URL handler"); KAboutData about(QStringLiteral("kdeconnect-urlhandler"), description,