diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-02-04 08:10:48 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-02-04 07:18:03 +0000 |
commit | 5e8d2b4e266916761a26905f0930add305c308cf (patch) | |
tree | 19d62f9973f6d0e45f1fe7d1445ed7a033f619ef /src/imports | |
parent | be4547efff0c4af25d2c2f24d0605c92345ba3fd (diff) | |
download | qtsensors-5e8d2b4e266916761a26905f0930add305c308cf.tar.gz |
Enable using the module in a statically built application
Change-Id: I470d742058d69d517249620b98eef136a9c6ca86
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/sensors/sensors.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/sensors/sensors.cpp b/src/imports/sensors/sensors.cpp index fdb3f1c..27a648c 100644 --- a/src/imports/sensors/sensors.cpp +++ b/src/imports/sensors/sensors.cpp @@ -76,6 +76,13 @@ #include "qmltiltsensor.h" #include "qmlsensorgesture.h" +static void initResources() +{ +#ifdef QT_STATIC + Q_INIT_RESOURCE(qmake_QtSensors); +#endif +} + QT_BEGIN_NAMESPACE static QObject *global_object_50(QQmlEngine *, QJSEngine *) @@ -88,6 +95,7 @@ class QtSensorsDeclarativeModule : public QQmlExtensionPlugin Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json") public: + QtSensorsDeclarativeModule(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } virtual void registerTypes(const char *uri) { char const * const package = "QtSensors"; |