aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickshapes
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-01-25 10:44:45 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-02-01 09:34:19 +0100
commit25aab20ad3fa63acc7d76be022a4303f005a9f8a (patch)
treeb2adeb5e2e1aa81a2b39e8abb42101ac8f6b3640 /src/quickshapes
parent7efcb0e34933ee6ac29f9de35c0fe7146049c221 (diff)
Move registrations functions into the Qt namespace
It's high time we do this. We should not clobber the global namespace with type registration functions if the user has explicitly provided a namespace for Qt. Change-Id: Ibac49cb1c8976e65ea15d7a07d25ea1a5325a60a Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quickshapes')
-rw-r--r--src/quickshapes/qquickshapesglobal_p.h4
-rw-r--r--src/quickshapes/qquickshapesplugin.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/quickshapes/qquickshapesglobal_p.h b/src/quickshapes/qquickshapesglobal_p.h
index ba9ee1486f..0d3bb8efc6 100644
--- a/src/quickshapes/qquickshapesglobal_p.h
+++ b/src/quickshapes/qquickshapesglobal_p.h
@@ -54,6 +54,10 @@
#include "qquickshapesglobal.h"
#include <QtQuickShapes/private/qtquickshapesexports_p.h>
+QT_BEGIN_NAMESPACE
+
void Q_QUICKSHAPES_PRIVATE_EXPORT qml_register_types_QtQuick_Shapes();
+QT_END_NAMESPACE
+
#endif // QQUICKSHAPESGLOBAL_P_H
diff --git a/src/quickshapes/qquickshapesplugin.cpp b/src/quickshapes/qquickshapesplugin.cpp
index 513160db60..0f7ea5aca3 100644
--- a/src/quickshapes/qquickshapesplugin.cpp
+++ b/src/quickshapes/qquickshapesplugin.cpp
@@ -41,11 +41,11 @@
#include <QtQml/qqml.h>
#include <QtQuickShapes/private/qquickshape_p.h>
+QT_BEGIN_NAMESPACE
+
Q_GHS_KEEP_REFERENCE(qml_register_types_QtQuick_Shapes);
Q_GHS_KEEP_REFERENCE(QQuickShapes_initializeModule);
-QT_BEGIN_NAMESPACE
-
class QmlShapesPlugin : public QQmlEngineExtensionPlugin
{
Q_OBJECT