setWindowIcon: add fallback window icons
This commit is contained in:
parent
220317c778
commit
101bda832d
6 changed files with 15 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue