From c00241ac0389cc4ee03252030e6de1257a9b50fd Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 26 Feb 2016 00:49:54 +0100 Subject: Enable using the module in a statically built application Change-Id: I6c905059f2e194c7209e01ce48e84ed571add847 Reviewed-by: Simon Hausmann --- src/imports/qmlwebsockets/qmlwebsockets_plugin.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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 +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); }; -- cgit v1.2.1