diff options
author | Joaquim Rocha <jrocha@igalia.com> | 2010-11-29 13:19:02 +0100 |
---|---|---|
committer | Miroslav Safr <miroslav.safr@tieto.com> | 2010-12-08 11:40:27 +0200 |
commit | 6aac0c3a96fc09b216632e9a9bb624ea470ec5f0 (patch) | |
tree | 3f54412ca0eb3ad8245fd28691e232dd645dc937 | |
parent | e5c10b2db6eff155c2f93a2bfd6bd1d281023190 (diff) |
Fixes: NB#199156 - inexplicit libmeegotouchcore dependency on libXfixes; fails to compile under Ubuntu Mint
RevBy: TrustMe
Details:
Adds the dependency of XFixes and uses the introduced macro instead of Q_WS_X11
to control XFixes functions.
-rw-r--r-- | benchmarks/pt_mcomponentdata2/pt_mcomponentdata2.cpp | 6 | ||||
-rwxr-xr-x | configure | 10 | ||||
-rw-r--r-- | src/common_top.pri | 5 | ||||
-rw-r--r-- | src/corelib/core/mcomponentdata.cpp | 8 |
4 files changed, 23 insertions, 6 deletions
diff --git a/benchmarks/pt_mcomponentdata2/pt_mcomponentdata2.cpp b/benchmarks/pt_mcomponentdata2/pt_mcomponentdata2.cpp index 24372b72..475b8d6a 100644 --- a/benchmarks/pt_mcomponentdata2/pt_mcomponentdata2.cpp +++ b/benchmarks/pt_mcomponentdata2/pt_mcomponentdata2.cpp @@ -46,10 +46,10 @@ #include <QDBusConnection> #include "testabilityinterface.h" -#ifdef Q_WS_X11 +#ifdef HAVE_XFIXES #include <QX11Info> #include <X11/extensions/Xfixes.h> -#endif +#endif // HAVE_XFIXES void mMessageHandler(QtMsgType, const char *) {} @@ -188,7 +188,7 @@ void Pt_MComponentData2::registerDefaultService() void Pt_MComponentData2::showCursor() { MBENCHMARK_ONCE( -#ifdef Q_WS_X11 +#ifdef HAVE_XFIXES XFixesShowCursor(QX11Info::display(), QX11Info::appRootWindow()); #else qApp->restoreOverrideCursor(); @@ -77,6 +77,7 @@ HAVE_GCONF=no HAVE_DBUS=no HAVE_CONTENTACTION=no HAVE_XDAMAGE=no +HAVE_XFIXES=no HAVE_QTM_SERVICEFRAMEWORK=no IS_MAEMO5=no HAVE_MEEGOGRAPHICSSYSTEM=no @@ -430,6 +431,10 @@ if [ $? -eq 0 ]; then HAVE_XDAMAGE=yes fi + pkg-config --exists xfixes + if [ $? -eq 0 ]; then + HAVE_XFIXES=yes + fi # For Scratchbox and For OBS/MeeGo if [ ! -z "`uname -m | grep arm`" ]; then IS_ARMEL=yes @@ -607,6 +612,10 @@ if [ "$HAVE_XDAMAGE" = "yes" ]; then MEEGOTOUCHCONFIG_DEPS="$MEEGOTOUCHCONFIG_DEPS HAVE_XDAMAGE" fi +if [ "$HAVE_XFIXES" = "yes" ]; then + MEEGOTOUCHCONFIG_DEPS="$MEEGOTOUCHCONFIG_DEPS HAVE_XFIXES" +fi + if [ "$HAVE_CONTEXTSUBSCRIBER" = "yes" ]; then MEEGOTOUCHCONFIG_DEPS="$MEEGOTOUCHCONFIG_DEPS HAVE_CONTEXTSUBSCRIBER" fi @@ -826,6 +835,7 @@ echo "Content Action 0.1 .............. $HAVE_CONTENTACTION" echo "GConf 2.0 ....................... $HAVE_GCONF" echo "DBus (incl. QtDBus) ............. $HAVE_DBUS" echo "XDamage ......................... $HAVE_XDAMAGE" +echo "XFixes .......................... $HAVE_XFIXES" echo "Qt Mobility Service Framework ... $HAVE_QTM_SERVICEFRAMEWORK" echo "MeeGo graphicssystem ............ $HAVE_MEEGOGRAPHICSSYSTEM" diff --git a/src/common_top.pri b/src/common_top.pri index 4de3ae1e..85a6ad70 100644 --- a/src/common_top.pri +++ b/src/common_top.pri @@ -73,6 +73,11 @@ contains(DEFINES, HAVE_XDAMAGE) { PKGCONFIG += xdamage } +# list pkg-config dependencies here +contains(DEFINES, HAVE_XFIXES) { + PKGCONFIG += xfixes +} + contains(DEFINES, HAVE_ICU) { LIBS += -licui18n -licuuc -licudata } diff --git a/src/corelib/core/mcomponentdata.cpp b/src/corelib/core/mcomponentdata.cpp index 651a58d8..3ed19820 100644 --- a/src/corelib/core/mcomponentdata.cpp +++ b/src/corelib/core/mcomponentdata.cpp @@ -56,9 +56,11 @@ #include "mgraphicssystemhelper.h" #ifdef Q_WS_X11 +#ifdef HAVE_XDAMAGE #include <QX11Info> #include <X11/extensions/Xfixes.h> -#endif +#endif // HAVE_XFIXES +#endif // Q_WS_X11 namespace { @@ -980,13 +982,13 @@ void MComponentData::setShowCursor(bool show) } if (show) { -#ifdef Q_WS_X11 +#ifdef HAVE_XFIXES XFixesShowCursor(QX11Info::display(), QX11Info::appRootWindow()); #else qApp->restoreOverrideCursor(); #endif } else { -#ifdef Q_WS_X11 +#ifdef HAVE_XFIXES XFixesHideCursor(QX11Info::display(), QX11Info::appRootWindow()); #else QPixmap cursor(QSize(1, 1)); |