~nicolas-doffay/unity8/search-history-persist

« back to all changes in this revision

Viewing changes to main.cpp

  • Committer: Tarmac
  • Author(s): Michał Sawicz
  • Date: 2013-10-31 19:58:45 UTC
  • mfrom: (481.1.1 move-setenv)
  • Revision ID: tarmac-20131031195845-hycliydcdxneaha2
Use setenv as early as possible to avoid setenv and getenv clashing in multi-threaded situations. Fixes: https://bugs.launchpad.net/bugs/1240866.

Approved by PS Jenkins bot, Timo Jyrinki, Gerry Boland, Michael Zanetti.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
 
79
79
int startShell(int argc, const char** argv, void* server)
80
80
{
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
 
 
89
81
    const bool isUbuntuMirServer = qgetenv("QT_QPA_PLATFORM") == "ubuntumirserver";
90
82
 
91
83
    QGuiApplication::setApplicationName("Unity 8");
186
178
 
187
179
int main(int argc, const char *argv[])
188
180
{
 
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
 
189
189
    // For ubuntumirserver/ubuntumirclient
190
190
    if (qgetenv("QT_QPA_PLATFORM").startsWith("ubuntumir")) {
191
191
        setenv("QT_QPA_PLATFORM", "ubuntumirserver", 1);