aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/abstractmetalang.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-05-22 10:22:02 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-05-29 09:46:19 +0000
commitb72e4d6bcfb1335ee6dcad9ab30e429b62b8e6e1 (patch)
tree4c329f649dd14fd89f51ab4382774b9bb199d883 /sources/shiboken2/ApiExtractor/abstractmetalang.h
parent16e5f4710e16aec6c46e3f9736f0be3cef3a537d (diff)
Remove AbstractMetaFunction::invalid()
Change AbstractMetaBuilderPrivate::traverseFunction() to consistently return 0 if something does not fit. Previously, functions with half-parsed arguments with the invalid flag set were returned. This caused strange side effects since the flag was not checked in all places. The only relevant information is whether some constructors were rejected. In that case, no default constructors or default copy constructors should be generated. This is now determined by checking the code model function item; the attribute HasRejectConstructor is introduced for this. This fixes: - Make it possible to reject the QTextStreamManipulator constructor taking a function pointer without having a default constructor generated: typedef void (QTextStream::*QTSMFI)(int); QTextStreamManipulator(QTSMFI m, int a) Q_DECL_NOTHROW - Implement QtCharts whose class QAbstractSeries has a rejected constructor. Change-Id: I6310574ba677dac20699f257340d2c2a55674353 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetalang.h')
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetalang.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.h b/sources/shiboken2/ApiExtractor/abstractmetalang.h
index 4d6d5fb1f..a16f79c30 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetalang.h
+++ b/sources/shiboken2/ApiExtractor/abstractmetalang.h
@@ -135,6 +135,8 @@ public:
Invokable = 0x00040000,
+ HasRejectedConstructor = 0x00080000,
+
Final = FinalInTargetLang | FinalInCpp
};
Q_DECLARE_FLAGS(Attributes, Attribute)
@@ -842,7 +844,6 @@ public:
m_declaringClass(0),
m_propertySpec(0),
m_constant(false),
- m_invalid(false),
m_reverse(false),
m_userAdded(false),
m_explicit(false),
@@ -1029,14 +1030,6 @@ public:
}
int actualMinimumArgumentCount() const;
- void setInvalid(bool on)
- {
- m_invalid = on;
- }
- bool isInvalid() const
- {
- return m_invalid;
- }
bool isDeprecated() const;
bool isDestructor() const
{
@@ -1215,7 +1208,6 @@ private:
QPropertySpec *m_propertySpec;
AbstractMetaArgumentList m_arguments;
uint m_constant : 1;
- uint m_invalid : 1;
uint m_reverse : 1;
uint m_userAdded : 1;
uint m_explicit : 1;