From 7ba68fde8cb619ed110b46a7e3f129dfa7553d7f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 16 Feb 2022 09:40:40 +0200 Subject: [PATCH] effects/slidingpopups: Avoid using QApplication CCBUG: 450359 --- src/effects/slidingpopups/slidingpopups.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/effects/slidingpopups/slidingpopups.cpp b/src/effects/slidingpopups/slidingpopups.cpp index b19726cef7..edd63fb160 100644 --- a/src/effects/slidingpopups/slidingpopups.cpp +++ b/src/effects/slidingpopups/slidingpopups.cpp @@ -11,7 +11,7 @@ #include "slidingpopups.h" #include "slidingpopupsconfig.h" -#include +#include #include #include #include @@ -36,7 +36,7 @@ SlidingPopupsEffect::SlidingPopupsEffect() KWaylandServer::Display *display = effects->waylandDisplay(); if (display) { if (!s_slideManagerRemoveTimer) { - s_slideManagerRemoveTimer = new QTimer(qApp); + s_slideManagerRemoveTimer = new QTimer(QCoreApplication::instance()); s_slideManagerRemoveTimer->setSingleShot(true); s_slideManagerRemoveTimer->callOnTimeout([]() { s_slideManager->remove(); @@ -49,7 +49,7 @@ SlidingPopupsEffect::SlidingPopupsEffect() } } - m_slideLength = QFontMetrics(qApp->font()).height() * 8; + m_slideLength = QFontMetrics(QGuiApplication::font()).height() * 8; m_atom = effects->announceSupportProperty("_KDE_SLIDE", this); connect(effects, &EffectsHandler::windowAdded, this, &SlidingPopupsEffect::slotWindowAdded);