summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@theqtcompany.com>2016-02-26 00:49:54 +0100
committerAndy Shaw <andy.shaw@theqtcompany.com>2016-02-26 14:19:45 +0000
commitc00241ac0389cc4ee03252030e6de1257a9b50fd (patch)
tree0d3f17eda7ee175e1d9330b1e614cb52729fdc56 /src
parentac26702bc0aae107706843f78780c0c2451fbacd (diff)
downloadqtwebsockets-c00241ac0389cc4ee03252030e6de1257a9b50fd.tar.gz
Enable using the module in a statically built applicationv5.7.0-alpha1
Change-Id: I6c905059f2e194c7209e01ce48e84ed571add847 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/imports/qmlwebsockets/qmlwebsockets_plugin.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/qmlwebsockets/qmlwebsockets_plugin.h b/src/imports/qmlwebsockets/qmlwebsockets_plugin.h
index e49a315..318e0c7 100644
--- a/src/imports/qmlwebsockets/qmlwebsockets_plugin.h
+++ b/src/imports/qmlwebsockets/qmlwebsockets_plugin.h
@@ -42,6 +42,13 @@
#include <QQmlExtensionPlugin>
+static void initResources()
+{
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_QtWebSockets);
+#endif
+}
+
QT_BEGIN_NAMESPACE
class QtWebSocketsDeclarativeModule : public QQmlExtensionPlugin
@@ -50,6 +57,7 @@ class QtWebSocketsDeclarativeModule : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
+ QtWebSocketsDeclarativeModule(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
void registerTypes(const char *uri);
};