aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/pysidetest/testobject.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-06-25 08:15:50 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-06-26 14:35:41 +0200
commit816474711c6890b41c9254bb0a343311268be692 (patch)
tree82be76d084b02c27ce98db16dda29b9b9c9e9cbb /sources/pyside6/tests/pysidetest/testobject.h
parent16098891ad21c2ba984582a1de770e49f961f22b (diff)
shiboken6: Prevent converter name clashes between classes and partially qualified aliases
Change the behavior of registerConverterName() to always overwrite existing entries. It should then only be used for fully qualified names. Add a function registerConverterAlias() which does not overwrite existing entries for registering partially qualified names. Use registerConverterAlias() for the primitive types since they are re-registered in multiple modules. This prevents clashes when registering duplicate classes. For example, registering a globally scoped class "Connection" will then overwrite the partially qualified alias "Connection" of "QMetaObject::Connection". Fixes: PYSIDE-2792 Change-Id: I2bd3c0bff96da6d3ceddd46a2368fe6b94bbed68 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/tests/pysidetest/testobject.h')
-rw-r--r--sources/pyside6/tests/pysidetest/testobject.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/pyside6/tests/pysidetest/testobject.h b/sources/pyside6/tests/pysidetest/testobject.h
index a095a382e..054d0ce59 100644
--- a/sources/pyside6/tests/pysidetest/testobject.h
+++ b/sources/pyside6/tests/pysidetest/testobject.h
@@ -28,6 +28,8 @@ public:
using TypedefValue = IntValue;
+class Connection;
+
class PYSIDETEST_API TestObject : public QObject
{
Q_OBJECT
@@ -41,6 +43,7 @@ public:
void addChild(QObject* c) { m_children.append(c); emit childrenChanged(m_children); }
void emitIdValueSignal();
+ void emitConnectionSignal(int handle);
void emitStaticMethodDoubleSignal();
void emitSignalWithDefaultValue_void();
@@ -58,6 +61,7 @@ public:
signals:
void idValue(int newValue);
+ void connectionSignal(const Connection &c);
void justASignal();
void staticMethodDouble();
void childrenChanged(const QList<QObject*>&);