diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-11-05 23:00:12 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-11-05 23:00:12 (GMT) |
commit | 84de3d47a2fd5400920ad570b443b6bb95c8c766 (patch) | |
tree | 5fa4a5ff143e96a2b75831cf4c0f6f7bc623fb0a /src/gui/kernel/qapplication.cpp | |
parent | 915aa77e130e4722173df10e7bb6816c54a2c4e4 (diff) | |
parent | 6ac4bc5cb7ac7500b39ea6828fdf76e95a2c2f0b (diff) | |
download | Qt-84de3d47a2fd5400920ad570b443b6bb95c8c766.zip Qt-84de3d47a2fd5400920ad570b443b6bb95c8c766.tar.gz Qt-84de3d47a2fd5400920ad570b443b6bb95c8c766.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 6c4004e..a4ae46b 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -1430,10 +1430,18 @@ QStyle *QApplication::style() // Compile-time search for default style // QString style; - if (!QApplicationPrivate::styleOverride.isEmpty()) +#ifdef QT_BUILD_INTERNAL + QString envStyle = QString::fromLocal8Bit(qgetenv("QT_STYLE_OVERRIDE")); +#else + QString envStyle; +#endif + if (!QApplicationPrivate::styleOverride.isEmpty()) { style = QApplicationPrivate::styleOverride; - else + } else if (!envStyle.isEmpty()) { + style = envStyle; + } else { style = QApplicationPrivate::desktopStyleKey(); + } QStyle *&app_style = QApplicationPrivate::app_style; app_style = QStyleFactory::create(style); |