Bug 60265 - [Qt] Make QtWebKit build when using gcc 4.6.0
Summary: [Qt] Make QtWebKit build when using gcc 4.6.0
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexis Menard (darktears)
URL:
Keywords: Qt, QtTriaged
: 60357 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-05 06:53 PDT by Alexis Menard (darktears)
Modified: 2011-12-19 07:39 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.33 KB, patch)
2011-05-05 07:04 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (3.04 KB, patch)
2011-05-05 08:13 PDT, Alexis Menard (darktears)
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Menard (darktears) 2011-05-05 06:53:47 PDT
[Qt] Enable c++0x support on QtWebKit when using gcc 4.6.0 or later.
Comment 1 Alexis Menard (darktears) 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.
Comment 2 Alexis Menard (darktears) 2011-05-05 07:04:49 PDT
Created attachment 92413 [details]
Patch
Comment 3 Benjamin Poulain 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?
Comment 4 Alexis Menard (darktears) 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.
Comment 5 Alexis Menard (darktears) 2011-05-05 08:13:27 PDT
Created attachment 92415 [details]
Patch
Comment 6 Benjamin Poulain 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
Comment 7 Alexis Menard (darktears) 2011-05-05 08:44:59 PDT
Committed r85855: <http://trac.webkit.org/changeset/85855>
Comment 8 Alexis Menard (darktears) 2011-05-06 10:28:35 PDT
*** Bug 60357 has been marked as a duplicate of this bug. ***
Comment 9 Peter Varga 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.
Comment 10 Peter Varga 2011-05-30 02:45:32 PDT
Sorry for the spam. I miss read the lessThan condition...
Comment 11 vanboxem.ruben 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).
Comment 12 Andras Becsi 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).
Comment 13 Andras Becsi 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.