Merge pull request #3194

9b18344d main: don't override user-provided QT_QPA_PLATFORM env variable (xiphon)
This commit is contained in:
Alexander Blair 2020-10-28 00:43:43 -07:00
commit 7f164e739a
No known key found for this signature in database
GPG key ID: C64552D877C32479

View file

@ -177,8 +177,8 @@ int main(int argc, char *argv[])
// disable "QApplication: invalid style override passed" warning
if (isDesktop) qputenv("QT_STYLE_OVERRIDE", "fusion");
#ifdef Q_OS_LINUX
// force platform xcb
if (isDesktop) qputenv("QT_QPA_PLATFORM", "xcb");
// platform xcb by default
if (isDesktop && qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM")) qputenv("QT_QPA_PLATFORM", "xcb");
#endif
// enable High DPI scaling