D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-20 Thread Martin Flöser
This revision was automatically updated to reflect the committed changes. Closed by commit R120:c4a0d6925ec6: No longer export QT_QPA_PLATFORM env variable to the session (authored by graesslin). REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-20 Thread Fabian Vogt
fvogt added a comment. > We won't need it anymore anyway after we can expect Qt 5.11 and then can remove the "hack" again. I'm not sure about that - Qt 5.11 allows a fallback, but one reason for this patch was to use xcb + Xwayland instead of native qtwayland as it has certain

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-20 Thread Roman Gilg
romangg added a comment. I think it is fine as it is now. We won't need it anymore anyway after we can expect Qt 5.11 and then can remove the "hack" again. REPOSITORY R120 Plasma Workspace BRANCH unset-qt-qpa-platform REVISION DETAIL https://phabricator.kde.org/D11447 To: graesslin,

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-20 Thread Martin Flöser
graesslin added a comment. In D11447#229522 , @graesslin wrote: > There's another solution which might be cleaner and which KWin uses for that problem: modifying the process environment. I'll give a try whether this could work here.

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-19 Thread Martin Flöser
graesslin added a comment. In D11447#229478 , @romangg wrote: > Could we use a wrapper for QApplication being called by > > QApplication app = KWorkSpace::createPlattformAwareQApplication(argc, argv); > > > and that sets and unsets

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-19 Thread Roman Gilg
romangg added a comment. Could we use a wrapper for QApplication being called by QApplication app = KWorkSpace::createPlattformAwareQApplication(argc, argv); and that sets and unsets the env variable in the wrapper call? With above code there might be a copy involved though.

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-19 Thread Fabian Vogt
fvogt resigned from this revision. fvogt added a comment. This revision is now accepted and ready to land. > Please move the qunsetenv into a method in KWorkSpace at least. Hm, that's not much prettier either. I really don't know how to make this look less hacky with editing env vars.

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-19 Thread Fabian Vogt
fvogt requested changes to this revision. fvogt added a comment. This revision now requires changes to proceed. In D11447#229385 , @graesslin wrote: > In D11447#229337 , @fvogt wrote: > > > In

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-19 Thread Roman Gilg
romangg accepted this revision. romangg added a comment. Right it's a pointer array. So `detectPlatform` would need to do some pointer and memory rearranging, what is not worth the hassle. REPOSITORY R120 Plasma Workspace BRANCH unset-qt-qpa-platform REVISION DETAIL

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-19 Thread Martin Flöser
graesslin added a comment. In D11447#229337 , @fvogt wrote: > In D11447#229334 , @graesslin wrote: > > > In D11447#229128 , @fvogt wrote: > > > > > If

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-19 Thread Roman Gilg
romangg added a comment. `KWorkSpace::detectPlatform(argc, argv);` is already testing the arguments if `--platform` flag is set and in this case would do nothing. Therefore I think it's safe to set the flag instead of the env variable as proposed by @fvogt. REPOSITORY R120 Plasma

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-19 Thread Fabian Vogt
fvogt added a comment. In D11447#229334 , @graesslin wrote: > In D11447#229128 , @fvogt wrote: > > > If `KWorkSpace::detectPlatform(argc, argv);` were changed to edit `argc` and `argv` to pass

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-19 Thread Martin Flöser
graesslin added a comment. In D11447#229128 , @fvogt wrote: > If `KWorkSpace::detectPlatform(argc, argv);` were changed to edit `argc` and `argv` to pass `-platform foo` instead of setting `QT_QPA_PLATFORM`, the `qunsetenv` calls would become

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-19 Thread Fabian Vogt
fvogt added a comment. If `KWorkSpace::detectPlatform(argc, argv);` were changed to edit `argc` and `argv` to pass `-platform foo` instead of setting `QT_QPA_PLATFORM`, the `qunsetenv` calls would become unnecessary. REPOSITORY R120 Plasma Workspace BRANCH unset-qt-qpa-platform

D11447: No longer export QT_QPA_PLATFORM env variable to the session

2018-03-18 Thread Martin Flöser
graesslin created this revision. graesslin added a reviewer: Plasma. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. graesslin requested review of this revision. REVISION SUMMARY As discussed the env variables are no longer exported. Thus