Do not override QT_QPA_PLATFORM env variables
The QGuiApplication documentation explicitly says that QT_QPA_PLATFORM can be used to specify the QPA for every QGuiApplication. Unconditionally overriding this value within the application is a unexpected behavior. Task-number: QTBUG-54789 Change-Id: Ia7a61a0f2921ef8ec27fe630e8d307d20ba1eb37 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
852e60e67b
commit
78f5b9e7f7
|
@ -977,7 +977,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (!requireWindowManager)
|
||||
if (!requireWindowManager && qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM"))
|
||||
qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("minimal"));
|
||||
else
|
||||
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
|
||||
|
|
Loading…
Reference in New Issue