summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Strobl <stroblju@gmail.com>2017-05-03 18:38:07 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2017-05-05 04:50:02 +0000
commit958d4d8ecfc7afcbc9b7c0855857d2a2e1cbfa9f (patch)
treecf956bddd8b1bc248d976d6c3d2d7330bf02b69b
parent384cb7975d9caa4e508454d811d2e391763e5981 (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: If57fca92a0e04b9e04f1adb59dae0e4e9a3dcccb Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r--src/imports/scxmlstatemachine/plugin.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/scxmlstatemachine/plugin.cpp b/src/imports/scxmlstatemachine/plugin.cpp
index b662491..f1cb413 100644
--- a/src/imports/scxmlstatemachine/plugin.cpp
+++ b/src/imports/scxmlstatemachine/plugin.cpp
@@ -46,6 +46,13 @@
#include <qqmlextensionplugin.h>
#include <qqml.h>
+static void initResources()
+{
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_QtScxml);
+#endif
+}
+
QT_BEGIN_NAMESPACE
class QScxmlStateMachinePlugin : public QQmlExtensionPlugin
@@ -54,6 +61,7 @@ class QScxmlStateMachinePlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
+ QScxmlStateMachinePlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
void registerTypes(const char *uri)
{
// @uri QtScxml