Commit 1b4f3960 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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
parent 9cca0a6f
Pipeline #138884 passed with stage
in 13 minutes and 56 seconds
......@@ -10,6 +10,7 @@
#include "contrastshader.h"
// KConfigSkeleton
#include <QCoreApplication>
#include <QMatrix4x4>
#include <QTimer>
#include <QWindow>
......@@ -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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment