effects/blur: Use QGuiApplication::instance() instead of qApp

qApp is defined differently depending on whether QCoreApplication,
QGuiApplication, or QApplication is included.

Use QGuiApplication::instance() to improve code readability.

CCBUG: 450359
This commit is contained in:
Vlad Zahorodnii 2022-02-16 10:19:43 +02:00
parent 4acae79d54
commit 9cca0a6f85

View file

@ -13,7 +13,7 @@
#include <QGuiApplication>
#include <QMatrix4x4>
#include <QScreen> // for QGuiApplication
#include <QScreen>
#include <QTime>
#include <QTimer>
#include <QWindow>
@ -51,7 +51,7 @@ BlurEffect::BlurEffect()
}
if (effects->waylandDisplay()) {
if (!s_blurManagerRemoveTimer) {
s_blurManagerRemoveTimer = new QTimer(qApp);
s_blurManagerRemoveTimer = new QTimer(QCoreApplication::instance());
s_blurManagerRemoveTimer->setSingleShot(true);
s_blurManagerRemoveTimer->callOnTimeout([]() {
s_blurManager->remove();