diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-01-08 15:40:59 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-01-11 09:34:53 +0000 |
commit | faaa8b221965d3ffb7c520b94bcb96c818b171a7 (patch) | |
tree | b327bbc9d36ee6187e1fe4a86d102c241b9ef2ae /src/imports/nfc/plugin.cpp | |
parent | a3cf9d99b303baaca0d1b0fbaa1b1923c06d18cc (diff) |
Enable using the module in a statically built application
Change-Id: Ib3e11b80d0287bb0421d399d01b92c6367b52a1e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/imports/nfc/plugin.cpp')
-rw-r--r-- | src/imports/nfc/plugin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/nfc/plugin.cpp b/src/imports/nfc/plugin.cpp index ff7474f3..bfcc9aff 100644 --- a/src/imports/nfc/plugin.cpp +++ b/src/imports/nfc/plugin.cpp @@ -41,6 +41,13 @@ #include "qdeclarativendefurirecord_p.h" #include "qdeclarativendefmimerecord_p.h" +static void initResources() +{ +#ifdef QT_STATIC + Q_INIT_RESOURCE(qmake_QtNfc); +#endif +} + QT_USE_NAMESPACE class QNfcQmlPlugin : public QQmlExtensionPlugin @@ -49,6 +56,7 @@ class QNfcQmlPlugin : public QQmlExtensionPlugin Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: + QNfcQmlPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } void registerTypes(const char *uri) { Q_ASSERT(uri == QStringLiteral("QtNfc")); |