aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/particles
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@theqtcompany.com>2015-06-20 01:26:48 +0200
committerAndy Shaw <andy.shaw@theqtcompany.com>2015-12-02 12:20:32 +0000
commitec5a886d4b92a18669d5bbd01b43a57f7d81b856 (patch)
tree688305c899ce01c73b8a3cf94d825f4fddc5642a /src/imports/particles
parentc3a818d19e34e08e0759dedce18d9daa5ba7d94e (diff)
Utilize the resources when building statically.
This is needed so that the qmldir file is picked up correctly when using a static build of the plugins in the application as this gets taken care of automatically by qmake. The Q_INIT_RESOURCES line itself is only needed statically because no resource file is needed for dynamic libraries so it is protected with the QT_STATIC define. Task-number: QTBUG-35754 Change-Id: I9059e10c0846548f365fe4f95dd9c6100eeb43cd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/imports/particles')
-rw-r--r--src/imports/particles/plugin.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/particles/plugin.cpp b/src/imports/particles/plugin.cpp
index 56b611a408..609efd0bad 100644
--- a/src/imports/particles/plugin.cpp
+++ b/src/imports/particles/plugin.cpp
@@ -35,6 +35,13 @@
#include <private/qquickparticlesmodule_p.h>
+static void initResources()
+{
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_QtQuick_Particles_2);
+#endif
+}
+
QT_BEGIN_NAMESPACE
//![class decl]
@@ -43,6 +50,7 @@ class QtQuick2ParticlesPlugin : public QQmlExtensionPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
public:
+ QtQuick2ParticlesPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
virtual void registerTypes(const char *uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Particles"));