aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2022-05-03 10:20:34 +0200
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2022-05-09 16:58:07 +0200
commit936bdcf97f8ca657531496592dfce7d9144fa977 (patch)
tree2c43449a511b946f1d7d23fc641833cf86a89e71 /sources/pyside6/PySide6
parent8f778b22f62f5502af355a7d699e04526072f1c2 (diff)
PySide6: add qCDebug, qCInfo, qCWarning, qCCritical macros
- added tests for the macros Only 'void debug(const char *msg, ...) const' was considered among the overloads in QMessageLogger. For more info, see the comment section of the related issue PYSIDE-1899 Task-number: PYSIDE-1899 Pick-to: 6.3 Change-Id: Ie9a28abde8556f84736de75cf4b914002094c768 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6')
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml27
-rw-r--r--sources/pyside6/PySide6/glue/qtcore.cpp5
2 files changed, 32 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index d2d2f9658..8c717c268 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -3192,6 +3192,33 @@
<object-type name="QLoggingCategory"/>
+ <add-function signature="qCDebug(PyObject *, const char *)">
+ <extra-includes>
+ <include file-name="qloggingcategory.h" location="global" />
+ </extra-includes>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
+ qCDebug(*category, %2);
+ </inject-code>
+ </add-function>
+
+ <add-function signature="qCCritical(PyObject *, const char *)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
+ qCCritical(*category, %2);
+ </inject-code>
+ </add-function>
+
+ <add-function signature="qCInfo(PyObject *, const char *)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
+ qCInfo(*category, %2);
+ </inject-code>
+ </add-function>
+
+ <add-function signature="qCWarning(PyObject *, const char *)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qloggingcategory_to_cpp">
+ qCWarning(*category, %2);
+ </inject-code>
+ </add-function>
+
<suppress-warning text="^.*enum 'Qt::Initialization' does not have a type entry.*$"/>
<suppress-warning text="^.*Enum 'QRandomGenerator::System'.*does not have a type entry.*$"/>
diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp
index b856d910b..c6d1192ae 100644
--- a/sources/pyside6/PySide6/glue/qtcore.cpp
+++ b/sources/pyside6/PySide6/glue/qtcore.cpp
@@ -1577,3 +1577,8 @@ if (dataChar == nullptr) {
}
// @snippet qdatastream-read-bytes
+// @snippet qloggingcategory_to_cpp
+ QLoggingCategory *category{nullptr};
+ Shiboken::Conversions::pythonToCppPointer(SbkPySide6_QtCoreTypes[SBK_QLOGGINGCATEGORY_IDX],
+ pyArgs[0], &(category));
+// @snippet qloggingcategory_to_cpp