Title: [104558] trunk/Tools
Revision
104558
Author
[email protected]
Date
2012-01-10 05:34:08 -0800 (Tue, 10 Jan 2012)

Log Message

[Qt] Remove dependency to uitools
https://bugs.webkit.org/show_bug.cgi?id=75952

Reviewed by Tor Arne Vestbø.

QUiLoader is used for creating QLabel/QProgressBar widgets for
a layout test, to verify some widget embedding feature. Unfortunately
in Qt 5, QUiLoader is part of qttools, which depends on webkit, which
depends on qttools. Since we don't really _need_ QUiLoader for our tests,
let's break the circular dependency.

* DumpRenderTree/qt/DumpRenderTree.pro:
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::WebPage::createPlugin):
* QtTestBrowser/QtTestBrowser.pro:
* QtTestBrowser/launcherwindow.h:
* QtTestBrowser/webpage.cpp:
(WebPage::createPlugin):
* qmake/mkspecs/features/minimal_qt.prf:
* qmake/mkspecs/features/uitools.prf: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Tools/ChangeLog (104557 => 104558)


--- trunk/Tools/ChangeLog	2012-01-10 13:25:27 UTC (rev 104557)
+++ trunk/Tools/ChangeLog	2012-01-10 13:34:08 UTC (rev 104558)
@@ -1,3 +1,26 @@
+2012-01-10  Simon Hausmann  <[email protected]>
+
+        [Qt] Remove dependency to uitools
+        https://bugs.webkit.org/show_bug.cgi?id=75952
+
+        Reviewed by Tor Arne Vestbø.
+
+        QUiLoader is used for creating QLabel/QProgressBar widgets for
+        a layout test, to verify some widget embedding feature. Unfortunately
+        in Qt 5, QUiLoader is part of qttools, which depends on webkit, which
+        depends on qttools. Since we don't really _need_ QUiLoader for our tests,
+        let's break the circular dependency.
+
+        * DumpRenderTree/qt/DumpRenderTree.pro:
+        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+        (WebCore::WebPage::createPlugin):
+        * QtTestBrowser/QtTestBrowser.pro:
+        * QtTestBrowser/launcherwindow.h:
+        * QtTestBrowser/webpage.cpp:
+        (WebPage::createPlugin):
+        * qmake/mkspecs/features/minimal_qt.prf:
+        * qmake/mkspecs/features/uitools.prf: Removed.
+
 2012-01-10  Alexander Færøy  <[email protected]>
 
         [Qt] Don't expose m_windowOptions as part of the public interface in MiniBrowserApplication

Modified: trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro (104557 => 104558)


--- trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro	2012-01-10 13:25:27 UTC (rev 104557)
+++ trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro	2012-01-10 13:34:08 UTC (rev 104558)
@@ -10,7 +10,6 @@
 DESTDIR = $$ROOT_BUILD_DIR/bin
 
 load(features)
-CONFIG += uitools
 
 WEBKIT += wtf webcore
 

Modified: trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp (104557 => 104558)


--- trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp	2012-01-10 13:25:27 UTC (rev 104557)
+++ trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp	2012-01-10 13:34:08 UTC (rev 104558)
@@ -49,6 +49,7 @@
 #include <QFileInfo>
 #include <QFocusEvent>
 #include <QFontDatabase>
+#include <QLabel>
 #include <QLocale>
 #include <QNetworkAccessManager>
 #include <QNetworkReply>
@@ -58,16 +59,13 @@
 #ifndef QT_NO_PRINTER
 #include <QPrinter>
 #endif
+#include <QProgressBar>
 #include <QUndoStack>
 #include <QUrl>
 
 #include <qwebsettings.h>
 #include <qwebsecurityorigin.h>
 
-#ifndef QT_NO_UITOOLS
-#include <QtUiTools/QUiLoader>
-#endif
-
 #if HAVE(FONTCONFIG)
 #include <fontconfig/fontconfig.h>
 #endif
@@ -363,13 +361,13 @@
     Q_UNUSED(url);
     Q_UNUSED(paramNames);
     Q_UNUSED(paramValues);
-#ifndef QT_NO_UITOOLS
-    QUiLoader loader;
-    return loader.createWidget(classId, view());
-#else
-    Q_UNUSED(classId);
+
+    if (classId == QLatin1String("QProgressBar"))
+        return new QProgressBar(view());
+    if (classId == QLatin1String("QLabel"))
+        return new QLabel(view());
+
     return 0;
