on xenial help sign in
Use setenv as early as possible to avoid setenv and getenv clashing in multi-threaded situations.
commitfdb8af9eda01fdc2d54eaf6fdd50c955dd2aad83 authorMichał Sawicz <michal.sawicz@canonical.com> dateThu 31 Oct 2013, 07:13 (13 years ago) parentea02059
1 file changed+8−8
main.cpp+8−8
main.cpp+8−8
@@ -78,14 +78,6 @@ void resolveIconTheme() {
7878
7979int startShell(int argc, const char** argv, void* server)
8080{
81− /* Workaround Qt platform integration plugin not advertising itself
82− as having the following capabilities:
83− - QPlatformIntegration::ThreadedOpenGL
84− - QPlatformIntegration::BufferQueueingOpenGL
85− */
86− setenv("QML_FORCE_THREADED_RENDERER", "1", 1);
87− setenv("QML_FIXED_ANIMATION_STEP", "1", 1);
88−
8981 const bool isUbuntuMirServer = qgetenv("QT_QPA_PLATFORM") == "ubuntumirserver";
9082
9183 QGuiApplication::setApplicationName("Unity 8");
@@ -186,6 +178,14 @@ int startShell(int argc, const char** argv, void* server)
186178
187179int main(int argc, const char *argv[])
188180{
181+ /* Workaround Qt platform integration plugin not advertising itself
182+ as having the following capabilities:
183+ - QPlatformIntegration::ThreadedOpenGL
184+ - QPlatformIntegration::BufferQueueingOpenGL
185+ */
186+ setenv("QML_FORCE_THREADED_RENDERER", "1", 1);
187+ setenv("QML_FIXED_ANIMATION_STEP", "1", 1);
188+
189189 // For ubuntumirserver/ubuntumirclient
190190 if (qgetenv("QT_QPA_PLATFORM").startsWith("ubuntumir")) {
191191 setenv("QT_QPA_PLATFORM", "ubuntumirserver", 1);