Bug 103859
Summary: | [Qt] WebKit libraries for Qt 5 use one single export macro | ||
---|---|---|---|
Product: | WebKit | Reporter: | Thiago Macieira <thiago> |
Component: | WebKit Qt | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Major | CC: | hausmann, pierre.rossi |
Priority: | P1 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 103844 | ||
Bug Blocks: |
Thiago Macieira
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Thiago Macieira
Patch is on 103844. Keeping this open for the description and additional work (the InitWebKitQt.h)