Bug 89449 - [Qt] Buildfix for newer Qt5
Summary: [Qt] Buildfix for newer Qt5
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Blocker
Assignee: Csaba Osztrogonác
URL:
Keywords: Qt, QtTriaged
: 89029 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-19 02:38 PDT by Csaba Osztrogonác
Modified: 2012-06-19 04:35 PDT (History)
7 users (show)

See Also:


Attachments
Patch (8.62 KB, patch)
2012-06-19 02:45 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
Patch (10.17 KB, patch)
2012-06-19 03:56 PDT, Csaba Osztrogonác
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 2012-06-19 02:38:28 PDT
After ee7fa67eb0060b9c794bae4c7b06110c3b9626e0 in qtbase, QWeakPointer 
is deprecated, we should use QPointer instead of QWeakPointer.

Patch is coming soon.
Comment 1 Csaba Osztrogonác 2012-06-19 02:45:59 PDT
Created attachment 148296 [details]
Patch
Comment 2 Simon Hausmann 2012-06-19 03:01:12 PDT
Comment on attachment 148296 [details]
Patch

r=me. this is safe to land even before the update.
Comment 3 Early Warning System Bot 2012-06-19 03:24:30 PDT
Comment on attachment 148296 [details]
Patch

Attachment 148296 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/12973661
Comment 4 Csaba Osztrogonác 2012-06-19 03:26:39 PDT
Comment on attachment 148296 [details]
Patch

We need ifdef guards for Qt 4.8 build. :-/
Comment 5 Simon Hausmann 2012-06-19 03:32:27 PDT
(In reply to comment #4)
> (From update of attachment 148296 [details])
> We need ifdef guards for Qt 4.8 build. :-/

I think it would be easier to change the calls to clear() with a null pointer assignment, i.e.

    foopointer.clear();

with

    foopointer = 0;

and thus avoid the #ifdefs.
Comment 6 Csaba Osztrogonác 2012-06-19 03:33:56 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 148296 [details] [details])
> > We need ifdef guards for Qt 4.8 build. :-/
> 
> I think it would be easier to change the calls to clear() with a null pointer assignment, i.e.
> 
>     foopointer.clear();
> 
> with
> 
>     foopointer = 0;
> 
> and thus avoid the #ifdefs.

let me check and fix it
Comment 7 Andras Becsi 2012-06-19 03:43:26 PDT
*** Bug 89029 has been marked as a duplicate of this bug. ***
Comment 8 Andras Becsi 2012-06-19 03:45:25 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > (From update of attachment 148296 [details] [details] [details])
> > > We need ifdef guards for Qt 4.8 build. :-/
> > 
> > I think it would be easier to change the calls to clear() with a null pointer assignment, i.e.
> > 
> >     foopointer.clear();
> > 
> > with
> > 
> >     foopointer = 0;
> > 
> > and thus avoid the #ifdefs.
> 
> let me check and fix it

I think there is a fix in qtbase for the clear() function in a newer hash, it just did not make it to the supermodule yet.
Comment 9 Csaba Osztrogonác 2012-06-19 03:49:40 PDT
(In reply to comment #8)
> I think there is a fix in qtbase for the clear() function in a newer hash, it just did not make it to the supermodule yet.

The latest Qt5 hash contains QPointer.clear(), but Qt 4.8's QPointer() doesn't.
Comment 10 Csaba Osztrogonác 2012-06-19 03:56:58 PDT
Created attachment 148308 [details]
Patch

Use zero assignment instead of QPointer.clear(), because Qt4's QPointer class doesn't have clear method.
Comment 11 Csaba Osztrogonác 2012-06-19 04:35:21 PDT
Comment on attachment 148308 [details]
Patch

Landed in http://trac.webkit.org/changeset/120704