Remove unused code into GUI

This commit is contained in:
andrea
2022-07-11 15:10:25 +02:00
committed by Uwe
parent 094ae93678
commit 3018985f80
47 changed files with 14 additions and 1592 deletions

View File

@@ -214,19 +214,6 @@ QMap<QString, CallTip> CallTipsList::extractTips(const QString& context) const
items.pop_front();
if (!dict.hasKey(std::string(modname.toLatin1())))
return tips; // unknown object
#if 0
// get the Python object we need
Py::Object obj = dict.getItem(std::string(modname.toLatin1()));
while (!items.isEmpty()) {
QByteArray name = items.front().toLatin1();
std::string attr = name.constData();
items.pop_front();
if (obj.hasAttr(attr))
obj = obj.getAttr(attr);
else
return tips;
}
#else
// Don't use hasattr & getattr because if a property is bound to a method this will be executed twice.
PyObject* code = Py_CompileString(static_cast<const char*>(context.toLatin1()), "<CallTipsList>", Py_eval_input);
if (!code) {
@@ -244,15 +231,7 @@ QMap<QString, CallTip> CallTipsList::extractTips(const QString& context) const
return tips;
}
Py::Object obj(eval, true);
#endif
// Checks whether the type is a subclass of PyObjectBase because to get the doc string
// of a member we must get it by its type instead of its instance otherwise we get the
// wrong string, namely that of the type of the member.
// Note: 3rd party libraries may use their own type object classes so that we cannot
// reliably use Py::Type. To be on the safe side we should use Py::Object to assign
// the used type object to.
//Py::Object type = obj.type();
Py::Object type(PyObject_Type(obj.ptr()), true);
Py::Object inst = obj; // the object instance
PyObject* typeobj = Base::getTypeAsObject(&Base::PyObjectBase::Type);