summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@theqtcompany.com>2015-01-21 13:54:10 +0100
committerChristian Stromme <christian.stromme@theqtcompany.com>2015-02-09 16:35:12 +0000
commit011069957991ac884f6e5cbacc6391570c7091e8 (patch)
tree2281ef07c67ab4cb0132df5692e349dfdb4e9d54
parent56da39587414f127774e1b5e9f88a84f8f27db08 (diff)
Fix auto tests on desktop
On desktop we use WebEngineView and before we can use it we need to call QtWebEngine::initialize(). Change-Id: I4c77e5e64c394bff1732fee154d3a02e969f18f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
-rw-r--r--tests/auto/webview/qwebview/tst_qwebview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/webview/qwebview/tst_qwebview.cpp b/tests/auto/webview/qwebview/tst_qwebview.cpp
index 498c88d..e9f8d51 100644
--- a/tests/auto/webview/qwebview/tst_qwebview.cpp
+++ b/tests/auto/webview/qwebview/tst_qwebview.cpp
@@ -40,6 +40,10 @@
#include <QtCore/qtemporarydir.h>
#include <QtCore/qfileinfo.h>
#include <QtWebView/private/qwebview_p.h>
+#include <QtQml/qqmlengine.h>
+#ifdef QT_WEBVIEW_WEBENGINE_BACKEND
+#include <QtWebEngine>
+#endif // QT_WEBVIEW_WEBENGINE_BACKEND
class tst_QWebView : public QObject
{
@@ -57,6 +61,9 @@ private:
void tst_QWebView::initTestCase()
{
+#ifdef QT_WEBVIEW_WEBENGINE_BACKEND
+ QtWebEngine::initialize();
+#endif // QT_WEBVIEW_WEBENGINE_BACKEND
if (!QFileInfo(m_cacheLocation).isDir()) {
QDir dir;
QVERIFY(dir.mkpath(m_cacheLocation));