aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/libpyside
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-01-08 13:32:41 +0100
committerMaximilian Goldstein <max.goldstein@qt.io>2020-07-24 08:30:52 +0000
commitcc91eb893e53ea2516d895bd1861c1159d5a5c90 (patch)
tree5c9611f52052050671ec72ff6be1d906114a7840 /sources/pyside2/libpyside
parent9c6e82e2857e4ce45c578b73807de4b3b941ab38 (diff)
PySide2: Add qmlRegisterUncreatableType()
Extend the Quick register helper function by the bool creatable and string noCreationReason parameters, extract a QML helper taking the same parameters and add the overload. Task-number: PYSIDE-574 Change-Id: I955dbd158c7b22d2637bbac464937f9fda6d7901 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside2/libpyside')
-rw-r--r--sources/pyside2/libpyside/pyside.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/sources/pyside2/libpyside/pyside.h b/sources/pyside2/libpyside/pyside.h
index c1a298cc8..e241ac74d 100644
--- a/sources/pyside2/libpyside/pyside.h
+++ b/sources/pyside2/libpyside/pyside.h
@@ -144,9 +144,11 @@ PYSIDE_API PyObject *getWrapperForQObject(QObject *cppSelf, SbkObjectType *sbk_t
#ifdef PYSIDE_QML_SUPPORT
// Used by QtQuick module to notify QtQml that custom QtQuick items can be registered.
-typedef bool (*QuickRegisterItemFunction)(PyObject *pyObj, const char *uri, int versionMajor,
- int versionMinor, const char *qmlName,
- QQmlPrivate::RegisterType *);
+using QuickRegisterItemFunction =
+ bool (*)(PyObject *pyObj, const char *uri, int versionMajor,
+ int versionMinor, const char *qmlName,
+ bool creatable, const char *noCreationReason,
+ QQmlPrivate::RegisterType *);
PYSIDE_API QuickRegisterItemFunction getQuickRegisterItemFunction();
PYSIDE_API void setQuickRegisterItemFunction(QuickRegisterItemFunction function);
#endif // PYSIDE_QML_SUPPORT
@@ -169,4 +171,3 @@ PYSIDE_API bool registerInternalQtConf();
#endif // PYSIDE_H
-