From 65cec901d55fa8f37e47dfd88bdc5b2474c74c3b Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Sun, 30 Jun 2019 11:26:57 +0800 Subject: [PATCH] Skip the Wayland warning if QT_QPA_PLATFORM already set --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index ab316df8f..68226ec88 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -55,7 +55,7 @@ int main(int argc, char** argv) #endif #endif #ifdef Q_OS_LINUX - if (qgetenv("XDG_SESSION_TYPE") == QByteArrayLiteral("wayland")) { + if (qgetenv("XDG_SESSION_TYPE") == QByteArrayLiteral("wayland") && qgetenv("QT_QPA_PLATFORM").isEmpty()) { qWarning() << "Warning: disregarding XDG_SESSION_TYPE=wayland"; qWarning() << "To use wayland anyway, please set QT_QPA_PLATFORM=wayland"; qunsetenv("XDG_SESSION_TYPE");