aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@theqtcompany.com>2016-04-06 14:35:36 +0200
committerAndy Shaw <andy.shaw@theqtcompany.com>2016-04-07 08:39:37 +0000
commit0b65974ba160680945836374407e80d542caeb44 (patch)
treea02749702a98972a3cc9c97e4c28ee2ed6e75eaf /src/imports
parent0d8de448ef746aea7215f6f654660500dc9601d2 (diff)
Ensure the resources are initialized when used statically
Change-Id: Ifbcd16402189c4621596fc38c3bd8931b3b6a66e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/layouts/plugin.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/imports/layouts/plugin.cpp b/src/imports/layouts/plugin.cpp
index 4552b7219b..248b12ac31 100644
--- a/src/imports/layouts/plugin.cpp
+++ b/src/imports/layouts/plugin.cpp
@@ -42,6 +42,13 @@
#include "qquicklinearlayout_p.h"
#include "qquickstacklayout_p.h"
+static void initResources()
+{
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_QtQuick_Layouts);
+#endif
+}
+
QT_BEGIN_NAMESPACE
//![class decl]
@@ -50,6 +57,10 @@ class QtQuickLayoutsPlugin : public QQmlExtensionPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
public:
+ QtQuickLayoutsPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent)
+ {
+ initResources();
+ }
virtual void registerTypes(const char *uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Layouts"));