Commit 101bda83 authored by Piyush Aggarwal's avatar Piyush Aggarwal 🎮
Browse files

setWindowIcon: add fallback window icons

parent 220317c7
Pipeline #40488 passed with stage
in 9 minutes and 21 seconds
......@@ -9,6 +9,7 @@
#include <QQmlApplicationEngine>
#include <QCommandLineParser>
#include <QQmlContext>
#include <QStandardPaths>
#include <KAboutData>
#include <KLocalizedString>
......@@ -17,7 +18,8 @@
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect")));
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"),
QIcon(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("icons/hicolor/scalable/apps/kdeconnect.svg")))));
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);
......
......@@ -38,7 +38,8 @@ public:
: Daemon(parent)
, m_nam(nullptr)
{
qApp->setWindowIcon(QIcon(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("icons/hicolor/scalable/apps/kdeconnect.svg"))));
qApp->setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"),
QIcon(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("icons/hicolor/scalable/apps/kdeconnect.svg")))));
}
void askPairingConfirmation(Device* device) override
......
......@@ -10,6 +10,7 @@
#include <QTextEdit>
#include <QLineEdit>
#include <QBoxLayout>
#include <QStandardPaths>
#include <KLocalizedString>
......@@ -28,7 +29,8 @@ SendReplyDialog::SendReplyDialog(const QString& originalMessage, const QString&
connect(this, &QDialog::accepted, this, &SendReplyDialog::sendButtonClicked);
setWindowTitle(topicName);
setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect")));
setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"),
QIcon(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("icons/hicolor/scalable/apps/kdeconnect.svg")))));
setAttribute(Qt::WA_DeleteOnClose);
}
......
......@@ -7,6 +7,7 @@
#include <QApplication>
#include <QCommandLineParser>
#include <QStyle>
#include <QStandardPaths>
#include <KCMultiDialog>
#include <KAboutData>
......@@ -17,7 +18,8 @@
int main(int argc, char** argv)
{
QApplication app(argc, argv);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect")));
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"),
QIcon(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("icons/hicolor/scalable/apps/kdeconnect.svg")))));
KAboutData about(QStringLiteral("kdeconnect-settings"),
i18n("KDE Connect Settings"),
QStringLiteral(KDECONNECT_VERSION_STRING),
......
......@@ -26,7 +26,8 @@ int main(int argc, char *argv[])
{
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(argc, argv);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect")));
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"),
QIcon(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("icons/hicolor/scalable/apps/kdeconnect.svg")))));
KAboutData aboutData(QStringLiteral("kdeconnect.sms"),
i18n("KDE Connect SMS"),
QStringLiteral(KDECONNECT_VERSION_STRING),
......
......@@ -31,7 +31,8 @@
int main(int argc, char** argv)
{
QApplication app(argc, argv);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect")));
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"),
QIcon(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("icons/hicolor/scalable/apps/kdeconnect.svg")))));
const QString description = i18n("KDE Connect URL handler");
KAboutData about(QStringLiteral("kdeconnect-urlhandler"),
description,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment