Pairing Notification is made persistent
This commit is contained in:
parent
82974505ed
commit
646aecc47b
1 changed files with 1 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue