RESOLVED FIXED 60265
[Qt] Make QtWebKit build when using gcc 4.6.0
https://bugs.webkit.org/show_bug.cgi?id=60265
Summary [Qt] Make QtWebKit build when using gcc 4.6.0
Alexis Menard (darktears)
Reported 2011-05-05 06:53:47 PDT
[Qt] Enable c++0x support on QtWebKit when using gcc 4.6.0 or later.
Attachments
Patch (4.33 KB, patch)
2011-05-05 07:04 PDT, Alexis Menard (darktears)
no flags
Patch (3.04 KB, patch)
2011-05-05 08:13 PDT, Alexis Menard (darktears)
benjamin: review+
Alexis Menard (darktears)
Comment 1 2011-05-05 06:57:20 PDT
gcc 4.6.0 starts to support pretty well the upcoming standard. The new standard got the final draft approved so it's most likely things will not move that much. For example we can use features like nullptr or we can enable code path in webkit that supports it. Reference : http://en.wikipedia.org/wiki/C%2B%2B0x http://gcc.gnu.org/gcc-4.6/cxx0x_status.html -> which is impressively good.
Alexis Menard (darktears)
Comment 2 2011-05-05 07:04:49 PDT
Benjamin Poulain
Comment 3 2011-05-05 07:22:51 PDT
Comment on attachment 92413 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92413&action=review > Source/JavaScriptCore/JavaScriptCore.pro:220 > +linux*-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,5) { Can you put a space after "," in qmake?
Alexis Menard (darktears)
Comment 4 2011-05-05 07:38:13 PDT
Comment on attachment 92413 [details] Patch Not good as discussed with benjamin on IRC. We should let the choice to the user and not enforce it.
Alexis Menard (darktears)
Comment 5 2011-05-05 08:13:27 PDT
Benjamin Poulain
Comment 6 2011-05-05 08:21:18 PDT
Comment on attachment 92415 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92415&action=review > Source/WebKit.pri:99 > + # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr) dot
Alexis Menard (darktears)
Comment 7 2011-05-05 08:44:59 PDT
Alexis Menard (darktears)
Comment 8 2011-05-06 10:28:35 PDT
*** Bug 60357 has been marked as a duplicate of this bug. ***
Peter Varga
Comment 9 2011-05-30 02:39:30 PDT
I have found a little mistake in the landed patch. I think this line is wrong in the JavaScriptCore.pro: lessThan(QT_GCC_MAJOR_VERSION, 5):lessThan(QT_GCC_MINOR_VERSION, 6) { The QT_GCC_MAJOR_VERSION should be 4 instead of 5.
Peter Varga
Comment 10 2011-05-30 02:45:32 PDT
Sorry for the spam. I miss read the lessThan condition...
vanboxem.ruben
Comment 11 2011-12-17 10:09:54 PST
Building Qt 4.8 (QtWebkit 2.2.1?), I still get a lot of warnings: In file included from m:\Development\Source\Qt\src\3rdparty\webkit\Source\JavaScriptCore/wtf/PassRefPtr.h:25:0, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\JavaScriptCore/wtf/RefPtr.h:28, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\JavaScriptCore/wtf/HashFunctions.h:24, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\JavaScriptCore/wtf/HashTraits.h:24, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\JavaScriptCore/wtf/HashTable.h:26, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\JavaScriptCore/wtf/HashMap.h:24, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\WebCore\dom/CheckedRadioButtons.h:25, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\WebCore\dom/Document.h:30, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\WebCore\dom/Element.h:28, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\WebCore\dom/StyledElement.h:28, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\WebCore\html/HTMLElement.h:26, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\WebCore\generated\/JSHTMLElement.h:24, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\WebCore\generated\/JSHTMLKeygenElement.h:24, from m:\Development\Source\Qt\src\3rdparty\webkit\Source\WebCore\generated\JSHTMLKeygenElement.cpp:22: m:\Development\Source\Qt\src\3rdparty\webkit\Source\JavaScriptCore/wtf/NullPtr.h:48:1: warning: identifier 'nullptr' will become a keyword in C++0x [-Wc++0x-compat] If this is really solved for other platforms than Windows, it's still a problem on Windows. This is MinGW-w64 GCC 4.6.3 (prerelease).
Andras Becsi
Comment 12 2011-12-19 07:34:23 PST
You need to use the same gcc version for building QtWebKit which was used for building Qt. If this does not solve your problem then it most probably is a problem of MinGW gcc. (In reply to comment #11) > Building Qt 4.8 (QtWebkit 2.2.1?), I still get a lot of warnings: > > > If this is really solved for other platforms than Windows, it's still a problem on Windows. This is MinGW-w64 GCC 4.6.3 (prerelease).
Andras Becsi
Comment 13 2011-12-19 07:39:22 PST
(In reply to comment #12) > You need to use the same gcc version for building QtWebKit which was used for building Qt. >> Building Qt 4.8 (QtWebkit 2.2.1?), I still get a lot of warnings: Do'h, sorry, you build Qt, so I have no clue why you still see this problem. This might be a problem with the compiler.
Note You need to log in before you can comment on or make changes to this bug.