[wayland] Reset QT_QPA_PLATFORM to wayland after starting Application

We only need to force QT_QPA_PLATFORM to be our own plugin when starting
the application. As KWin starts other processes (e.g. kcmshell5) we need
to ensure that the env variable has a sane value. No other process can
load our QPA plugin after all.

Reviewed-By: Bhushan Shah
This commit is contained in:
Martin Gräßlin 2015-11-03 16:52:55 +01:00
parent 5904349c69
commit 19602a921e

View file

@ -380,6 +380,8 @@ int main(int argc, char * argv[])
#endif
KWin::ApplicationWayland a(argc, argv);
a.setupTranslator();
// reset QT_QPA_PLATFORM to a sane value for any processes started from KWin
setenv("QT_QPA_PLATFORM", "wayland", true);
KWin::Application::createAboutData();