aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-04-05 11:03:21 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-04-06 10:38:58 +0200
commitb9bf10b9cff9399ef575842f286e96dc24dac5c9 (patch)
tree1cc0126cb06074ff07b0cff2fa2737194d008af3 /sources
parente669e80e232f88121308a32a5401edc91a9bbff2 (diff)
Revert "shiboken: Add XML attribute to turn off method caching"
This reverts commit fcbbab0a6b5949b5c3726214ed87898b5fbcebcc. This is no longer required after a fix generating the property code into the setattro methods of QObject-derived classes. Task-number: PYSIDE-803 Task-number: PYSIDE-1255 Change-Id: I9e989c0592eaaf25aa55a1db49537daa4bdb2a57 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources')
-rw-r--r--sources/pyside2/PySide2/QtQuick/typesystem_quick.xml2
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.h3
-rw-r--r--sources/shiboken2/ApiExtractor/typesystemparser.cpp4
-rw-r--r--sources/shiboken2/doc/typesystem_specifying_types.rst5
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp4
5 files changed, 3 insertions, 15 deletions
diff --git a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
index 12c1ac33d..223eff773 100644
--- a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
+++ b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
@@ -64,7 +64,7 @@
<object-type name="QQuickImageResponse" since="5.6"/>
<object-type name="QQuickTransform"/>
- <object-type name="QQuickItem" delete-in-main-thread="true" no-override-caching="true">
+ <object-type name="QQuickItem" delete-in-main-thread="true">
<value-type name="UpdatePaintNodeData"/>
<enum-type name="Flag" flags="Flags"/>
<enum-type name="ItemChange"/>
diff --git a/sources/shiboken2/ApiExtractor/typesystem.h b/sources/shiboken2/ApiExtractor/typesystem.h
index 8d8d60f3f..4d0a23ca1 100644
--- a/sources/shiboken2/ApiExtractor/typesystem.h
+++ b/sources/shiboken2/ApiExtractor/typesystem.h
@@ -1219,8 +1219,7 @@ class ComplexTypeEntry : public TypeEntry
{
public:
enum TypeFlag {
- Deprecated = 0x4,
- NoOverrideCaching = 0x8
+ Deprecated = 0x4
};
Q_DECLARE_FLAGS(TypeFlags, TypeFlag)
diff --git a/sources/shiboken2/ApiExtractor/typesystemparser.cpp b/sources/shiboken2/ApiExtractor/typesystemparser.cpp
index 5252ac00a..0bb56f0fe 100644
--- a/sources/shiboken2/ApiExtractor/typesystemparser.cpp
+++ b/sources/shiboken2/ApiExtractor/typesystemparser.cpp
@@ -60,7 +60,6 @@ static inline QString untilAttribute() { return QStringLiteral("until"); }
static inline QString defaultSuperclassAttribute() { return QStringLiteral("default-superclass"); }
static inline QString deleteInMainThreadAttribute() { return QStringLiteral("delete-in-main-thread"); }
static inline QString deprecatedAttribute() { return QStringLiteral("deprecated"); }
-static inline QString noOverrideCachingAttribute() { return QStringLiteral("no-override-caching"); }
static inline QString exceptionHandlingAttribute() { return QStringLiteral("exception-handling"); }
static inline QString extensibleAttribute() { return QStringLiteral("extensible"); }
static inline QString flagsAttribute() { return QStringLiteral("flags"); }
@@ -1477,9 +1476,6 @@ void TypeSystemParser::applyComplexTypeAttributes(const QXmlStreamReader &reader
} else if (name == deprecatedAttribute()) {
if (convertBoolean(attributes->takeAt(i).value(), deprecatedAttribute(), false))
ctype->setTypeFlags(ctype->typeFlags() | ComplexTypeEntry::Deprecated);
- } else if (name == noOverrideCachingAttribute()) {
- if (convertBoolean(attributes->takeAt(i).value(), noOverrideCachingAttribute(), false))
- ctype->setTypeFlags(ctype->typeFlags() | ComplexTypeEntry::NoOverrideCaching);
} else if (name == deleteInMainThreadAttribute()) {
if (convertBoolean(attributes->takeAt(i).value(), deleteInMainThreadAttribute(), false))
ctype->setDeleteInMainThread(true);
diff --git a/sources/shiboken2/doc/typesystem_specifying_types.rst b/sources/shiboken2/doc/typesystem_specifying_types.rst
index 3ab6adbd6..bca1e0774 100644
--- a/sources/shiboken2/doc/typesystem_specifying_types.rst
+++ b/sources/shiboken2/doc/typesystem_specifying_types.rst
@@ -300,7 +300,6 @@ object-type
allow-thread="..."
exception-handling="..."
hash-function="..."
- no-override-caching="yes | no"
stream="yes | no"
revision="..." />
</typesystem>
@@ -324,10 +323,6 @@ object-type
specify the default handling for the corresponding function modification
(see :ref:`modify-function`).
- The *optional* attribute **no-override-caching** can be used to turn off the
- caching of methods overridden in Python, which can trigger obscure bugs when
- setting attributes in Python 2.
-
interface-type
^^^^^^^^^^^^^^
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index a712c3ebb..2cdb8870c 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -2202,9 +2202,7 @@ bool ShibokenGenerator::injectedCodeUsesArgument(const AbstractMetaFunction *fun
bool ShibokenGenerator::useOverrideCaching(const AbstractMetaClass *metaClass)
{
- return metaClass->isPolymorphic()
- && !metaClass->typeEntry()->typeFlags().testFlag(ComplexTypeEntry::NoOverrideCaching);
-
+ return metaClass->isPolymorphic();
}
ShibokenGenerator::AttroCheck ShibokenGenerator::checkAttroFunctionNeeds(const AbstractMetaClass *metaClass) const