Diff
Modified: trunk/Source/WebKit/qt/ChangeLog (108785 => 108786)
--- trunk/Source/WebKit/qt/ChangeLog 2012-02-24 14:31:59 UTC (rev 108785)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-02-24 14:36:38 UTC (rev 108786)
@@ -1,3 +1,28 @@
+2012-02-24 Holger Hans Peter Freyther <[email protected]>
+
+ [Qt] Build fix. macro "QSKIP" now only takes 1 argument on Qt5
+ https://bugs.webkit.org/show_bug.cgi?id=79328
+
+ Reviewed by Csaba Osztrogonác.
+
+ Introduce an alternative QSKIP that can work with both Qt4
+ and Qt5 without adding #ifdef to each usage site.
+
+ * tests/benchmarks/loading/tst_loading.cpp:
+ (tst_Loading::load):
+ * tests/benchmarks/painting/tst_painting.cpp:
+ (tst_Painting::paint):
+ * tests/qdeclarativewebview/tst_qdeclarativewebview.cpp:
+ (tst_QDeclarativeWebView::elementAreaAt):
+ * tests/qwebframe/tst_qwebframe.cpp:
+ (tst_QWebFrame::setHtmlWithBaseURL):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::geolocationRequestJS):
+ (tst_QWebPage::loadHtml5Video):
+ (tst_QWebPage::screenshot):
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::reusePage):
+
2012-02-24 Shinya Kawanaka <[email protected]>
SpellCheckRequest needs to know the context where the spellcheck happened.
Modified: trunk/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp (108785 => 108786)
--- trunk/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp 2012-02-24 14:31:59 UTC (rev 108785)
+++ trunk/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp 2012-02-24 14:36:38 UTC (rev 108786)
@@ -25,28 +25,7 @@
#include <qwebview.h>
#include <qpainter.h>
-/**
- * Starts an event loop that runs until the given signal is received.
- Optionally the event loop
- * can return earlier on a timeout.
- *
- * \return \p true if the requested signal was received
- * \p false on timeout
- */
-static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)
-{
- QEventLoop loop;
- QObject::connect(obj, signal, &loop, SLOT(quit()));
- QTimer timer;
- QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
- if (timeout > 0) {
- QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
- timer.setSingleShot(true);
- timer.start(timeout);
- }
- loop.exec();
- return timeoutSpy.isEmpty();
-}
+#include "util.h"
class tst_Loading : public QObject
{
@@ -96,13 +75,13 @@
QFETCH(QUrl, url);
if (!m_manager.isOnline())
- QSKIP("This test requires an active network connection", SkipSingle);
+ W_QSKIP("This test requires an active network connection", SkipSingle);
QBENCHMARK {
m_view->load(url);
// really wait for loading, painting is in another test
- ::waitForSignal(m_view, SIGNAL(loadFinished(bool)));
+ ::waitForSignal(m_view, SIGNAL(loadFinished(bool)), 0);
}
}
Modified: trunk/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp (108785 => 108786)
--- trunk/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp 2012-02-24 14:31:59 UTC (rev 108785)
+++ trunk/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp 2012-02-24 14:36:38 UTC (rev 108786)
@@ -26,28 +26,7 @@
#include <qwebview.h>
#include <qpainter.h>
-/**
- * Starts an event loop that runs until the given signal is received.
- Optionally the event loop
- * can return earlier on a timeout.
- *
- * \return \p true if the requested signal was received
- * \p false on timeout
- */
-static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)
-{
- QEventLoop loop;
- QObject::connect(obj, signal, &loop, SLOT(quit()));
- QTimer timer;
- QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
- if (timeout > 0) {
- QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
- timer.setSingleShot(true);
- timer.start(timeout);
- }
- loop.exec();
- return timeoutSpy.isEmpty();
-}
+#include "util.h"
class tst_Painting : public QObject
{
@@ -96,10 +75,10 @@
QFETCH(QUrl, url);
if (!m_manager.isOnline())
- QSKIP("This test requires an active network connection", SkipSingle);
+ W_QSKIP("This test requires an active network connection", SkipSingle);
m_view->load(url);
- ::waitForSignal(m_view, SIGNAL(loadFinished(bool)));
+ ::waitForSignal(m_view, SIGNAL(loadFinished(bool)), 0);
/* force a layout */
QWebFrame* mainFrame = m_page->mainFrame();
@@ -116,7 +95,7 @@
void tst_Painting::textAreas()
{
m_view->load(QUrl("data:text/html;<html><body></body></html>"));
- ::waitForSignal(m_view, SIGNAL(loadFinished(bool)));
+ ::waitForSignal(m_view, SIGNAL(loadFinished(bool)), 0);
QWebElement bodyElement = m_page->mainFrame()->findFirstElement("body");
Modified: trunk/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp (108785 => 108786)
--- trunk/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp 2012-02-24 14:31:59 UTC (rev 108785)
+++ trunk/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp 2012-02-24 14:36:38 UTC (rev 108786)
@@ -139,7 +139,7 @@
void tst_QDeclarativeWebView::elementAreaAt()
{
- QSKIP("This test should be changed to test 'heuristicZoom' instead.", SkipAll);
+ W_QSKIP("This test should be changed to test 'heuristicZoom' instead.", SkipAll);
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, QUrl("qrc:///resources/elements.qml"));
checkNoErrors(component);
Modified: trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp (108785 => 108786)
--- trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp 2012-02-24 14:31:59 UTC (rev 108785)
+++ trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp 2012-02-24 14:36:38 UTC (rev 108786)
@@ -2555,7 +2555,7 @@
// As we are using a local file as baseUrl, its security origin should be able to load local resources.
if (!QDir(TESTS_SOURCE_DIR).exists())
- QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
+ W_QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
QDir::setCurrent(TESTS_SOURCE_DIR);
Modified: trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp (108785 => 108786)
--- trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp 2012-02-24 14:31:59 UTC (rev 108785)
+++ trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp 2012-02-24 14:36:38 UTC (rev 108786)
@@ -305,7 +305,7 @@
if (newPage->mainFrame()->evaluateJavaScript(QLatin1String("!navigator.geolocation")).toBool()) {
delete newPage;
- QSKIP("Geolocation is not supported.", SkipSingle);
+ W_QSKIP("Geolocation is not supported.", SkipSingle);
}
connect(newPage, SIGNAL(featurePermissionRequested(QWebFrame*, QWebPage::Feature)),
@@ -535,7 +535,7 @@
QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65452", Continue);
QCOMPARE(mUrl.toEncoded(), url);
#else
- QSKIP("This test requires Qt Multimedia", SkipAll);
+ W_QSKIP("This test requires Qt Multimedia", SkipAll);
#endif
}
@@ -2744,7 +2744,7 @@
void tst_QWebPage::screenshot()
{
if (!QDir(TESTS_SOURCE_DIR).exists())
- QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
+ W_QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
QDir::setCurrent(TESTS_SOURCE_DIR);
Modified: trunk/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp (108785 => 108786)
--- trunk/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp 2012-02-24 14:31:59 UTC (rev 108785)
+++ trunk/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp 2012-02-24 14:36:38 UTC (rev 108786)
@@ -133,7 +133,7 @@
void tst_QWebView::reusePage()
{
if (!QDir(TESTS_SOURCE_DIR).exists())
- QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
+ W_QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
QDir::setCurrent(TESTS_SOURCE_DIR);
Modified: trunk/Source/WebKit/qt/tests/util.h (108785 => 108786)
--- trunk/Source/WebKit/qt/tests/util.h 2012-02-24 14:31:59 UTC (rev 108785)
+++ trunk/Source/WebKit/qt/tests/util.h 2012-02-24 14:36:38 UTC (rev 108786)
@@ -77,4 +77,9 @@
} \
QCOMPARE(__expr, __expected); \
} while(0)
+
+// Compatibility for Qt5
+#define W_QSKIP(a, b) QSKIP(a, b)
+#else
+#define W_QSKIP(a, b) QSKIP(a)
#endif