automatically detect if kf5notifications is installed

This commit is contained in:
Malte Jürgens
2022-08-29 14:23:00 +02:00
parent 5f37ab314f
commit 753da8b1d3
2 changed files with 6 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
#include "mainwindow.h"
#include "virtmic.h"
#ifdef KF5NOTIFICATIONS
#ifdef KNOTIFICATIONS
#include <KNotification>
#endif
@@ -36,7 +36,7 @@ void MainWindow::setupWebView() {
m_webView = new QWebEngineView(this);
m_webView->setPage(page);
#ifdef KF5NOTIFICATIONS
#ifdef KNOTIFICATIONS
QWebEngineProfile::defaultProfile()->setNotificationPresenter(
[&](std::unique_ptr<QWebEngineNotification> notificationInfo) {
KNotification *notification = new KNotification("discordNotification");