Bug 93492 - [Qt] Make it possible to build without QtTest/QtPrintSuport
Summary: [Qt] Make it possible to build without QtTest/QtPrintSuport
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: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-08 09:51 PDT by Loïc Yhuel
Modified: 2012-08-12 09:53 PDT (History)
5 users (show)

See Also:


Attachments
Patch (12.14 KB, patch)
2012-08-08 10:04 PDT, Loïc Yhuel
no flags Details | Formatted Diff | Diff
Patch (12.36 KB, patch)
2012-08-12 07:44 PDT, Loïc Yhuel
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Yhuel 2012-08-08 09:51:40 PDT
[Qt] Make it possible to build without QtTest/QtPrintSuport
Comment 1 Loïc Yhuel 2012-08-08 10:04:02 PDT
Created attachment 157241 [details]
Patch
Comment 2 Tor Arne Vestbø 2012-08-08 17:42:02 PDT
Comment on attachment 157241 [details]
Patch

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

> Tools/QtTestBrowser/launcherwindow.cpp:727
> +#if !defined(QT_NO_PRINTER) && defined(HAVE_QTPRINTSUPPORT) && HAVE_QTPRINTSUPPORT

Why not just HAVE(QPRINTSUPPORT)?

> Tools/Tools.pro:12
> +    contains(DEFINES, HAVE_QTTESTLIB=1): SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro

I'd like some sort of warning here, like in default_pre, that we're disabling DRT due to missing testlib.
Comment 3 Loïc Yhuel 2012-08-09 11:26:20 PDT
(In reply to comment #2)
> (From update of attachment 157241 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=157241&action=review
> 
> > Tools/QtTestBrowser/launcherwindow.cpp:727
> > +#if !defined(QT_NO_PRINTER) && defined(HAVE_QTPRINTSUPPORT) && HAVE_QTPRINTSUPPORT
> 
> Why not just HAVE(QPRINTSUPPORT)?
It was a copy-paste of what I did in launcherwindow.h, where HAVE() macro is not defined. But in fact, the code in the header can be moved to the cpp.
> 
> > Tools/Tools.pro:12
> > +    contains(DEFINES, HAVE_QTTESTLIB=1): SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
> 
> I'd like some sort of warning here, like in default_pre, that we're disabling DRT due to missing testlib.
Only for DRT, or WTR and tests too ?
Comment 4 Simon Hausmann 2012-08-09 22:26:24 PDT
Comment on attachment 157241 [details]
Patch

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

> Source/WebKit/qt/Api/qwebframe.cpp:1468
> +#if HAVE(QTPRINTSUPPORT)

I think here and in the other function it might be good to have an

    #else
    UNUSED_PARAM(printer)
    #endif

or the like, to avoid a compiler warning.
Comment 5 Loïc Yhuel 2012-08-10 00:46:36 PDT
(In reply to comment #4)
> (From update of attachment 157241 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=157241&action=review
> 
> > Source/WebKit/qt/Api/qwebframe.cpp:1468
> > +#if HAVE(QTPRINTSUPPORT)
> 
> I think here and in the other function it might be good to have an
> 
>     #else
>     UNUSED_PARAM(printer)
>     #endif
> 
> or the like, to avoid a compiler warning.

There is no warning since -Wno-unused-parameter is added to QMAKE_CXXFLAGS in default_post.prf.
Comment 6 Simon Hausmann 2012-08-12 02:19:20 PDT
Comment on attachment 157241 [details]
Patch

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

>>> Source/WebKit/qt/Api/qwebframe.cpp:1468
>>> +#if HAVE(QTPRINTSUPPORT)
>> 
>> I think here and in the other function it might be good to have an
>> 
>>     #else
>>     UNUSED_PARAM(printer)
>>     #endif
>> 
>> or the like, to avoid a compiler warning.
> 
> There is no warning since -Wno-unused-parameter is added to QMAKE_CXXFLAGS in default_post.prf.

Ok

>>> Tools/Tools.pro:12
>>> +    contains(DEFINES, HAVE_QTTESTLIB=1): SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
>> 
>> I'd like some sort of warning here, like in default_pre, that we're disabling DRT due to missing testlib.
> 
> Only for DRT, or WTR and tests too ?

All three of them I'd say, or more generally - if done in default_pre.prf like suggested - visible early when WebKit.pro is parsed.
Comment 7 Loïc Yhuel 2012-08-12 07:42:10 PDT
(In reply to comment #6)
> >>> Tools/Tools.pro:12
> >>> +    contains(DEFINES, HAVE_QTTESTLIB=1): SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
> >> 
> >> I'd like some sort of warning here, like in default_pre, that we're disabling DRT due to missing testlib.
> > 
> > Only for DRT, or WTR and tests too ?
> 
> All three of them I'd say, or more generally - if done in default_pre.prf like suggested - visible early when WebKit.pro is parsed.

I added it in features.prf, to have the message and test at the same place. It's printed in configure step, just after pkg-config tests. Tell me if you prefer to have it in default_pre.prf instead.
Comment 8 Loïc Yhuel 2012-08-12 07:44:37 PDT
Created attachment 157900 [details]
Patch
Comment 9 WebKit Review Bot 2012-08-12 09:53:09 PDT
Comment on attachment 157900 [details]
Patch

Clearing flags on attachment: 157900

Committed r125377: <http://trac.webkit.org/changeset/125377>
Comment 10 WebKit Review Bot 2012-08-12 09:53:14 PDT
All reviewed patches have been landed.  Closing bug.