Changeset View
Changeset View
Standalone View
Standalone View
daemon/kdeconnectd.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 52 | // notification->setTimeout(PairingHandler::pairingTimeoutMsec()); | |||
---|---|---|---|---|---|
63 | QNetworkAccessManager* networkAccessManager() override | 63 | QNetworkAccessManager* networkAccessManager() override | ||
64 | { | 64 | { | ||
65 | if (!m_nam) { | 65 | if (!m_nam) { | ||
66 | m_nam = new KIO::AccessManager(this); | 66 | m_nam = new KIO::AccessManager(this); | ||
67 | } | 67 | } | ||
68 | return m_nam; | 68 | return m_nam; | ||
69 | } | 69 | } | ||
70 | 70 | | |||
71 | Q_SCRIPTABLE void sendSimpleNotification(const QString &eventId, const QString &title, const QString &text, const QString &iconName) override | ||||
72 | { | ||||
73 | KNotification* notification = new KNotification(eventId); //KNotification::Persistent | ||||
apol: use qCDebug. | |||||
74 | notification->setIconName(iconName); | ||||
75 | notification->setComponentName(QStringLiteral("kdeconnect")); | ||||
76 | notification->setTitle(title); | ||||
77 | notification->setText(text); | ||||
78 | notification->sendEvent(); | ||||
79 | } | ||||
80 | | ||||
81 | | ||||
71 | private: | 82 | private: | ||
72 | QNetworkAccessManager* m_nam; | 83 | QNetworkAccessManager* m_nam; | ||
73 | }; | 84 | }; | ||
74 | 85 | | |||
75 | int main(int argc, char* argv[]) | 86 | int main(int argc, char* argv[]) | ||
76 | { | 87 | { | ||
77 | QApplication app(argc, argv); | 88 | QApplication app(argc, argv); | ||
78 | app.setApplicationName(QStringLiteral("kdeconnectd")); | 89 | app.setApplicationName(QStringLiteral("kdeconnectd")); | ||
Show All 13 Lines |
use qCDebug.