aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/parser/typeinfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/ApiExtractor/parser/typeinfo.h')
-rw-r--r--sources/shiboken6/ApiExtractor/parser/typeinfo.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/sources/shiboken6/ApiExtractor/parser/typeinfo.h b/sources/shiboken6/ApiExtractor/parser/typeinfo.h
index cf3576eb6..e4f363b67 100644
--- a/sources/shiboken6/ApiExtractor/parser/typeinfo.h
+++ b/sources/shiboken6/ApiExtractor/parser/typeinfo.h
@@ -10,8 +10,11 @@
#include <QtCore/QString>
#include <QtCore/QSharedDataPointer>
+#include <QtCore/QtCompare>
#include <QtCore/QStringList>
+#include <utility>
+
QT_FORWARD_DECLARE_CLASS(QDebug)
QT_FORWARD_DECLARE_CLASS(QTextStream)
@@ -28,8 +31,8 @@ public:
~TypeInfo();
TypeInfo(const TypeInfo &);
TypeInfo& operator=(const TypeInfo &);
- TypeInfo(TypeInfo &&);
- TypeInfo& operator=(TypeInfo &&);
+ TypeInfo(TypeInfo &&) noexcept;
+ TypeInfo &operator=(TypeInfo &&) noexcept;
static TypeInfo voidType();
static TypeInfo varArgsType();
@@ -77,11 +80,12 @@ public:
void addInstantiation(const TypeInfo &i);
void clearInstantiations();
- bool isStdType() const;
+ bool isPlain() const; // neither const,volatile, no indirections/references, array
- QPair<qsizetype, qsizetype> parseTemplateArgumentList(const QString &l, qsizetype from = 0);
+ bool isStdType() const;
- bool equals(const TypeInfo &other) const;
+ std::pair<qsizetype, qsizetype>
+ parseTemplateArgumentList(const QString &l, qsizetype from = 0);
// ### arrays and templates??
@@ -100,12 +104,16 @@ public:
static bool stripLeadingConst(QString *s);
static bool stripLeadingVolatile(QString *s);
- static bool stripLeadingQualifier(const QString &qualifier, QString *s);
+ static bool stripLeadingQualifier(QLatin1StringView qualifier, QString *s);
static void stripQualifiers(QString *s);
void simplifyStdType();
private:
+ friend bool comparesEqual(const TypeInfo &lhs,
+ const TypeInfo &rhs) noexcept;
+ Q_DECLARE_EQUALITY_COMPARABLE(TypeInfo)
+
QSharedDataPointer<TypeInfoData> d;
friend class TypeInfoTemplateArgumentHandler;
@@ -113,12 +121,6 @@ private:
static TypeInfo resolveType(CodeModelItem item, TypeInfo const &__type, const ScopeModelItem &__scope);
};
-inline bool operator==(const TypeInfo &t1, const TypeInfo &t2)
-{ return t1.equals(t2); }
-
-inline bool operator!=(const TypeInfo &t1, const TypeInfo &t2)
-{ return !t1.equals(t2); }
-
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug d, const TypeInfo &t);
#endif