From 8b0f6b343dd807236001cacbae9bacb7e4923369 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Mon, 8 Oct 2018 16:01:57 +0200 Subject: Fix warning when building without webchannel support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: ‘QWebEngineScript webChannelScript()’ defined but not used [-Wunused-function] Change-Id: If7d5def2c539c3b2d448452fa154c1574778b17d Reviewed-by: Kai Koehne --- tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp b/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp index f4e1baa33..6ce4623d6 100644 --- a/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp +++ b/tests/auto/widgets/qwebenginescript/tst_qwebenginescript.cpp @@ -257,6 +257,7 @@ private: QString m_text; }; +#if QT_CONFIG(webengine_webchannel) static QString readFile(const QString &path) { QFile file(path); @@ -277,7 +278,7 @@ static QWebEngineScript webChannelScript() script.setWorldId(QWebEngineScript::MainWorld); return script; } -#if QT_CONFIG(webengine_webchannel) + void tst_QWebEngineScript::webChannel_data() { QTest::addColumn("worldId"); -- cgit v1.2.3