diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-04-06 14:35:36 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-04-07 08:39:37 +0000 |
commit | 0b65974ba160680945836374407e80d542caeb44 (patch) | |
tree | a02749702a98972a3cc9c97e4c28ee2ed6e75eaf /src/imports | |
parent | 0d8de448ef746aea7215f6f654660500dc9601d2 (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.cpp | 11 |
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")); |