From 1b4f3960fd7e5159f4e3aaea669e55e82a276e18 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 16 Feb 2022 10:21:06 +0200 Subject: [PATCH] effects/contrast: 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 --- src/effects/backgroundcontrast/contrast.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/effects/backgroundcontrast/contrast.cpp b/src/effects/backgroundcontrast/contrast.cpp index 2f79fb00b8..a8e29b8181 100644 --- a/src/effects/backgroundcontrast/contrast.cpp +++ b/src/effects/backgroundcontrast/contrast.cpp @@ -10,6 +10,7 @@ #include "contrastshader.h" // KConfigSkeleton +#include #include #include #include @@ -38,7 +39,7 @@ ContrastEffect::ContrastEffect() } if (effects->waylandDisplay()) { if (!s_contrastManagerRemoveTimer) { - s_contrastManagerRemoveTimer = new QTimer(qApp); + s_contrastManagerRemoveTimer = new QTimer(QCoreApplication::instance()); s_contrastManagerRemoveTimer->setSingleShot(true); s_contrastManagerRemoveTimer->callOnTimeout([]() { s_contrastManager->remove();