aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/PySide6')
-rw-r--r--sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp6
-rw-r--r--sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp b/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
index b9f66f98b..ffa337b93 100644
--- a/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
+++ b/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
@@ -51,7 +51,11 @@
#include <pyside_p.h>
#include <QtCore/QMutex>
+#include <QtCore/QTypeRevision>
+
+#include <QtQml/qqml.h>
#include <QtQml/QJSValue>
+#include <QtQml/QQmlListProperty>
// Mutex used to avoid race condition on PySide::nextQObjectMemoryAddr.
static QMutex nextQmlElementMutex;
@@ -113,14 +117,12 @@ int PySide::qmlRegisterType(PyObject *pyObj, const char *uri, int versionMajor,
// Allow registering Qt Quick items.
bool registered = false;
-#ifdef PYSIDE_QML_SUPPORT
QuickRegisterItemFunction quickRegisterItemFunction = getQuickRegisterItemFunction();
if (quickRegisterItemFunction) {
registered =
quickRegisterItemFunction(pyObj, uri, versionMajor, versionMinor,
qmlName, creatable, noCreationReason, &type);
}
-#endif
// Register as simple QObject rather than Qt Quick item.
if (!registered) {
diff --git a/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp b/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp
index 542482d32..852fbd8de 100644
--- a/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp
+++ b/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp
@@ -244,12 +244,10 @@ bool quickRegisterType(PyObject *pyObj, const char *uri, int versionMajor, int v
void PySide::initQuickSupport(PyObject *module)
{
Q_UNUSED(module);
-#ifdef PYSIDE_QML_SUPPORT
// We need to manually register a pointer version of these types in order for them to be used as property types.
qRegisterMetaType<QQuickPaintedItem*>("QQuickPaintedItem*");
qRegisterMetaType<QQuickFramebufferObject*>("QQuickFramebufferObject*");
qRegisterMetaType<QQuickItem*>("QQuickItem*");
setQuickRegisterItemFunction(quickRegisterType);
-#endif
}