remove hardcoded window icon path in favour of fromTheme call

This commit is contained in:
Piyush Aggarwal 2021-05-23 10:42:29 +05:30
parent 8a1e75695d
commit d773959a5d
6 changed files with 6 additions and 12 deletions

View file

@ -19,8 +19,7 @@
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
QApplication app(argc, 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")); 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")); aboutData.addAuthor(i18n("Aleix Pol Gonzalez"), i18n("Maintainer"), QStringLiteral("aleixpol@kde.org"));
KAboutData::setApplicationData(aboutData); KAboutData::setApplicationData(aboutData);

View file

@ -38,8 +38,7 @@ public:
: Daemon(parent) : Daemon(parent)
, m_nam(nullptr) , m_nam(nullptr)
{ {
qApp->setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect"), qApp->setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect")));
QIcon(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("icons/hicolor/scalable/apps/kdeconnect.svg")))));
} }
void askPairingConfirmation(Device* device) override void askPairingConfirmation(Device* device) override

View file

@ -29,8 +29,7 @@ SendReplyDialog::SendReplyDialog(const QString& originalMessage, const QString&
connect(this, &QDialog::accepted, this, &SendReplyDialog::sendButtonClicked); connect(this, &QDialog::accepted, this, &SendReplyDialog::sendButtonClicked);
setWindowTitle(topicName); 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); setAttribute(Qt::WA_DeleteOnClose);
m_ui->replyEdit->setFocus(); m_ui->replyEdit->setFocus();
} }

View file

@ -18,8 +18,7 @@
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
QApplication app(argc, 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"), KAboutData about(QStringLiteral("kdeconnect-settings"),
i18n("KDE Connect Settings"), i18n("KDE Connect Settings"),
QStringLiteral(KDECONNECT_VERSION_STRING), QStringLiteral(KDECONNECT_VERSION_STRING),

View file

@ -27,8 +27,7 @@ int main(int argc, char *argv[])
{ {
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(argc, 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.sms"), KAboutData aboutData(QStringLiteral("kdeconnect.sms"),
i18n("KDE Connect SMS"), i18n("KDE Connect SMS"),
QStringLiteral(KDECONNECT_VERSION_STRING), QStringLiteral(KDECONNECT_VERSION_STRING),

View file

@ -31,8 +31,7 @@
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
QApplication app(argc, 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"); const QString description = i18n("KDE Connect URL handler");
KAboutData about(QStringLiteral("kdeconnect-urlhandler"), KAboutData about(QStringLiteral("kdeconnect-urlhandler"),
description, description,