diff options
author | Christian Strømme <christian.stromme@qt.io> | 2019-02-26 13:37:26 +0100 |
---|---|---|
committer | Christian Strømme <christian.stromme@qt.io> | 2019-02-26 12:50:10 +0000 |
commit | c40add66f77afe18fe952013fd9503ab4c568efc (patch) | |
tree | 877dba52af5ab613dd75df49e7a405512e72cfc7 /src | |
parent | b9864e03bec6753b0407e8ba784b15bb4394362c (diff) |
Make QWebView import available under x.QT_MINOR_VERSION
Fixes: QTBUG-74039
Change-Id: I18dcfc4b8aeac987b4e55a62b39c7c81de582659
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/imports.pro | 2 | ||||
-rw-r--r-- | src/imports/webview.cpp | 3 | ||||
-rw-r--r-- | src/webview/doc/src/qtwebview-qmltypes.qdoc | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/imports/imports.pro b/src/imports/imports.pro index eefb3eb..5e701f3 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,7 +1,7 @@ CXX_MODULE = webview TARGET = declarative_webview TARGETPATH = QtWebView -IMPORT_VERSION = 1.1 +IMPORT_VERSION = 1.$$QT_MINOR_VERSION QT += qml quick webview-private SOURCES += \ diff --git a/src/imports/webview.cpp b/src/imports/webview.cpp index 792d7fa..d73ce09 100644 --- a/src/imports/webview.cpp +++ b/src/imports/webview.cpp @@ -57,6 +57,9 @@ public: qmlRegisterType<QQuickWebView>(uri, 1, 0, "WebView"); qmlRegisterType<QQuickWebView, 1>(uri, 1, 1, "WebView"); qmlRegisterUncreatableType<QQuickWebViewLoadRequest>(uri, 1, 1, "WebViewLoadRequest", msg); + + // Make sure we're always available under version x.QT_VERSION_MINOR + qmlRegisterModule(uri, 1, QT_VERSION_MINOR); } void initializeEngine(QQmlEngine *engine, const char *uri) diff --git a/src/webview/doc/src/qtwebview-qmltypes.qdoc b/src/webview/doc/src/qtwebview-qmltypes.qdoc index 2fe1ca1..b5da115 100644 --- a/src/webview/doc/src/qtwebview-qmltypes.qdoc +++ b/src/webview/doc/src/qtwebview-qmltypes.qdoc @@ -27,7 +27,7 @@ /*! - \qmlmodule QtWebView 1.1 + \qmlmodule QtWebView 1.\QtMinorVersion \title Qt WebView QML Types \ingroup qmlmodules \brief Provides QML types for Qt WebView. @@ -39,7 +39,9 @@ import statement: \badcode - import QtWebView 1.1 + \qml \QtMinorVersion + import QtWebView 1.\1 + \endqml \endcode \section1 QML Types |