RESOLVED FIXED Bug 103859
[Qt] WebKit libraries for Qt 5 use one single export macro
https://bugs.webkit.org/show_bug.cgi?id=103859
Summary [Qt] WebKit libraries for Qt 5 use one single export macro
Thiago Macieira
Reported 2012-12-02 23:22:32 PST
They need to use two export macros, one for each library. Right now, both libraries use QWEBKIT_EXPORT, which is incorrect. This is important for platforms that use different macros for Q_DECL_EXPORT and Q_DECL_IMPORT, notably Windows but also on ELF platforms with protected visibility. I really have no clue how you managed to compile WebKit on Windows with this bug. I recommend leaving QWEBKIT_EXPORT for QtWebKit and creating QWEBKITWIDGETS_EXPORT for QtWebKitWidgets. Also note that they need to be controlled by differen macros. qmake in Qt 5 automatically creates one such macro per library being built: QT_BUILD_${libname in uppercase}_LIB. That is, QT_BUILD_WEBKIT_LIB and QT_BUILD_WEBKITWIDGETS_LIB. In Qt 4, that is not automatic, so the .pro files need to have those two macros in DEFINES +=. Also note that there are some Q_DECL_EXPORT uses directly in header files in WebKit/WidgetSupport/InitWebKitQt.h. That's only correct if this header is included from one single library. If it's included from two or more libraries, it needs to use the proper lib-specific export macro. So my recommendation is to do it.
Attachments
Thiago Macieira
Comment 1 2012-12-02 23:26:29 PST
Patch is on 103844. Keeping this open for the description and additional work (the InitWebKitQt.h)
Note You need to log in before you can comment on or make changes to this bug.