diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-02-04 08:58:56 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-02-04 08:05:02 +0000 |
commit | 9507cdc31ff6778cba77764bb0991e538c493a9e (patch) | |
tree | 79d92015e2d7782a22e87897a1e1b3ce294b1e41 | |
parent | a3cfbe915b62379eb7feda267e9b34c7e656eede (diff) | |
download | qtwebchannel-9507cdc31ff6778cba77764bb0991e538c493a9e.tar.gz |
Enable using the module in a statically linked application
Change-Id: I79bf51daf8451fab4fc0dc6af64d119383fa7387
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r-- | src/imports/webchannel/plugin.cpp | 8 |
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); }; |