Fix SingleApplication static functions called from instance

This commit is contained in:
EmmanuelMess
2021-09-09 20:46:13 -03:00
committed by Jonas Kvinge
parent 8ca0b54b18
commit 68c44daef2
7 changed files with 13 additions and 13 deletions

View File

@@ -166,7 +166,7 @@ OSDPretty::~OSDPretty() {
void OSDPretty::showEvent(QShowEvent *e) {
screens_.clear();
for(QScreen *screen : qApp->screens()) {
for(QScreen *screen : QGuiApplication::screens()) {
screens_.insert(screen->name(), screen);
}
@@ -221,7 +221,7 @@ bool OSDPretty::IsTransparencyAvailable() {
return QX11Info::isCompositingManagerRunning();
#elif defined(HAVE_X11) && defined(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
if (qApp) {
QPlatformNativeInterface *native = qApp->platformNativeInterface();
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
QScreen *screen = popup_screen_ == nullptr ? QGuiApplication::primaryScreen() : popup_screen_;
if (native && screen) {
return native->nativeResourceForScreen(QByteArray("compositingEnabled"), screen);