From da4ea674c75579f2040acd0ec55c68b00898f4d0 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Date: Mon, 11 Aug 2014 16:11:45 +0200 Subject: [PATCH] Update the library and QML version to 1.0 Also update all the examples to use 1.0 as 0.9 shouldn't be publically recommended. Change-Id: Ic58e35bdfd3a0f3d5201fc069b7103027ba84574 Reviewed-by: Andras Becsi <andras.becsi@digia.com> --- .qmake.conf | 8 +++++++- examples/webengine/quicknanobrowser/quickwindow.qml | 2 +- src/webengine/plugin/plugin.cpp | 2 +- tests/auto/quick/qmltests/data/TestWebEngineView.qml | 2 +- .../quick/qmltests/data/tst_desktopBehaviorLoadHtml.qml | 2 +- tests/auto/quick/qmltests/data/tst_favIconLoad.qml | 2 +- tests/auto/quick/qmltests/data/tst_findText.qml | 2 +- tests/auto/quick/qmltests/data/tst_linkHovered.qml | 2 +- tests/auto/quick/qmltests/data/tst_loadFail.qml | 2 +- tests/auto/quick/qmltests/data/tst_loadHtml.qml | 2 +- tests/auto/quick/qmltests/data/tst_loadProgress.qml | 2 +- tests/auto/quick/qmltests/data/tst_loadProgressSignal.qml | 2 +- tests/auto/quick/qmltests/data/tst_loadUrl.qml | 2 +- tests/auto/quick/qmltests/data/tst_navigationHistory.qml | 2 +- .../auto/quick/qmltests/data/tst_navigationRequested.qml | 2 +- tests/auto/quick/qmltests/data/tst_properties.qml | 2 +- tests/auto/quick/qmltests/data/tst_runJavaScript.qml | 2 +- tests/auto/quick/qmltests/data/tst_titleChanged.qml | 2 +- .../tst_qquickwebengineviewgraphics.cpp | 2 +- tests/quicktestbrowser/FeaturePermissionBar.qml | 2 +- tests/quicktestbrowser/quickwindow.qml | 2 +- 21 files changed, 27 insertions(+), 21 deletions(-) diff --git a/.qmake.conf b/.qmake.conf index aecb86d1c..005d226fc 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,4 +2,10 @@ QMAKEPATH += $$PWD/tools/qmake load(qt_build_config) CONFIG += qt_example_installs -MODULE_VERSION = 0.9.0 +# We released 1.0.0 together with 5.4.0. Since then we're 4 majors +# and 4 minors behind, until we need to release standalone. +QTWEBENGINE_MAJOR = $$system(python -c \"print($$QT_MAJOR_VERSION - 4)\") +QTWEBENGINE_MINOR = $$system(python -c \"print($$QT_MINOR_VERSION - 4)\") +QTWEBENGINE_PATCH = $$QT_PATCH_VERSION + +MODULE_VERSION = $${QTWEBENGINE_MAJOR}.$${QTWEBENGINE_MINOR}.$${QTWEBENGINE_PATCH} diff --git a/examples/webengine/quicknanobrowser/quickwindow.qml b/examples/webengine/quicknanobrowser/quickwindow.qml index e94b2ccea..c6b03418c 100644 --- a/examples/webengine/quicknanobrowser/quickwindow.qml +++ b/examples/webengine/quicknanobrowser/quickwindow.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.1 -import QtWebEngine 0.9 +import QtWebEngine 1.0 import QtQuick.Controls 1.0 import QtQuick.Controls.Styles 1.0 import QtQuick.Layouts 1.0 diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp index 478a51f1a..377b8b2cc 100644 --- a/src/webengine/plugin/plugin.cpp +++ b/src/webengine/plugin/plugin.cpp @@ -64,8 +64,8 @@ public: qmlRegisterType<QQuickWebEngineView>(uri, 0, 9, "WebEngineView"); qmlRegisterUncreatableType<QQuickWebEngineLoadRequest>(uri, 0, 9, "WebEngineLoadRequest", QObject::tr("Cannot create separate instance of WebEngineLoadRequest")); - qmlRegisterUncreatableType<QQuickWebEngineNavigationRequest>(uri, 0, 9, "WebEngineNavigationRequest", QObject::tr("Cannot create separate instance of WebEngineNavigationRequest")); qmlRegisterUncreatableType<QQuickWebEngineNewViewRequest>(uri, 0, 9, "WebEngineNewViewRequest", QObject::tr("Cannot create separate instance of WebEngineNewViewRequest")); + qmlRegisterUncreatableType<QQuickWebEngineNavigationRequest>(uri, 1, 0, "WebEngineNavigationRequest", QObject::tr("Cannot create separate instance of WebEngineNavigationRequest")); // The QML type loader relies on the minimum and maximum minor version of registered types // to validate imports. We want to tie our import version to the module version, so register diff --git a/tests/auto/quick/qmltests/data/TestWebEngineView.qml b/tests/auto/quick/qmltests/data/TestWebEngineView.qml index dd05aea8b..c2ea08c6a 100644 --- a/tests/auto/quick/qmltests/data/TestWebEngineView.qml +++ b/tests/auto/quick/qmltests/data/TestWebEngineView.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 import QtWebEngine.experimental 1.0 WebEngineView { diff --git a/tests/auto/quick/qmltests/data/tst_desktopBehaviorLoadHtml.qml b/tests/auto/quick/qmltests/data/tst_desktopBehaviorLoadHtml.qml index 9b0b8bd60..7b086044f 100644 --- a/tests/auto/quick/qmltests/data/tst_desktopBehaviorLoadHtml.qml +++ b/tests/auto/quick/qmltests/data/tst_desktopBehaviorLoadHtml.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_favIconLoad.qml b/tests/auto/quick/qmltests/data/tst_favIconLoad.qml index 9df8bbb65..f78569f2a 100644 --- a/tests/auto/quick/qmltests/data/tst_favIconLoad.qml +++ b/tests/auto/quick/qmltests/data/tst_favIconLoad.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_findText.qml b/tests/auto/quick/qmltests/data/tst_findText.qml index d3a922df6..921961c9f 100644 --- a/tests/auto/quick/qmltests/data/tst_findText.qml +++ b/tests/auto/quick/qmltests/data/tst_findText.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 import QtWebEngine.experimental 1.0 TestWebEngineView { diff --git a/tests/auto/quick/qmltests/data/tst_linkHovered.qml b/tests/auto/quick/qmltests/data/tst_linkHovered.qml index 7195817fc..3ce5ba923 100644 --- a/tests/auto/quick/qmltests/data/tst_linkHovered.qml +++ b/tests/auto/quick/qmltests/data/tst_linkHovered.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_loadFail.qml b/tests/auto/quick/qmltests/data/tst_loadFail.qml index 859cef4f0..e2282129f 100644 --- a/tests/auto/quick/qmltests/data/tst_loadFail.qml +++ b/tests/auto/quick/qmltests/data/tst_loadFail.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_loadHtml.qml b/tests/auto/quick/qmltests/data/tst_loadHtml.qml index 252a438e8..0bc0cbcaf 100644 --- a/tests/auto/quick/qmltests/data/tst_loadHtml.qml +++ b/tests/auto/quick/qmltests/data/tst_loadHtml.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_loadProgress.qml b/tests/auto/quick/qmltests/data/tst_loadProgress.qml index aea3216a4..dbf5500ef 100644 --- a/tests/auto/quick/qmltests/data/tst_loadProgress.qml +++ b/tests/auto/quick/qmltests/data/tst_loadProgress.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_loadProgressSignal.qml b/tests/auto/quick/qmltests/data/tst_loadProgressSignal.qml index cc53ebe0b..896ff4155 100644 --- a/tests/auto/quick/qmltests/data/tst_loadProgressSignal.qml +++ b/tests/auto/quick/qmltests/data/tst_loadProgressSignal.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_loadUrl.qml b/tests/auto/quick/qmltests/data/tst_loadUrl.qml index 8db968aca..be7ede626 100644 --- a/tests/auto/quick/qmltests/data/tst_loadUrl.qml +++ b/tests/auto/quick/qmltests/data/tst_loadUrl.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_navigationHistory.qml b/tests/auto/quick/qmltests/data/tst_navigationHistory.qml index 8162bab5e..c5dd87ba4 100644 --- a/tests/auto/quick/qmltests/data/tst_navigationHistory.qml +++ b/tests/auto/quick/qmltests/data/tst_navigationHistory.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 import QtWebEngine.experimental 1.0 TestWebEngineView { diff --git a/tests/auto/quick/qmltests/data/tst_navigationRequested.qml b/tests/auto/quick/qmltests/data/tst_navigationRequested.qml index aae3799bc..43f84bb62 100644 --- a/tests/auto/quick/qmltests/data/tst_navigationRequested.qml +++ b/tests/auto/quick/qmltests/data/tst_navigationRequested.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_properties.qml b/tests/auto/quick/qmltests/data/tst_properties.qml index 90463d91a..d4fdaafd1 100644 --- a/tests/auto/quick/qmltests/data/tst_properties.qml +++ b/tests/auto/quick/qmltests/data/tst_properties.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_runJavaScript.qml b/tests/auto/quick/qmltests/data/tst_runJavaScript.qml index 3621bde92..42c6928e5 100644 --- a/tests/auto/quick/qmltests/data/tst_runJavaScript.qml +++ b/tests/auto/quick/qmltests/data/tst_runJavaScript.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qmltests/data/tst_titleChanged.qml b/tests/auto/quick/qmltests/data/tst_titleChanged.qml index 00231e94e..7eb4b63b5 100644 --- a/tests/auto/quick/qmltests/data/tst_titleChanged.qml +++ b/tests/auto/quick/qmltests/data/tst_titleChanged.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 TestWebEngineView { id: webEngineView diff --git a/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp b/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp index 63e44e59c..af57df7e0 100644 --- a/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp +++ b/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp @@ -197,7 +197,7 @@ void tst_QQuickWebEngineViewGraphics::reparentToOtherWindow() void tst_QQuickWebEngineViewGraphics::setHtml(const QString &html) { QString htmlData = QUrl::toPercentEncoding(html); - QString qmlData = QUrl::toPercentEncoding(QStringLiteral("import QtQuick 2.0; import QtWebEngine 0.9; WebEngineView { width: 150; height: 150; url: loadUrl }")); + QString qmlData = QUrl::toPercentEncoding(QStringLiteral("import QtQuick 2.0; import QtWebEngine 1.0; WebEngineView { width: 150; height: 150; url: loadUrl }")); m_view->rootContext()->setContextProperty("loadUrl", QUrl(QStringLiteral("data:text/html,%1").arg(htmlData))); m_view->setSource(QUrl(QStringLiteral("data:text/plain,%1").arg(qmlData))); m_view->create(); diff --git a/tests/quicktestbrowser/FeaturePermissionBar.qml b/tests/quicktestbrowser/FeaturePermissionBar.qml index 9b248e31f..dd2e0f714 100644 --- a/tests/quicktestbrowser/FeaturePermissionBar.qml +++ b/tests/quicktestbrowser/FeaturePermissionBar.qml @@ -40,7 +40,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 -import QtWebEngine 0.9 +import QtWebEngine 1.0 import QtWebEngine.experimental 1.0 import QtQuick.Layouts 1.0 diff --git a/tests/quicktestbrowser/quickwindow.qml b/tests/quicktestbrowser/quickwindow.qml index 06f18eae7..0fb50dd23 100644 --- a/tests/quicktestbrowser/quickwindow.qml +++ b/tests/quicktestbrowser/quickwindow.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.1 -import QtWebEngine 0.9 +import QtWebEngine 1.0 import QtWebEngine.experimental 1.0 import QtQuick.Controls 1.0 import QtQuick.Controls.Styles 1.0 -- GitLab