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
This commit is contained in:
parent
9cca0a6f85
commit
1b4f3960fd
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
#include "contrastshader.h"
|
#include "contrastshader.h"
|
||||||
// KConfigSkeleton
|
// KConfigSkeleton
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QMatrix4x4>
|
#include <QMatrix4x4>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
|
@ -38,7 +39,7 @@ ContrastEffect::ContrastEffect()
|
||||||
}
|
}
|
||||||
if (effects->waylandDisplay()) {
|
if (effects->waylandDisplay()) {
|
||||||
if (!s_contrastManagerRemoveTimer) {
|
if (!s_contrastManagerRemoveTimer) {
|
||||||
s_contrastManagerRemoveTimer = new QTimer(qApp);
|
s_contrastManagerRemoveTimer = new QTimer(QCoreApplication::instance());
|
||||||
s_contrastManagerRemoveTimer->setSingleShot(true);
|
s_contrastManagerRemoveTimer->setSingleShot(true);
|
||||||
s_contrastManagerRemoveTimer->callOnTimeout([]() {
|
s_contrastManagerRemoveTimer->callOnTimeout([]() {
|
||||||
s_contrastManager->remove();
|
s_contrastManager->remove();
|
||||||
|
|
Loading…
Reference in a new issue