Bug 75964 - [Qt][WK2] Fix the build for newer Qt5
Summary: [Qt][WK2] Fix the build for newer Qt5
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Rafael Brandao
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2012-01-10 07:57 PST by Csaba Osztrogonác
Modified: 2012-01-11 10:37 PST (History)
4 users (show)

See Also:


Attachments
Patch (15.21 KB, patch)
2012-01-10 11:47 PST, Rafael Brandao
hausmann: review+
hausmann: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2012-01-10 07:57:36 PST
https://bugreports.qt.nokia.com/browse/QTBUG-22750 
removed QHttp and it causes build error: 
/home/oszi/WebKit/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp:30:23: error: QHttpHeader: No such file or directory
/home/oszi/WebKit/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp:31:30: error: QHttpRequestHeader: No such file or directory
/home/oszi/WebKit/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp:32:31: error: QHttpResponseHeader: No such file or directory
/home/oszi/WebKit/Source/WebKit/qt/Api/qwebpage.cpp:128:30: error: QHttpRequestHeader: No such file or directory

It needs to be fixed with updating Qt5 on friday.
Comment 1 Simon Hausmann 2012-01-10 08:03:22 PST
Rafael, I heard you're working on this. Is this correct?

Do you have an estimate? Or would you like us to temporarily disable the inspectorserver code for Qt 5 for the time being?
Comment 2 Rafael Brandao 2012-01-10 08:04:19 PST
(In reply to comment #1)
> Rafael, I heard you're working on this. Is this correct?
> 
> Do you have an estimate? Or would you like us to temporarily disable the inspectorserver code for Qt 5 for the time being?

I'm on the way to fix this, I believe it won't take much time. I'm just moving code from there, but not everything (just the essentials).
Comment 3 Simon Hausmann 2012-01-10 08:11:50 PST
Excellent, thanks :)
Comment 4 Rafael Brandao 2012-01-10 11:47:48 PST
Created attachment 121880 [details]
Patch
Comment 5 Rafael Brandao 2012-01-10 11:54:08 PST
Comment on attachment 121880 [details]
Patch

I was not sure about where to put this new code, so I've put among the API stuff (WebCoreSupport doesn't fit to these guys). We didn't need everything from QHttp module that was removed, so I've kept only what was essential and did some small changes on it to fit on our style and to not depend on other classes. I was testing this with our current working Qt hash with these classes named differently and it worked. But I've also tried to build the new Qt hash but I couldn't, I've got the following error:

In file included from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/qv8_p.h:1:0,
                 from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/../../../../../src/declarative/qml/ftw/qhashedstring_p.h:58,
                 from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/qhashedstring_p.h:1,
                 from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/../../../../../src/declarative/qml/ftw/qfastmetabuilder_p.h:60,
                 from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/qfastmetabuilder_p.h:1,
                 from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/../../../../../src/declarative/qml/qdeclarativescript_p.h:59,
                 from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/../../../../../src/declarative/qml/qdeclarativecustomparser_p.h:58,
                 from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/qdeclarativecustomparser_p.h:1,
                 from qml/qdeclarativelistmodel_p.h:46,
                 from qml/qdeclarativelistmodel_p_p.h:56,
                 from qml/qdeclarativelistmodel.cpp:42:
../../include/QtDeclarative/5.0.0/QtDeclarative/private/../../../../../src/declarative/qml/v8/qv8_p.h:42:24: fatal error: private/v8.h: No such file or directory
compilation terminated.

Ossy could you tell me how did you build (or even better, could you attach your current build script)? I would like to make sure this is working before it lands (or someone else could check it?). I'm in a hurry right now, so I'll see this tomorrow.
Comment 6 Simon Hausmann 2012-01-11 00:27:03 PST
CC'ing Jocelyn also, because he was working on moving this code around. I suspect the header parsing may not be needed anymore in the future. It's rather simple to replace with hand-written code. But for the time being I believe we need this fix to move forward with Qt 5 development (it's a build fix).
Comment 7 Simon Hausmann 2012-01-11 00:27:16 PST
Comment on attachment 121880 [details]
Patch

r=me but I'll place the classes into a namespace when landing to avoid clashes when building against Qt versions that _do_ have these classes (Qt 4 and older Qt 5 versions, like the one we're currently pinned to).
Comment 8 Simon Hausmann 2012-01-11 00:44:15 PST
(In reply to comment #5)
> (From update of attachment 121880 [details])
> I was not sure about where to put this new code, so I've put among the API stuff (WebCoreSupport doesn't fit to these guys). We didn't need everything from QHttp module that was removed, so I've kept only what was essential and did some small changes on it to fit on our style and to not depend on other classes. I was testing this with our current working Qt hash with these classes named differently and it worked. But I've also tried to build the new Qt hash but I couldn't, I've got the following error:
> 
> In file included from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/qv8_p.h:1:0,
>                  from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/../../../../../src/declarative/qml/ftw/qhashedstring_p.h:58,
>                  from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/qhashedstring_p.h:1,
>                  from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/../../../../../src/declarative/qml/ftw/qfastmetabuilder_p.h:60,
>                  from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/qfastmetabuilder_p.h:1,
>                  from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/../../../../../src/declarative/qml/qdeclarativescript_p.h:59,
>                  from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/../../../../../src/declarative/qml/qdeclarativecustomparser_p.h:58,
>                  from ../../include/QtDeclarative/5.0.0/QtDeclarative/private/qdeclarativecustomparser_p.h:1,
>                  from qml/qdeclarativelistmodel_p.h:46,
>                  from qml/qdeclarativelistmodel_p_p.h:56,
>                  from qml/qdeclarativelistmodel.cpp:42:
> ../../include/QtDeclarative/5.0.0/QtDeclarative/private/../../../../../src/declarative/qml/v8/qv8_p.h:42:24: fatal error: private/v8.h: No such file or directory
> compilation terminated.
> 
> Ossy could you tell me how did you build (or even better, could you attach your current build script)? I would like to make sure this is working before it lands (or someone else could check it?). I'm in a hurry right now, so I'll see this tomorrow.

See the qt development list, V8 has been moved out of qtbase and into its own top-level Qt 5 module called qtjsbackend that needs to be built before qtdeclarative.
Comment 9 Simon Hausmann 2012-01-11 01:03:08 PST
Committed r104680: <http://trac.webkit.org/changeset/104680>
Comment 10 Rafael Brandao 2012-01-11 10:37:57 PST
(In reply to comment #7)
> (From update of attachment 121880 [details])
> r=me but I'll place the classes into a namespace when landing to avoid clashes when building against Qt versions that _do_ have these classes (Qt 4 and older Qt 5 versions, like the one we're currently pinned to).

Ok, thanks!