Details
Description
Qt doesn't build anymore on Windows when QtDBus is enabled, with some linker errors in src/plugins/script/qtdbus complaining about missing staticMetaObject symbols.
This is caused by the export macros, specifically the importing part, which isn't set to dllimport as it should (from dbus/qdbusmacros.h) :
#if defined(QDBUS_MAKEDLL)
- define QDBUS_EXPORT Q_DECL_EXPORT
#elif defined(QT_SHARED) - define QDBUS_EXPORT Q_DECL_IMPORT
#else - define QDBUS_EXPORT
#endif
QT_SHARED is an obsolete symbol which isn't set anymore, now replaced by QT_DLL.
More generally, the export macros for the QtDBus module are outdated and they don't follow the structure and naming standards like the other modules (all defined in qglobal.h).
See merge request #2439 for a fix : http://qt.gitorious.org/qt/qt/merge_requests/2439
The patch solves the linking errors by fixing the export macro, and moves the definition to qglobal.h together with the other modules. It also renames QDBUS_EXPORT to Q_DBUS_EXPORT to follow the export macro naming standard.
This change is binary compatible as it doesn't change any symbol nor the way they are exported, it only has an effect on the importing side (but if it compiled fine before it'll continue to do so).
It should be source compatible as well for all the headers from QtDBus. However if a client manually imported a method by using QDBUS_EXPORT in his code, then this will break, but this is a fairly unusual case (only one occurence found in KDE-kdelibs, to import a "hidden method" from QtDBus)