diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-17 10:13:49 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-29 08:06:21 +0200 |
commit | 499438adf26804dc5760162bba8c89d707fc98a3 (patch) | |
tree | 10e105c21e60b29fea821e7f42298b9b9ab3936b /sources | |
parent | 8bf3f03ba1ce0bcdb1b4a3f2edd7ffd672066e1c (diff) |
Indicate limited API builds in QLibraryInfo::build()
Change-Id: I55fe70da8adf6faba0f8099d4d127ae3963fa2c6
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside2/PySide2/QtCore/typesystem_core_common.xml | 3 | ||||
-rw-r--r-- | sources/pyside2/PySide2/glue/qtcore.cpp | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml index 5d8a1c9c7..986356720 100644 --- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml +++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml @@ -2322,6 +2322,9 @@ </value-type> <object-type name="QLibraryInfo"> <enum-type name="LibraryLocation"/> + <modify-function signature="build()"> + <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qlibraryinfo_build"/> + </modify-function> </object-type> <object-type name="QMutexLocker" copyable="no"> <!-- PYSIDE-1271: Creating locking capable objects inside sections that diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp index d76f2980e..a0ca23662 100644 --- a/sources/pyside2/PySide2/glue/qtcore.cpp +++ b/sources/pyside2/PySide2/glue/qtcore.cpp @@ -2012,3 +2012,13 @@ pthread_cleanup_push(qthread_pthread_cleanup, &gil); pthread_cleanup_pop(0); #endif // @snippet qthread_pthread_cleanup_uninstall + +// @snippet qlibraryinfo_build +#if defined(IS_PY3K) && defined(Py_LIMITED_API) +auto suffix = PyUnicode_FromString(" [limited API]"); +auto oldResult = pyResult; +pyResult = PyUnicode_Concat(pyResult, suffix); +Py_DECREF(oldResult); +Py_DECREF(suffix); +#endif +// @snippet qlibraryinfo_build |