aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/abstractmetalang.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-12-04 13:39:40 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-12-06 12:48:22 +0000
commit58720761d8b3c22d65d2bee1d064ce55cee62b0f (patch)
tree9a4f178cc951b060110629aa4035e49c8f0674fb /sources/shiboken2/ApiExtractor/abstractmetalang.h
parenta983ea88d1fa4263f2bbc3eb46241d9fd5965fed (diff)
shiboken: Refactor copying of the MetaLang* classes
Disable copying of the base classes AbstractMetaAttributes and AbstractMetaVariable and refactor the copy() functions of the derived classes in terms of protected assign*() functions. Change-Id: I6cbe1cfa02207230e914ad41dddba46c866cb689 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetalang.h')
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetalang.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.h b/sources/shiboken2/ApiExtractor/abstractmetalang.h
index d30e70c4a..31d9fa53e 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetalang.h
+++ b/sources/shiboken2/ApiExtractor/abstractmetalang.h
@@ -99,6 +99,7 @@ private:
class AbstractMetaAttributes
{
+ Q_DISABLE_COPY(AbstractMetaAttributes)
Q_GADGET
public:
AbstractMetaAttributes();
@@ -281,6 +282,9 @@ public:
return m_doc;
}
+protected:
+ void assignMetaAttributes(const AbstractMetaAttributes &other);
+
private:
Attributes m_attributes;
Attributes m_originalAttributes;
@@ -632,9 +636,9 @@ QDebug operator<<(QDebug d, const AbstractMetaType *at);
class AbstractMetaVariable
{
+ Q_DISABLE_COPY(AbstractMetaVariable)
public:
AbstractMetaVariable();
- AbstractMetaVariable(const AbstractMetaVariable &other);
virtual ~AbstractMetaVariable();
@@ -684,6 +688,9 @@ public:
return m_doc;
}
+protected:
+ void assignMetaVariable(const AbstractMetaVariable &other);
+
private:
QString m_originalName;
QString m_name;
@@ -736,6 +743,10 @@ public:
}
AbstractMetaArgument *copy() const;
+
+protected:
+ void assignMetaArgument(const AbstractMetaArgument &other);
+
private:
QString m_expression;
QString m_originalExpression;