-#endif
 }
 
 void WebPage::setViewGeometry(const QRect& rect)

Modified: trunk/Tools/QtTestBrowser/QtTestBrowser.pro (104557 => 104558)


--- trunk/Tools/QtTestBrowser/QtTestBrowser.pro	2012-01-10 13:25:27 UTC (rev 104557)
+++ trunk/Tools/QtTestBrowser/QtTestBrowser.pro	2012-01-10 13:34:08 UTC (rev 104558)
@@ -35,8 +35,6 @@
     cookiejar.h
 
 
-CONFIG += uitools
-
 WEBKIT += webcore
 
 CONFIG += qtwebkit

Modified: trunk/Tools/QtTestBrowser/launcherwindow.h (104557 => 104558)


--- trunk/Tools/QtTestBrowser/launcherwindow.h	2012-01-10 13:25:27 UTC (rev 104557)
+++ trunk/Tools/QtTestBrowser/launcherwindow.h	2012-01-10 13:34:08 UTC (rev 104558)
@@ -43,10 +43,6 @@
 #include <QPrintPreviewDialog>
 #endif
 
-#ifndef QT_NO_UITOOLS
-#include <QtUiTools/QUiLoader>
-#endif
-
 #include <QDebug>
 
 #include <cstdio>

Modified: trunk/Tools/QtTestBrowser/webpage.cpp (104557 => 104558)


--- trunk/Tools/QtTestBrowser/webpage.cpp	2012-01-10 13:25:27 UTC (rev 104557)
+++ trunk/Tools/QtTestBrowser/webpage.cpp	2012-01-10 13:34:08 UTC (rev 104558)
@@ -47,6 +47,7 @@
 #ifndef QT_NO_LINEEDIT
 #include <QLineEdit>
 #endif
+#include <QProgressBar>
 #include <QtNetwork/QNetworkReply>
 #include <QtNetwork/QNetworkRequest>
 #include <QtNetwork/QNetworkProxy>
@@ -209,12 +210,10 @@
         return l;
     }
 
-#ifndef QT_NO_UITOOLS
-    QUiLoader loader;
-    return loader.createWidget(classId, view());
-#else
-    Q_UNUSED(classId);
+    if (classId == QLatin1String("QProgressBar"))
+        return new QProgressBar(view());
+    if (classId == QLatin1String("QLabel"))
+        return new QLabel(view());
     return 0;
-#endif
 }
 

Modified: trunk/Tools/qmake/mkspecs/features/minimal_qt.prf (104557 => 104558)


--- trunk/Tools/qmake/mkspecs/features/minimal_qt.prf	2012-01-10 13:25:27 UTC (rev 104557)
+++ trunk/Tools/qmake/mkspecs/features/minimal_qt.prf	2012-01-10 13:34:08 UTC (rev 104558)
@@ -27,7 +27,6 @@
     QT_NO_SYSTEMTRAYICON \
     QT_NO_TEMPORARYFILE \
     QT_NO_TOOLTIP \
-    QT_NO_UITOOLS \
     QT_NO_UNDOCOMMAND \
     QT_NO_UNDOSTACK \
     QT_NO_XRENDER

Deleted: trunk/Tools/qmake/mkspecs/features/uitools.prf (104557 => 104558)


--- trunk/Tools/qmake/mkspecs/features/uitools.prf	2012-01-10 13:25:27 UTC (rev 104557)
+++ trunk/Tools/qmake/mkspecs/features/uitools.prf	2012-01-10 13:34:08 UTC (rev 104558)
@@ -1,23 +0,0 @@
-# -------------------------------------------------------------------
-# This file ensures that QtUiTools is available before including the
-# feature.
-#
-# See 'Tools/qmake/README' for an overview of the build system
-# -------------------------------------------------------------------
-
-# Disable by default
-CONFIG -= uitools
-
-haveQt(5) {
-    !isEmpty(QT.uitools.name): CONFIG += uitools
-} else {
-    # 4.x
-    libraryName = $$fromfile($$[QT_INSTALL_LIBS]/libQtUiTools.prl, QMAKE_PRL_TARGET)
-    !isEmpty(libraryName):exists($$[QT_INSTALL_LIBS]/$$libraryName): CONFIG += uitools
-}
-
-CONFIG(uitools):load(uitools)
-else {
-    !build_pass: message("QtUiTools library not found. QWidget plugin loading will be disabled")
-    DEFINES *= QT_NO_UITOOLS
-}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to