[Qt] Enable c++0x support on QtWebKit when using gcc 4.6.0 or later.
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.
Created attachment 92413 [details] Patch
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?
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.
Created attachment 92415 [details] Patch
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
Committed r85855: <http://trac.webkit.org/changeset/85855>
*** Bug 60357 has been marked as a duplicate of this bug. ***
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.
Sorry for the spam. I miss read the lessThan condition...
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).
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).
(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.