diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-05 10:46:00 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-05 10:46:00 (GMT) |
commit | 60b09b8915e2095b221eb0a16a76d49e5bb10391 (patch) | |
tree | 90f1564ea8f8775363e47d5f4fd911f2d28f23e1 /src | |
parent | c791b300b288635ed018d50c5e6e28859b374b5e (diff) | |
parent | f8c6df878f14e1b00a2dde03decffb6cba2f1687 (diff) | |
download | Qt-60b09b8915e2095b221eb0a16a76d49e5bb10391.zip Qt-60b09b8915e2095b221eb0a16a76d49e5bb10391.tar.gz Qt-60b09b8915e2095b221eb0a16a76d49e5bb10391.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: (56 commits)
Give the toplevel widget a layout
fix tests when using Qt in a namespace
Fix tst_symbols auto test
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
...
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qsettings.cpp | 16 | ||||
-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 | ||||
-rw-r--r-- | src/network/kernel/qnetworkproxy.cpp | 6 |
5 files changed, 50 insertions, 9 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 8ee42e7..e6c5fb9 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -88,6 +88,12 @@ #define CSIDL_APPDATA 0x001a // <username>\Application Data #endif +#ifdef Q_AUTOTEST_EXPORT +# define Q_AUTOTEST_EXPORT_HELPER Q_AUTOTEST_EXPORT +#else +# define Q_AUTOTEST_EXPORT_HELPER static +#endif + // ************************************************************************ // QConfFile @@ -134,7 +140,7 @@ QT_BEGIN_INCLUDE_NAMESPACE # include <sys/mount.h> QT_END_INCLUDE_NAMESPACE -static bool isLikelyToBeNfs(int handle) +Q_AUTOTEST_EXPORT_HELPER bool qIsLikelyToBeNfs(int handle) { struct statfs buf; if (fstatfs(handle, &buf) != 0) @@ -160,7 +166,7 @@ QT_END_INCLUDE_NAMESPACE # define AUTOFSNG_SUPER_MAGIC 0x7d92b1a0 # endif -static bool isLikelyToBeNfs(int handle) +Q_AUTOTEST_EXPORT_HELPER bool qIsLikelyToBeNfs(int handle) { struct statfs buf; if (fstatfs(handle, &buf) != 0) @@ -177,7 +183,7 @@ QT_BEGIN_INCLUDE_NAMESPACE # include <sys/statvfs.h> QT_END_INCLUDE_NAMESPACE -static bool isLikelyToBeNfs(int handle) +Q_AUTOTEST_EXPORT_HELPER bool qIsLikelyToBeNfs(int handle) { struct statvfs buf; if (fstatvfs(handle, &buf) != 0) @@ -189,7 +195,7 @@ static bool isLikelyToBeNfs(int handle) #endif } #else -static inline bool isLikelyToBeNfs(int /* handle */) +Q_AUTOTEST_EXPORT_HELPER inline bool qIsLikelyToBeNfs(int /* handle */) { return true; } @@ -203,7 +209,7 @@ static bool unixLock(int handle, int lockType) now is to disable locking when we detect NFS (or AutoFS or CacheFS, which are probably wrapping NFS). */ - if (isLikelyToBeNfs(handle)) + if (qIsLikelyToBeNfs(handle)) return false; struct flock fl; 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 }; diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index bc5a025..84f9517 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -426,7 +426,8 @@ template<> void QSharedDataPointer<QNetworkProxyPrivate>::detach() QNetworkProxy::QNetworkProxy() : d(0) { - globalNetworkProxy()->init(); + if (QGlobalNetworkProxy *globalProxy = globalNetworkProxy()) + globalProxy->init(); } /*! @@ -441,7 +442,8 @@ QNetworkProxy::QNetworkProxy(ProxyType type, const QString &hostName, quint16 po const QString &user, const QString &password) : d(new QNetworkProxyPrivate(type, hostName, port, user, password)) { - globalNetworkProxy()->init(); + if (QGlobalNetworkProxy *globalProxy = globalNetworkProxy()) + globalProxy->init(); } /*! |