Hide notification after it's no longer possible to accept pairing

This commit is contained in:
Albert Vaca Cintora 2020-01-05 16:31:06 +01:00
parent 6883d46cb4
commit 02f7e3f16e

View file

@ -60,6 +60,7 @@ public:
void askPairingConfirmation(Device* device) override void askPairingConfirmation(Device* device) override
{ {
KNotification* notification = new KNotification(QStringLiteral("pairingRequest"), KNotification::NotificationFlag::Persistent); KNotification* notification = new KNotification(QStringLiteral("pairingRequest"), KNotification::NotificationFlag::Persistent);
QTimer::singleShot(PairingHandler::pairingTimeoutMsec(), notification, &KNotification::close);
notification->setIconName(QStringLiteral("dialog-information")); notification->setIconName(QStringLiteral("dialog-information"));
notification->setComponentName(QStringLiteral("kdeconnect")); notification->setComponentName(QStringLiteral("kdeconnect"));
notification->setTitle(QStringLiteral("KDE Connect")); notification->setTitle(QStringLiteral("KDE Connect"));