aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/libshiboken/signature
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/libshiboken/signature')
-rw-r--r--sources/shiboken6/libshiboken/signature/signature.cpp11
-rw-r--r--sources/shiboken6/libshiboken/signature/signature_helper.cpp13
-rw-r--r--sources/shiboken6/libshiboken/signature/signature_p.h1
3 files changed, 7 insertions, 18 deletions
diff --git a/sources/shiboken6/libshiboken/signature/signature.cpp b/sources/shiboken6/libshiboken/signature/signature.cpp
index 624d55a3e..c844e2694 100644
--- a/sources/shiboken6/libshiboken/signature/signature.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature.cpp
@@ -54,7 +54,7 @@
#include "sbkstring.h"
#include "sbkstaticstrings.h"
#include "sbkstaticstrings_p.h"
-
+#include "sbkfeature_base.h"
#include "signature_p.h"
#include <structmember.h>
@@ -106,19 +106,22 @@ PyObject *GetTypeKey(PyObject *ob)
*
* PYSIDE-1286: We use correct __module__ and __qualname__, now.
*/
+ // XXX we obtain also the current selection.
+ // from the current module name.
AutoDecRef module_name(PyObject_GetAttr(ob, PyMagicName::module()));
if (module_name.isNull()) {
// We have no module_name because this is a module ;-)
PyErr_Clear();
module_name.reset(PyObject_GetAttr(ob, PyMagicName::name()));
- return Py_BuildValue("O", module_name.object());
+ return Py_BuildValue("O"/*i"*/, module_name.object()/*, getFeatureSelectId()*/);
}
- AutoDecRef class_name(_get_qualname(ob));
+ AutoDecRef class_name(PyObject_GetAttr(ob, PyMagicName::qualname()));
if (class_name.isNull()) {
Py_FatalError("Signature: missing class name in GetTypeKey");
return nullptr;
}
- return Py_BuildValue("(OO)", module_name.object(), class_name.object());
+ return Py_BuildValue("(O"/*i*/"O)", module_name.object(), /*getFeatureSelectId(),*/
+ class_name.object());
}
static PyObject *empty_dict = nullptr;
diff --git a/sources/shiboken6/libshiboken/signature/signature_helper.cpp b/sources/shiboken6/libshiboken/signature/signature_helper.cpp
index f38740254..d27ddeabb 100644
--- a/sources/shiboken6/libshiboken/signature/signature_helper.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature_helper.cpp
@@ -57,19 +57,6 @@ using namespace Shiboken;
extern "C" {
-// Helper for __qualname__ which might not always exist in Python 2 (type).
-PyObject *_get_qualname(PyObject *ob)
-{
- // We support __qualname__ for types, only.
- assert(PyType_Check(ob));
- PyObject *name = PyObject_GetAttr(ob, PyMagicName::qualname());
- if (name == nullptr) {
- PyErr_Clear();
- name = PyObject_GetAttr(ob, PyMagicName::name());
- }
- return name;
-}
-
static int _fixup_getset(PyTypeObject *type, const char *name, PyGetSetDef *new_gsp)
{
/*
diff --git a/sources/shiboken6/libshiboken/signature/signature_p.h b/sources/shiboken6/libshiboken/signature/signature_p.h
index cdfc1cbc1..7e622f3f1 100644
--- a/sources/shiboken6/libshiboken/signature/signature_p.h
+++ b/sources/shiboken6/libshiboken/signature/signature_p.h
@@ -93,7 +93,6 @@ PyObject *pyside_tp_get___doc__(PyObject *tp);
// signature_helper.cpp
-PyObject *_get_qualname(PyObject *ob);
int add_more_getsets(PyTypeObject *type, PyGetSetDef *gsp, PyObject **doc_descr);
PyObject *name_key_to_func(PyObject *ob);
int insert_snake_case_variants(PyObject *dict);