diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-06-25 08:15:50 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-06-26 14:35:41 +0200 |
| commit | 816474711c6890b41c9254bb0a343311268be692 (patch) | |
| tree | 82be76d084b02c27ce98db16dda29b9b9c9e9cbb /sources/pyside6/tests/pysidetest/testobject.cpp | |
| parent | 16098891ad21c2ba984582a1de770e49f961f22b (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.cpp')
| -rw-r--r-- | sources/pyside6/tests/pysidetest/testobject.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/pyside6/tests/pysidetest/testobject.cpp b/sources/pyside6/tests/pysidetest/testobject.cpp index fe4ec98f7..bcf629bf8 100644 --- a/sources/pyside6/tests/pysidetest/testobject.cpp +++ b/sources/pyside6/tests/pysidetest/testobject.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "testobject.h" +#include "connection.h" #include <QtCore/QDebug> @@ -10,6 +11,12 @@ void TestObject::emitIdValueSignal() emit idValue(m_idValue); } +void TestObject::emitConnectionSignal(int handle) +{ + Connection connection(handle); + emit connectionSignal(connection); +} + void TestObject::emitStaticMethodDoubleSignal() { emit staticMethodDouble(); |
