Commit 646aecc4 authored by Rajdeep Roy Chowdhury's avatar Rajdeep Roy Chowdhury

Pairing Notification is made persistent

parent 82974505
......@@ -59,13 +59,12 @@ public:
void askPairingConfirmation(Device* device) override
{
KNotification* notification = new KNotification(QStringLiteral("pairingRequest"));
KNotification* notification = new KNotification(QStringLiteral("pairingRequest"), KNotification::NotificationFlag::Persistent);
notification->setIconName(QStringLiteral("dialog-information"));
notification->setComponentName(QStringLiteral("kdeconnect"));
notification->setTitle(QStringLiteral("KDE Connect"));
notification->setText(i18n("Pairing request from %1", device->name().toHtmlEscaped()));
notification->setActions(QStringList() << i18n("Accept") << i18n("Reject"));
// notification->setTimeout(PairingHandler::pairingTimeoutMsec());
connect(notification, &KNotification::action1Activated, device, &Device::acceptPairing);
connect(notification, &KNotification::action2Activated, device, &Device::rejectPairing);
notification->sendEvent();
......
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