summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2011-09-14 10:34:27 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-14 05:06:33 +0200
commit7e7a1eefb3797002e9b17314b6fa6896935ac6e4 (patch)
tree8e41ffba09953fe0ac5356c82d455b71e37fcd40
parent732bfbe8e8445a95965874752e586887f1dcbbc1 (diff)
Windows: fixed compile of libQtPlatformSupport
It is incorrect to use QT_GUI_EXPORT to export symbols from any library other than libQtGui. When used outside of libQtGui, QT_GUI_EXPORT attempts to _import_ symbols rather than _export_ them. Change-Id: I7489067f479edd3acd9bf08bcaa24ee4dea4c3cc Reviewed-on: http://codereview.qt-project.org/4838 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
-rw-r--r--src/corelib/global/qglobal.h15
-rw-r--r--src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h2
-rw-r--r--src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa_p.h2
-rw-r--r--src/platformsupport/platformsupport.pro2
4 files changed, 19 insertions, 2 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 1cfd70112f..6fb71fc0c6 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1261,6 +1261,11 @@ class QDataStream;
# else
# define Q_WIDGETS_EXPORT Q_DECL_IMPORT
# endif
+# if defined(QT_BUILD_PLATFORMSUPPORT_LIB)
+# define Q_PLATFORMSUPPORT_EXPORT Q_DECL_EXPORT
+# else
+# define Q_PLATFORMSUPPORT_EXPORT Q_DECL_IMPORT
+# endif
# if defined(QT_BUILD_PRINTSUPPORT_LIB)
# define Q_PRINTSUPPORT_EXPORT Q_DECL_EXPORT
# else
@@ -1356,6 +1361,7 @@ class QDataStream;
# define Q_CORE_EXPORT Q_DECL_IMPORT
# define Q_GUI_EXPORT Q_DECL_IMPORT
# define Q_WIDGETS_EXPORT Q_DECL_IMPORT
+# define Q_PLATFORMSUPPORT_EXPORT Q_DECL_IMPORT
# define Q_PRINTSUPPORT_EXPORT Q_DECL_IMPORT
# define Q_SQL_EXPORT Q_DECL_IMPORT
# define Q_NETWORK_EXPORT Q_DECL_IMPORT
@@ -1391,6 +1397,7 @@ class QDataStream;
# define Q_CORE_EXPORT Q_DECL_EXPORT
# define Q_GUI_EXPORT Q_DECL_EXPORT
# define Q_WIDGETS_EXPORT Q_DECL_EXPORT
+# define Q_PLATFORMSUPPORT_EXPORT Q_DECL_EXPORT
# define Q_PRINTSUPPORT_EXPORT Q_DECL_EXPORT
# define Q_SQL_EXPORT Q_DECL_EXPORT
# define Q_NETWORK_EXPORT Q_DECL_EXPORT
@@ -1412,6 +1419,7 @@ class QDataStream;
# define Q_CORE_EXPORT
# define Q_GUI_EXPORT
# define Q_WIDGETS_EXPORT
+# define Q_PLATFORMSUPPORT_EXPORT
# define Q_PRINTSUPPORT_EXPORT
# define Q_SQL_EXPORT
# define Q_NETWORK_EXPORT
@@ -1450,6 +1458,11 @@ class QDataStream;
# else
# define Q_WIDGETS_EXPORT_INLINE inline
# endif
+# if defined(QT_BUILD_PLATFORMSUPPORT_LIB)
+# define Q_PLATFORMSUPPORT_EXPORT_INLINE Q_PLATFORMSUPPORT_EXPORT inline
+# else
+# define Q_PLATFORMSUPPORT_EXPORT_INLINE inline
+# endif
# if defined(QT_BUILD_PRINTSUPPORT_LIB)
# define Q_PRINTSUPPORT_EXPORT_INLINE Q_PRINTSUPPORT_EXPORT inline
# else
@@ -1467,12 +1480,14 @@ class QDataStream;
# define Q_CORE_EXPORT_INLINE inline
# define Q_GUI_EXPORT_INLINE inline
# define Q_WIDGETS_EXPORT_INLINE inline
+# define Q_PLATFORMSUPPORT_EXPORT_INLINE inline
# define Q_PRINTSUPPORT_EXPORT_INLINE inline
# define Q_COMPAT_EXPORT_INLINE inline
#else
# define Q_CORE_EXPORT_INLINE Q_CORE_EXPORT inline
# define Q_GUI_EXPORT_INLINE Q_GUI_EXPORT inline
# define Q_WIDGETS_EXPORT_INLINE Q_WIDGETS_EXPORT inline
+# define Q_PLATFORMSUPPORT_EXPORT_INLINE Q_PLATFORMSUPPORT_EXPORT inline
# define Q_PRINTSUPPORT_EXPORT_INLINE Q_PRINTSUPPORT_EXPORT inline
# define Q_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline
#endif
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h b/src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h
index cb67701750..7aeb795742 100644
--- a/src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h
+++ b/src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
class QEventDispatcherQPAPrivate;
-class Q_GUI_EXPORT QEventDispatcherQPA : public QEventDispatcherUNIX
+class Q_PLATFORMSUPPORT_EXPORT QEventDispatcherQPA : public QEventDispatcherUNIX
{
Q_OBJECT
Q_DECLARE_PRIVATE(QEventDispatcherQPA)
diff --git a/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa_p.h b/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa_p.h
index 1dfb759682..ea9b10f66c 100644
--- a/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa_p.h
+++ b/src/platformsupport/inputcontext/qplatforminputcontextplugin_qpa_p.h
@@ -73,7 +73,7 @@ class QPlatformInputContext;
Q_DECLARE_INTERFACE(QPlatformInputContextFactoryInterface, QPlatformInputContextFactoryInterface_iid)
-class Q_GUI_EXPORT QPlatformInputContextPlugin : public QObject, public QPlatformInputContextFactoryInterface
+class Q_PLATFORMSUPPORT_EXPORT QPlatformInputContextPlugin : public QObject, public QPlatformInputContextFactoryInterface
{
Q_OBJECT
Q_INTERFACES(QPlatformInputContextFactoryInterface:QFactoryInterface)
diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro
index 9d6f8dcd41..b208e59f94 100644
--- a/src/platformsupport/platformsupport.pro
+++ b/src/platformsupport/platformsupport.pro
@@ -11,6 +11,8 @@ mac:LIBS += -lz -framework CoreFoundation -framework Carbon
MODULE_PRI = ../modules/qt_platformsupport.pri
+DEFINES += QT_BUILD_PLATFORMSUPPORT_LIB
+
load(qt_module_config)
unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui