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 committed by Nicolas Fella
parent 679622ff55
commit 9e73243612

View file

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