diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-04-26 16:58:04 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-04-26 21:25:19 +0000 |
commit | 9bc6541cf7eda5518dd6ba8cd4c6df621a8002a5 (patch) | |
tree | 970486b4604aacd0f03869ec759a0887b3ff1073 | |
parent | 337bff3825099b1aa5cbe92e7aab63a1b51e5049 (diff) | |
download | qtgraphicaleffects-9bc6541cf7eda5518dd6ba8cd4c6df621a8002a5.tar.gz |
Remove the code to manually initialize resources in static builds
After commit be9a56e5e3ced5d0d668fa24e4c65ae928f2e25a in qtbase, this is
not needed anymore. Instead the resource system injects the plugin entry
point with a reference to all resources.
Change-Id: I008dcbc44f3722184fb4cdf7c231c6a9c18cc86d
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r-- | src/effects/plugin.cpp | 10 | ||||
-rw-r--r-- | src/effects/private/plugin.cpp | 9 |
2 files changed, 2 insertions, 17 deletions
diff --git a/src/effects/plugin.cpp b/src/effects/plugin.cpp index b30e2ae..d2baba2 100644 --- a/src/effects/plugin.cpp +++ b/src/effects/plugin.cpp @@ -41,14 +41,6 @@ #include <QtQml/qqml.h> #include <QtQml/qqmlengine.h> -static void initResources() -{ -#ifdef QT_STATIC - Q_INIT_RESOURCE(qmake_QtGraphicalEffects); - Q_INIT_RESOURCE(qtgraphicaleffectsshaders); -#endif -} - QT_BEGIN_NAMESPACE class QtGraphicalEffectsPlugin : public QQmlExtensionPlugin @@ -57,7 +49,7 @@ class QtGraphicalEffectsPlugin : public QQmlExtensionPlugin Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: - QtGraphicalEffectsPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } + QtGraphicalEffectsPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { } virtual void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtGraphicalEffects")); diff --git a/src/effects/private/plugin.cpp b/src/effects/private/plugin.cpp index 2e5b17a..a9deb94 100644 --- a/src/effects/private/plugin.cpp +++ b/src/effects/private/plugin.cpp @@ -44,13 +44,6 @@ #include "qgfxsourceproxy_p.h" #include "qgfxshaderbuilder_p.h" -static void initResources() -{ -#ifdef QT_STATIC - Q_INIT_RESOURCE(qmake_QtGraphicalEffects_private); -#endif -} - QT_BEGIN_NAMESPACE static QObject *qgfxshaderbuilder_provider(QQmlEngine *, QJSEngine *) @@ -64,7 +57,7 @@ class QtGraphicalEffectsPrivatePlugin : public QQmlExtensionPlugin Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: - QtGraphicalEffectsPrivatePlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } + QtGraphicalEffectsPrivatePlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { } virtual void registerTypes(const char *uri) { Q_ASSERT(QByteArray(uri) == QByteArrayLiteral("QtGraphicalEffects.private")); |