QmlDevTools: Define QML export macros as empty.
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Mon, 17 Aug 2015 15:08:26 +0000 (17:08 +0200)
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Tue, 18 Aug 2015 11:13:44 +0000 (11:13 +0000)
Since QmlDevTools is a static library, no exports
(Q_QML_EXPORT/Q_QML_PRIVATE_EXPORT) should be specified.

Fixes link errors in qmlimportscanner and lupdate
with MSVC2015:

Qt5QmlDevToolsd.lib(qv4value.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct QV4::VTable * __cdecl QV4::Heap::Base::vtable(void)const " (__imp_?vtable@Base@Heap@QV4@@QEBAPEAUVTable@3@XZ) referenced in function "public: bool __cdecl QV4::Managed::isEqualTo(struct QV4::Managed const *)const " (?isEqualTo@Managed@QV4@@QEBA_NPEBU12@@Z)
D:\dev\5-vs15-56\qt-56\qtbase\bin\qmlimportscanner.exe : fatal error LNK1120: 1 unresolved externals

Change-Id: I6125b3d1eaacadba65a90047867779252dab6fbc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
src/qmldevtools/qtqmldevtoolsglobal_p.h

index fa8731deb68208e978412bfb5921ad7e30e9717c..5cbb5ece729c9a9c3f1ca64fcd06c11f2726771e 100644 (file)
 
 QT_BEGIN_NAMESPACE
 
-#ifndef QT_STATIC
-#  if defined(QT_BUILD_QML_LIB)
-#    define Q_QML_EXPORT Q_DECL_EXPORT
-#  else
-#    define Q_QML_EXPORT Q_DECL_IMPORT
-#  endif
-#else
-#  define Q_QML_EXPORT
-#endif
-
-#if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
-#    define Q_QML_PRIVATE_EXPORT
-#else
-#    define Q_QML_PRIVATE_EXPORT Q_QML_EXPORT
-#endif
+#define Q_QML_EXPORT
+#define Q_QML_PRIVATE_EXPORT
 
 QT_END_NAMESPACE
 #endif // QTQMLGLOBAL_P_H