Changeset 125377 in webkit


Ignore:
Timestamp:
Aug 12, 2012 9:52:54 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Qt] Make it possible to build without QtTest/QtPrintSupport
https://bugs.webkit.org/show_bug.cgi?id=93492

Patch by Loïc Yhuel <loic.yhuel@softathome.com> on 2012-08-12
Reviewed by Tor Arne Vestbø.

.:

  • Source/QtWebKit.pro: Disable tests if no testlib

Source/WebKit:

  • WebKit1.pri: Optional printsupport

Source/WebKit/qt:

  • Api/qwebframe.cpp:

(QWebFrame::print): Does nothing if no printsupport

  • Api/qwebview.cpp:

(QWebView::print): Does nothing if no printsupport

Tools:

  • DumpRenderTree/qt/DumpRenderTree.pro: Optional printsupport
  • DumpRenderTree/qt/DumpRenderTreeQt.cpp:

(WebCore):
(WebCore::DumpRenderTree::dryRunPrint): Does nothing if no printsupport

  • QtTestBrowser/QtTestBrowser.pro: Optional printsupport
  • QtTestBrowser/launcherwindow.cpp:

(LauncherWindow::createChrome): No print menu if no printsupport
(LauncherWindow::print): Does nothing if no printsupport

  • QtTestBrowser/launcherwindow.h:
  • Tools.pro: Disable DRT/WTR if QtTest not present
  • qmake/mkspecs/features/default_pre.prf: printsupport no more mandatory
  • qmake/mkspecs/features/features.prf: Qt module availability tests
Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r125322 r125377  
     12012-08-12  Loïc Yhuel  <loic.yhuel@softathome.com>
     2
     3        [Qt] Make it possible to build without QtTest/QtPrintSupport
     4        https://bugs.webkit.org/show_bug.cgi?id=93492
     5
     6        Reviewed by Tor Arne Vestbø.
     7
     8        * Source/QtWebKit.pro: Disable tests if no testlib
     9
    1102012-08-10  Rob Buis  <rbuis@rim.com>
    211
  • trunk/Source/QtWebKit.pro

    r124889 r125377  
    2727
    2828!no_webkit1 {
    29     tests.file = tests.pri
    30     SUBDIRS += tests
     29    contains(DEFINES, HAVE_QTTESTLIB=1) {
     30        tests.file = tests.pri
     31        SUBDIRS += tests
     32    }
    3133
    3234    examples.file = WebKit/qt/examples/examples.pro
  • trunk/Source/WebKit/ChangeLog

    r125349 r125377  
     12012-08-12  Loïc Yhuel  <loic.yhuel@softathome.com>
     2
     3        [Qt] Make it possible to build without QtTest/QtPrintSupport
     4        https://bugs.webkit.org/show_bug.cgi?id=93492
     5
     6        Reviewed by Tor Arne Vestbø.
     7
     8        * WebKit1.pri: Optional printsupport
     9
    1102012-08-10  Joshua Netterfield  <jnetterfield@rim.com>
    211
  • trunk/Source/WebKit/WebKit1.pri

    r124889 r125377  
    4040plugin_backend_xlib: PKGCONFIG += x11
    4141
    42 QT += network widgets printsupport
     42QT += network widgets
    4343contains(DEFINES, HAVE_QTQUICK=1): QT += quick
     44contains(DEFINES, HAVE_QTPRINTSUPPORT=1): QT += printsupport
    4445
    4546contains(DEFINES, WTF_USE_TEXTURE_MAPPER_GL=1)|contains(DEFINES, ENABLE_WEBGL=1) {
  • trunk/Source/WebKit/qt/Api/qwebframe.cpp

    r125253 r125377  
    9494#include <qfileinfo.h>
    9595#include <qpainter.h>
     96#if HAVE(QTPRINTSUPPORT)
    9697#include <qprinter.h>
     98#endif
    9799#include <qregion.h>
    98100#include <qnetworkrequest.h>
     
    14281430void QWebFrame::print(QPrinter *printer) const
    14291431{
     1432#if HAVE(QTPRINTSUPPORT)
    14301433    QPainter painter;
    14311434    if (!painter.begin(printer))
     
    15151518
    15161519    printContext.end();
     1520#endif // HAVE(PRINTSUPPORT)
    15171521}
    15181522#endif // QT_NO_PRINTER
  • trunk/Source/WebKit/qt/Api/qwebview.cpp

    r124879 r125377  
    3131#include "qevent.h"
    3232#include "qpainter.h"
     33#if HAVE(QTPRINTSUPPORT)
    3334#include "qprinter.h"
     35#endif
    3436#include "qdir.h"
    3537#include "qfile.h"
     
    747749void QWebView::print(QPrinter *printer) const
    748750{
    749 #ifndef QT_NO_PRINTER
     751#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
    750752    page()->mainFrame()->print(printer);
    751753#endif
  • trunk/Source/WebKit/qt/ChangeLog

    r125352 r125377  
     12012-08-12  Loïc Yhuel  <loic.yhuel@softathome.com>
     2
     3        [Qt] Make it possible to build without QtTest/QtPrintSupport
     4        https://bugs.webkit.org/show_bug.cgi?id=93492
     5
     6        Reviewed by Tor Arne Vestbø.
     7
     8        * Api/qwebframe.cpp:
     9        (QWebFrame::print): Does nothing if no printsupport
     10        * Api/qwebview.cpp:
     11        (QWebView::print): Does nothing if no printsupport
     12
    1132012-08-11  Pierre Rossi  <pierre.rossi@gmail.com>
    214
  • trunk/Tools/ChangeLog

    r125372 r125377  
     12012-08-12  Loïc Yhuel  <loic.yhuel@softathome.com>
     2
     3        [Qt] Make it possible to build without QtTest/QtPrintSupport
     4        https://bugs.webkit.org/show_bug.cgi?id=93492
     5
     6        Reviewed by Tor Arne Vestbø.
     7
     8        * DumpRenderTree/qt/DumpRenderTree.pro: Optional printsupport
     9        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     10        (WebCore):
     11        (WebCore::DumpRenderTree::dryRunPrint): Does nothing if no printsupport
     12        * QtTestBrowser/QtTestBrowser.pro: Optional printsupport
     13        * QtTestBrowser/launcherwindow.cpp:
     14        (LauncherWindow::createChrome): No print menu if no printsupport
     15        (LauncherWindow::print): Does nothing if no printsupport
     16        * QtTestBrowser/launcherwindow.h:
     17        * Tools.pro: Disable DRT/WTR if QtTest not present
     18        * qmake/mkspecs/features/default_pre.prf: printsupport no more mandatory
     19        * qmake/mkspecs/features/features.prf: Qt module availability tests
     20
    1212012-08-12  Csaba Osztrogonác  <ossy@webkit.org>
    222
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro

    r124879 r125377  
    1919    $${ROOT_WEBKIT_DIR}/Source/WTF
    2020
    21 QT = core gui network testlib webkit widgets printsupport
     21QT = core gui network testlib webkit widgets
     22contains(DEFINES, HAVE_QTPRINTSUPPORT=1): QT += printsupport
    2223macx: QT += xml
    2324
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r124705 r125377  
    5858#include <QPaintDevice>
    5959#include <QPaintEngine>
    60 #ifndef QT_NO_PRINTER
     60#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
    6161#include <QPrinter>
    6262#endif
     
    111111
    112112
    113 #ifndef QT_NO_PRINTER
     113#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
    114114class NullPrinter : public QPrinter {
    115115public:
     
    501501void DumpRenderTree::dryRunPrint(QWebFrame* frame)
    502502{
    503 #ifndef QT_NO_PRINTER
     503#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
    504504    NullPrinter printer;
    505505    frame->print(&printer);
  • trunk/Tools/QtTestBrowser/QtTestBrowser.pro

    r124879 r125377  
    4343DESTDIR = $$ROOT_BUILD_DIR/bin
    4444
    45 QT += network webkit printsupport widgets
     45QT += network webkit widgets
     46contains(DEFINES, HAVE_QTPRINTSUPPORT=1): QT += printsupport
    4647
    4748macx:QT += xml
  • trunk/Tools/QtTestBrowser/launcherwindow.cpp

    r124879 r125377  
    5252#include <QMenuBar>
    5353#endif
     54#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
     55#include <QPrintPreviewDialog>
     56#endif
    5457#include <QSlider>
    5558#include <QSplitter>
     
    238241    fileMenu->addSeparator();
    239242    fileMenu->addAction("Take Screen Shot...", this, SLOT(screenshot()));
    240 #ifndef QT_NO_PRINTER
     243#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
    241244    fileMenu->addAction(tr("Print..."), this, SLOT(print()), QKeySequence::Print);
    242245#endif
     
    725728void LauncherWindow::print()
    726729{
    727 #if !defined(QT_NO_PRINTER)
     730#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
    728731    QPrintPreviewDialog dlg(this);
    729732    connect(&dlg, SIGNAL(paintRequested(QPrinter*)),
  • trunk/Tools/QtTestBrowser/launcherwindow.h

    r123456 r125377  
    4040#endif
    4141
    42 #if !defined(QT_NO_PRINTER)
    43 #include <QPrintPreviewDialog>
    44 #endif
    45 
    4642#include <QDebug>
    4743
  • trunk/Tools/Tools.pro

    r124889 r125377  
    1010!no_webkit1 {
    1111    SUBDIRS += QtTestBrowser/QtTestBrowser.pro
    12     SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
     12    contains(DEFINES, HAVE_QTTESTLIB=1): SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
    1313    SUBDIRS += DumpRenderTree/qt/ImageDiff.pro
    1414}
     
    1616!no_webkit2 {
    1717    # WTR's InjectedBundle depends currently on WK1's DumpRenderTreeSupport
    18     !no_webkit1:contains(DEFINES, HAVE_QTQUICK=1): SUBDIRS += WebKitTestRunner/WebKitTestRunner.pro
     18    !no_webkit1:contains(DEFINES, HAVE_QTQUICK=1):contains(DEFINES, HAVE_QTTESTLIB=1): SUBDIRS += WebKitTestRunner/WebKitTestRunner.pro
    1919
    2020    contains(DEFINES, HAVE_QTQUICK=1): SUBDIRS += MiniBrowser/qt/MiniBrowser.pro
  • trunk/Tools/qmake/mkspecs/features/default_pre.prf

    r124879 r125377  
    7979!haveQt(5):!recursive_include: error("Building WebKit with Qt versions older than 5.0 is not supported.")
    8080
    81 !haveQtModule(widgets)|!haveQtModule(printsupport) {
    82     root_project_file: message("WebKit1 requires the QtWidgets and QtPrintSupport modules. Disabling WebKit1.")
     81!haveQtModule(widgets) {
     82    root_project_file: message("WebKit1 requires the QtWidgets module. Disabling WebKit1.")
    8383    CONFIG += no_webkit1
    8484}
  • trunk/Tools/qmake/mkspecs/features/features.prf

    r125039 r125377  
    4747!contains(DEFINES, HAVE_QTQUICK=.) {
    4848    haveQtModule(quick): DEFINES += HAVE_QTQUICK=1
     49}
     50
     51!contains(DEFINES, HAVE_QTPRINTSUPPORT=.) {
     52    haveQtModule(printsupport): DEFINES += HAVE_QTPRINTSUPPORT=1
     53}
     54
     55!contains(DEFINES, HAVE_QTTESTLIB=.) {
     56    haveQtModule(testlib) {
     57        DEFINES += HAVE_QTTESTLIB=1
     58    } else {
     59        message("Missing QtTest module, disabling DumpRenderTree, WebKitTestRunner and tests")
     60    }
    4961}
    5062
Note: See TracChangeset for help on using the changeset viewer.