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 <QQmlApplicationEngine>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <QQmlContext>
|
#include <QQmlContext>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#include <KAboutData>
|
#include <KAboutData>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
@ -17,7 +18,8 @@
|
||||||
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);
|
||||||
|
|
|
@ -38,7 +38,8 @@ public:
|
||||||
: Daemon(parent)
|
: Daemon(parent)
|
||||||
, m_nam(nullptr)
|
, 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
|
void askPairingConfirmation(Device* device) override
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
|
||||||
|
@ -28,7 +29,8 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#include <KCMultiDialog>
|
#include <KCMultiDialog>
|
||||||
#include <KAboutData>
|
#include <KAboutData>
|
||||||
|
@ -17,7 +18,8 @@
|
||||||
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),
|
||||||
|
|
|
@ -26,7 +26,8 @@ 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),
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
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,
|
||||||
|
|
Loading…
Reference in a new issue