From bee4cd31d60f3b35a37a2eb98fdfc60ba76cfe1c Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Tue, 26 Oct 2021 17:38:46 +0200 Subject: __feature__: handle properties with function overloads This is the implementation, see the conclusion of the issue. [ChangeLog][PySide6] When a property would override an existing function with multiple arity or parameters, append an underscore to the property name. REMARK: The current implementation is very correct. It uses introspection via the signature module. But that adds a constant overhead to the true_property feature. Actually, there are only 2 known cases where this overlap happens. It might be considered to simplify things by checking the string names of these two functions? Fixes: PYSIDE-1670 Pick-to: 6.2 Change-Id: I14927995698726957ba8c515dddf5e37c21910ce Reviewed-by: Cristian Maureira-Fredes --- sources/pyside6/libpyside/pysidestaticstrings.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'sources/pyside6/libpyside/pysidestaticstrings.cpp') diff --git a/sources/pyside6/libpyside/pysidestaticstrings.cpp b/sources/pyside6/libpyside/pysidestaticstrings.cpp index 8f74cd19f..ddaf07a79 100644 --- a/sources/pyside6/libpyside/pysidestaticstrings.cpp +++ b/sources/pyside6/libpyside/pysidestaticstrings.cpp @@ -59,6 +59,7 @@ STATIC_STRING_IMPL(dict_ring, "dict_ring") STATIC_STRING_IMPL(im_func, "im_func") STATIC_STRING_IMPL(im_self, "im_self") STATIC_STRING_IMPL(name, "name") +STATIC_STRING_IMPL(parameters, "parameters") STATIC_STRING_IMPL(property, "property") STATIC_STRING_IMPL(select_id, "select_id") } // namespace PyName -- cgit v1.2.3