From 6a3d26211c0686e19c81a20357f2a59fe2d4df44 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Wed, 15 Apr 2015 09:28:21 +0200 Subject: Fix compile warnings of QWebEnginePage widget auto test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I22a63075c66d263e4aebb6aea47e80d6ce08cb3c Reviewed-by: Adam Kallai Reviewed-by: Michael BrĂ¼ning Reviewed-by: Andras Becsi --- tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 970ebf20a..9562871b3 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -1661,6 +1661,7 @@ void tst_QWebEnginePage::inputMethods_data() QTest::newRow("QGraphicsWebView") << "QGraphicsWebView"; } +#if defined(QWEBENGINEPAGE_INPUTMETHODQUERY) static Qt::InputMethodHints inputMethodHints(QObject* object) { if (QGraphicsObject* o = qobject_cast(object)) @@ -1686,6 +1687,7 @@ static void clickOnPage(QWebEnginePage* page, const QPoint& position) QMouseEvent evrel(QEvent::MouseButtonRelease, position, Qt::LeftButton, Qt::NoButton, Qt::NoModifier); page->event(&evrel); } +#endif void tst_QWebEnginePage::inputMethods() { @@ -2827,6 +2829,7 @@ public: protected: virtual QString userAgentForUrl(const QUrl& url) const { + Q_UNUSED(url); return QString("My User Agent\nX-New-Http-Header: Oh Noes!"); } }; @@ -3178,6 +3181,7 @@ void tst_QWebEnginePage::findTextSuccessiveShouldCallAllCallbacks() QVERIFY(spy5.wasCalled()); } +#if defined(QWEBENGINEPAGE_SUPPORTEDCONTENTTYPES) static QString getMimeTypeForExtension(const QString &ext) { QMimeType mimeType = QMimeDatabase().mimeTypeForFile(QStringLiteral("filename.") + ext.toLower(), QMimeDatabase::MatchExtension); @@ -3186,6 +3190,7 @@ static QString getMimeTypeForExtension(const QString &ext) return QString(); } +#endif void tst_QWebEnginePage::supportedContentType() { -- cgit v1.2.3