Remove <br> from notification text

The notification spec does not specify that the server must support <br> and thus it can show up literally in the notification. Since we already have a \n we can simply remove it

(cherry picked from commit 5d037396ee)
This commit is contained in:
Nicolas Fella 2021-03-18 22:03:47 +01:00
parent de321bba7f
commit 8129db7112

View file

@ -49,7 +49,7 @@ public:
notification->setIconName(QStringLiteral("dialog-information"));
notification->setComponentName(QStringLiteral("kdeconnect"));
notification->setTitle(QStringLiteral("KDE Connect"));
notification->setText(i18n("Pairing request from %1\n<br/>Key: %2...", device->name().toHtmlEscaped(), QString::fromUtf8(device->verificationKey().left(8))));
notification->setText(i18n("Pairing request from %1\nKey: %2...", device->name().toHtmlEscaped(), QString::fromUtf8(device->verificationKey().left(8))));
notification->setDefaultAction(i18n("Open"));
notification->setActions(QStringList() << i18n("Accept") << i18n("Reject") << i18n("View key"));
connect(notification, &KNotification::action1Activated, device, &Device::acceptPairing);