Bug 53400 - [Qt][WK2]REGRESSION (r76991): Fix build errors
Summary: [Qt][WK2]REGRESSION (r76991): Fix build errors
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: Qt, QtTriaged
Depends on:
Blocks: 50174
  Show dependency treegraph
Reported: 2011-01-30 10:59 PST by Csaba Osztrogonác
Modified: 2011-01-30 12:25 PST (History)
5 users (show)

See Also:

Patch (3.40 KB, patch)
2011-01-30 11:58 PST, Balazs Kelemen
no flags 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 2011-01-30 10:59:15 PST
31	#ifdef __cplusplus 
32	#define new ("if you use new/delete make sure to include config.h at the top of the file"())  
33	#define delete ("if you use new/delete make sure to include config.h at the top of the file"())

This change caused build error in moc_qwkhistory.cpp and moc_qwkpage.cpp .
These files are generated from qwkhistory.h and qwkpage.h by Qt's moc and
they only inlcude its own header file.

To fix this build break I added including config.h to these headers:

I know we shouldn't include config.h in headers, but I don't know if it 
is possible to make moc add including config.h to moc_[...].cpp files.

I leave this bug open to find a correct solution for this build break.
Comment 1 Csaba Osztrogonác 2011-01-30 11:16:56 PST
Adding Source/JavascriptCore to INCLUDEPATH was needed,
because config.h includes 3 headears from wtf:
- wtf/FastMalloc.h
- wtf/DisallowCType.h
- wtf/Platform.h
Comment 2 Balazs Kelemen 2011-01-30 11:50:20 PST
The correct solution is to throw away the prefix header let trust in
ourselves and check-webkit-style to not forget about config.h.
This is our policy in WebCore and JavaScriptCore as well.
Comment 3 Balazs Kelemen 2011-01-30 11:58:37 PST
Created attachment 80597 [details]
Comment 4 Balazs Kelemen 2011-01-30 12:25:43 PST
Comment on attachment 80597 [details]

Clearing flags on attachment: 80597

Committed r77092: <http://trac.webkit.org/changeset/77092>
Comment 5 Balazs Kelemen 2011-01-30 12:25:50 PST
All reviewed patches have been landed.  Closing bug.