diff options
author | Antti Kokko <[email protected]> | 2017-05-04 09:05:23 +0300 |
---|---|---|
committer | Jani Heikkinen <[email protected]> | 2017-05-06 19:06:24 +0000 |
commit | 821e338f49cefb39816be29fb42c6b6c91bd94a2 (patch) | |
tree | a493d2228f87ec14ebd9c019e09c3346ac9ca40e | |
parent | 0685dffb9275613e06f47e1d07643e55eeff56d9 (diff) |
Fix bundling of module for static buildsv5.9.0-beta4
Without this patch the module is not bundled in static builds correctly
causing 'module "<QtModule>" is not installed' errors in during runtime.
As reference: this happens, because 'QQmlMetaType::isAnyModule(importUri)'
at 'qtdeclarative/src/qml/qml/qqmltypeloader.cpp:1422:' returns 'false',
which indicates that the module was not registered.
Task-number: QTBUG-59559
Change-Id: I5d1daa1326f78e357326161a4e85878fdaffd788
Reviewed-by: Christian Stromme <[email protected]>
Reviewed-by: Oswald Buddenhagen <[email protected]>
-rw-r--r-- | src/imports/webview.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/webview.cpp b/src/imports/webview.cpp index f4e0c70..ca10e29 100644 --- a/src/imports/webview.cpp +++ b/src/imports/webview.cpp @@ -40,6 +40,13 @@ #include <QtWebView/private/qquickwebviewloadrequest_p.h> #include <QtWebView/private/qquickwebview_p.h> +static void initResources() +{ +#ifdef QT_STATIC + Q_INIT_RESOURCE(qmake_QtWebView); +#endif +} + QT_BEGIN_NAMESPACE class QWebViewModule : public QQmlExtensionPlugin @@ -47,6 +54,7 @@ class QWebViewModule : public QQmlExtensionPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: + QWebViewModule(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebView")); |