From a0f1964e9f304523f01fde3c5583e382b7a3cb74 Mon Sep 17 00:00:00 2001
From: Simon Hausmann <simon.hausmann@qt.io>
Date: Thu, 26 Apr 2018 17:03:30 +0200
Subject: [PATCH] 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: I09efba67c3d2e9b68b73707101f1b8cc22284131
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
---
 src/imports/qmlwebsockets/qmlwebsockets_plugin.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/imports/qmlwebsockets/qmlwebsockets_plugin.h b/src/imports/qmlwebsockets/qmlwebsockets_plugin.h
index 749d8309..0fc9435a 100644
--- a/src/imports/qmlwebsockets/qmlwebsockets_plugin.h
+++ b/src/imports/qmlwebsockets/qmlwebsockets_plugin.h
@@ -42,13 +42,6 @@
 
 #include <QQmlExtensionPlugin>
 
-static void initResources()
-{
-#ifdef QT_STATIC
-    Q_INIT_RESOURCE(qmake_QtWebSockets);
-#endif
-}
-
 QT_BEGIN_NAMESPACE
 
 class QtWebSocketsDeclarativeModule : public QQmlExtensionPlugin
@@ -57,7 +50,7 @@ class QtWebSocketsDeclarativeModule : public QQmlExtensionPlugin
     Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
 
 public:
-    QtWebSocketsDeclarativeModule(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); }
+    QtWebSocketsDeclarativeModule(QObject *parent = 0) : QQmlExtensionPlugin(parent) { }
     void registerTypes(const char *uri);
 };
 
-- 
GitLab