diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-04 02:45:25 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-04 02:45:25 (GMT) |
commit | 4fc2d7f1b14c26d10968c99dd296e056a2beed4d (patch) | |
tree | 482a55a791f01c51347d164e7d98c584d5e87c00 /src/gui | |
parent | ab672d88f906b0d6f2d45f9ebbfbf12fdcfba51e (diff) | |
parent | b3ffd9aa12faeca6f35118182231a145f69f4ac7 (diff) | |
download | Qt-4fc2d7f1b14c26d10968c99dd296e056a2beed4d.zip Qt-4fc2d7f1b14c26d10968c99dd296e056a2beed4d.tar.gz Qt-4fc2d7f1b14c26d10968c99dd296e056a2beed4d.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging: (53 commits)
trivial: fix build
Fix crash
fix isLikelyToBeNfs usage
Export isLikelyToBeNfs only if we have an internal build
Fixed QGraphicsView autotest to use a dummy toplevel widget
Fixed QMdiArea autotest to use a dummy toplevel widget.
Fixed QMenuBar autotest. Changed window activation order.
Fixed QStyleSheetStyle autotest to use a dummy toplevel widget
Fixed QPathCliper autotest, to skip a test when qreal != double
Fixed QComboBox autotest to use a dummy toplevel widget
Fixed QColumnView autotest. Added an QApplication::processEvents
Fixed QAccessability autotest to use a dummy toplevel widget
Fix QListWidget test
Fix QGraphicsItems autotest
Fixed QGraphicsScene autotest to use a dummy toplevel widget
Fixed QGraphicsItem autotest to use a dummy toplevel widget
Fixed QListView autotest to use a dummy toplevel widget
Fixed QMenu autotest to use a dummy toplevel widget
Fixed QMenuBar autotest. Added mainwindow activation
Fixed QString autotest when QT_QLOCALE_USES_FCVT is set
...
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 12 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 24 | ||||
-rw-r--r-- | src/gui/kernel/qt_x11_p.h | 1 |
3 files changed, 35 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); diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index a4cc5a3..7c68170 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -2334,6 +2334,30 @@ void qt_init(QApplicationPrivate *priv, int, X11->desktopEnvironment = DE_4DWM; break; } + + if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), + ATOM(_NET_SUPPORTING_WM_CHECK), + 0, 1024, False, XA_WINDOW, &type, + &format, &length, &after, &data) == Success) { + if (type == XA_WINDOW && format == 32) { + Window windowManagerWindow = *((Window*) data); + XFree(data); + data = 0; + + if (windowManagerWindow != XNone) { + Atom utf8atom = ATOM(UTF8_STRING); + if (XGetWindowProperty(QX11Info::display(), windowManagerWindow, ATOM(_NET_WM_NAME), + 0, 1024, False, utf8atom, &type, + &format, &length, &after, &data) == Success) { + if (type == utf8atom && format == 8) { + if (qstrcmp((const char *)data, "MCompositor") == 0) + X11->desktopEnvironment = DE_MEEGO_COMPOSITOR; + } + } + } + } + } + } while(0); if (data) diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h index d62d9c3..56c8094 100644 --- a/src/gui/kernel/qt_x11_p.h +++ b/src/gui/kernel/qt_x11_p.h @@ -338,6 +338,7 @@ enum DesktopEnvironment { DE_KDE, DE_GNOME, DE_CDE, + DE_MEEGO_COMPOSITOR, DE_4DWM }; |