Bug 65410 - [Qt][WK2] Fix the build afer r92014
Summary: [Qt][WK2] Fix the build afer r92014
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Balazs Kelemen
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-07-30 04:38 PDT by Balazs Kelemen
Modified: 2011-07-30 10:40 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.65 KB, patch)
2011-07-30 04:40 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (1.95 KB, patch)
2011-07-30 10:32 PDT, 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 Balazs Kelemen 2011-07-30 04:38:16 PDT
The bug is in Qt. qwindowdefs.h should not define a typedef for such a popular word as Region.
The fix is indeed ugly and I hope it would be fixed in Qt soon.
Comment 1 Balazs Kelemen 2011-07-30 04:40:55 PDT
Created attachment 102432 [details]
Patch
Comment 2 Noam Rosenthal 2011-07-30 08:53:30 PDT
Comment on attachment 102432 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=102432&action=review

> Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp:38
> +// Fix for the intrusive typedef in qwindowdefs.h until it has been fixed in Qt.

Was a bug filed with Qt?

> Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp:40
> +#define Region WebCore::Region
> +#endif

Adding "using WebCore::Region" inside the "namespace WebKit" clause should do the trick as well.
In either case, I believe this problem is confined to X11, so let's #ifdef it.

#ifdef Q_WS_X11
using WebCore::Region;
#endif

seems a bit less intrusive than a new #define Region :)
Comment 3 Balazs Kelemen 2011-07-30 10:32:29 PDT
Created attachment 102437 [details]
Patch
Comment 4 Balazs Kelemen 2011-07-30 10:37:08 PDT
(In reply to comment #2)
> (From update of attachment 102432 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=102432&action=review
> 
> > Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp:38
> > +// Fix for the intrusive typedef in qwindowdefs.h until it has been fixed in Qt.
> 
> Was a bug filed with Qt?

Not yet.

> 
> > Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp:40
> > +#define Region WebCore::Region
> > +#endif
> 
> Adding "using WebCore::Region" inside the "namespace WebKit" clause should do the trick as well.

Good point.

> In either case, I believe this problem is confined to X11, so let's #ifdef it.
> 
> #ifdef Q_WS_X11
> using WebCore::Region;
> #endif
> 
> seems a bit less intrusive than a new #define Region :)

These suggestions had been incorporated into the new patch.
Comment 5 Balazs Kelemen 2011-07-30 10:39:54 PDT
Comment on attachment 102437 [details]
Patch

Clearing flags on attachment: 102437

Committed r92052: <http://trac.webkit.org/changeset/92052>
Comment 6 Balazs Kelemen 2011-07-30 10:40:03 PDT
All reviewed patches have been landed.  Closing bug.