summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/imports/webchannel/plugin.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/webchannel/plugin.cpp b/src/imports/webchannel/plugin.cpp
index 3418c31..3779de3 100644
--- a/src/imports/webchannel/plugin.cpp
+++ b/src/imports/webchannel/plugin.cpp
@@ -43,6 +43,13 @@
#include <qqmlwebchannel.h>
#include <qqmlwebchannelattached_p.h>
+static void initResources()
+{
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_QtWebChannel);
+#endif
+}
+
QT_BEGIN_NAMESPACE
class QWebChannelPlugin : public QQmlExtensionPlugin
@@ -51,6 +58,7 @@ class QWebChannelPlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
+ QWebChannelPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
void registerTypes(const char *uri);
};