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 | |
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')
-rw-r--r-- | src/imports/bluetooth/bluetooth.pro | 5 | ||||
-rw-r--r-- | src/imports/bluetooth/plugin.cpp | 8 | ||||
-rw-r--r-- | src/imports/nfc/nfc.pro | 5 | ||||
-rw-r--r-- | src/imports/nfc/plugin.cpp | 8 |
4 files changed, 26 insertions, 0 deletions
diff --git a/src/imports/bluetooth/bluetooth.pro b/src/imports/bluetooth/bluetooth.pro index 243322b5..f0df8eb9 100644 --- a/src/imports/bluetooth/bluetooth.pro +++ b/src/imports/bluetooth/bluetooth.pro @@ -1,3 +1,8 @@ +CXX_MODULE = connectivity +TARGET = declarative_bluetooth +TARGETPATH = QtBluetooth +IMPORT_VERSION = 5.6 + QT = core quick bluetooth HEADERS += \ diff --git a/src/imports/bluetooth/plugin.cpp b/src/imports/bluetooth/plugin.cpp index cb9d564f..79986da1 100644 --- a/src/imports/bluetooth/plugin.cpp +++ b/src/imports/bluetooth/plugin.cpp @@ -39,6 +39,13 @@ #include "qdeclarativebluetoothservice_p.h" #include "qdeclarativebluetoothsocket_p.h" +static void initResources() +{ +#ifdef QT_STATIC + Q_INIT_RESOURCE(qmake_QtBluetooth); +#endif +} + QT_USE_NAMESPACE class QBluetoothQmlPlugin : public QQmlExtensionPlugin @@ -46,6 +53,7 @@ class QBluetoothQmlPlugin : public QQmlExtensionPlugin Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: + QBluetoothQmlPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } void registerTypes(const char *uri) { // @uri QtBluetooth diff --git a/src/imports/nfc/nfc.pro b/src/imports/nfc/nfc.pro index a020f09b..e2ec1b9e 100644 --- a/src/imports/nfc/nfc.pro +++ b/src/imports/nfc/nfc.pro @@ -1,3 +1,8 @@ +CXX_MODULE = connectivity +TARGET = declarative_nfc +TARGETPATH = QtNfc +IMPORT_VERSION = 5.6 + QT = core qml nfc # Input 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")); |