aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpysideqml/pysideqmlnamedelement.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-10-10 07:52:47 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-10-23 12:26:07 +0200
commita9bf1c71b632e5799af09347a3a6bb39b0e5793e (patch)
tree43c45a54b6572ecaa293ac54e87f273ad6fc8fda /sources/pyside6/libpysideqml/pysideqmlnamedelement.cpp
parent4d09403f7167afbee285155177e2c1c9e4857e14 (diff)
QML registration code: Port from std::string to QByteArray
Modern QML registration code is based on QMetaClassInfo, which uses QByteArray; so, this will avoid conversions in the future. As a drive-by, shorten some code and move getGlobal*() helpers to the top for future changes. Task-number: PYSIDE-2484 Change-Id: Iceadca5a42b5fb7cee330e61d543ca712b521ab3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/libpysideqml/pysideqmlnamedelement.cpp')
-rw-r--r--sources/pyside6/libpysideqml/pysideqmlnamedelement.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/pyside6/libpysideqml/pysideqmlnamedelement.cpp b/sources/pyside6/libpysideqml/pysideqmlnamedelement.cpp
index f29638017..8d2c558cf 100644
--- a/sources/pyside6/libpysideqml/pysideqmlnamedelement.cpp
+++ b/sources/pyside6/libpysideqml/pysideqmlnamedelement.cpp
@@ -31,7 +31,7 @@ PyObject *PySideQmlNamedElementPrivate::tp_call(PyObject *self, PyObject *args,
return nullptr;
auto *data = DecoratorPrivate::get<PySideQmlNamedElementPrivate>(self);
- auto *result = PySide::Qml::qmlNamedElementMacro(klass, data->string().c_str());
+ auto *result = PySide::Qml::qmlNamedElementMacro(klass, data->string());
Py_XINCREF(result);
return result;
}