summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Buhr <andreas@andreasbuhr.de>2020-12-21 12:02:53 +0100
committerAndreas Buhr <andreas@andreasbuhr.de>2020-12-21 14:36:14 +0100
commiteaeca91cae95f5ad723d7718b1813101ace693bc (patch)
treeea118d93de472020bfb16e5ab65956657afd2fa5
parent6eb40d47e9aa2cae89f7843f3cd16b89305d0739 (diff)
Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE
Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtTools. As the two are synonymous, this patch should have no impact on users. Task-number: QTBUG-86829 Change-Id: I6745aca7660441798b983a316287c62eb41fb579 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--src/linguist/shared/proitems.h8
-rw-r--r--src/linguist/shared/qm.cpp2
-rw-r--r--src/linguist/shared/qmakeevaluator_p.h2
-rw-r--r--src/linguist/shared/qmakeparser.h2
-rw-r--r--src/linguist/shared/translator.cpp4
-rw-r--r--src/linguist/shared/translator.h2
-rw-r--r--src/linguist/shared/translatormessage.h2
-rw-r--r--src/qdoc/config.cpp2
-rw-r--r--src/qdoc/doc.h2
-rw-r--r--src/qdoc/location.h2
-rw-r--r--src/qdoc/openedlist.h2
11 files changed, 15 insertions, 15 deletions
diff --git a/src/linguist/shared/proitems.h b/src/linguist/shared/proitems.h
index f2600626a..218d02a79 100644
--- a/src/linguist/shared/proitems.h
+++ b/src/linguist/shared/proitems.h
@@ -175,7 +175,7 @@ private:
friend QString operator+(const ProString &one, const ProString &two);
friend class ProKey;
};
-Q_DECLARE_TYPEINFO(ProString, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(ProString, Q_RELOCATABLE_TYPE);
class ProKey : public ProString {
public:
@@ -202,7 +202,7 @@ public:
private:
ProKey(const ProString &other);
};
-Q_DECLARE_TYPEINFO(ProKey, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(ProKey, Q_RELOCATABLE_TYPE);
size_t qHash(const ProString &str);
QString operator+(const ProString &one, const ProString &two);
@@ -309,7 +309,7 @@ public:
{ return contains(ProString(str), cs); }
bool contains(const char *str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
};
-Q_DECLARE_TYPEINFO(ProStringList, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(ProStringList, Q_RELOCATABLE_TYPE);
inline ProStringList operator+(const ProStringList &one, const ProStringList &two)
{ ProStringList ret = one; ret += two; return ret; }
@@ -462,7 +462,7 @@ private:
int m_offset;
};
-Q_DECLARE_TYPEINFO(ProFunctionDef, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(ProFunctionDef, Q_RELOCATABLE_TYPE);
struct ProFunctionDefs {
QHash<ProKey, ProFunctionDef> testFunctions;
diff --git a/src/linguist/shared/qm.cpp b/src/linguist/shared/qm.cpp
index 0863a302e..84554a33d 100644
--- a/src/linguist/shared/qm.cpp
+++ b/src/linguist/shared/qm.cpp
@@ -118,7 +118,7 @@ private:
QStringList m_translations;
};
-Q_DECLARE_TYPEINFO(ByteTranslatorMessage, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(ByteTranslatorMessage, Q_RELOCATABLE_TYPE);
bool ByteTranslatorMessage::operator<(const ByteTranslatorMessage& m) const
{
diff --git a/src/linguist/shared/qmakeevaluator_p.h b/src/linguist/shared/qmakeevaluator_p.h
index 073d33989..a7d911289 100644
--- a/src/linguist/shared/qmakeevaluator_p.h
+++ b/src/linguist/shared/qmakeevaluator_p.h
@@ -109,7 +109,7 @@ extern QMakeStatics statics;
}
-Q_DECLARE_TYPEINFO(QMakeInternal::QMakeBuiltin, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(QMakeInternal::QMakeBuiltin, Q_RELOCATABLE_TYPE);
QT_END_NAMESPACE
diff --git a/src/linguist/shared/qmakeparser.h b/src/linguist/shared/qmakeparser.h
index 39daf2bbd..c30115750 100644
--- a/src/linguist/shared/qmakeparser.h
+++ b/src/linguist/shared/qmakeparser.h
@@ -230,7 +230,7 @@ private:
};
#if !defined(__GNUC__) || __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)
-Q_DECLARE_TYPEINFO(QMakeParser::BlockScope, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(QMakeParser::BlockScope, Q_RELOCATABLE_TYPE);
Q_DECLARE_TYPEINFO(QMakeParser::Context, Q_PRIMITIVE_TYPE);
#endif
diff --git a/src/linguist/shared/translator.cpp b/src/linguist/shared/translator.cpp
index 123ed70c5..cfe61cb0a 100644
--- a/src/linguist/shared/translator.cpp
+++ b/src/linguist/shared/translator.cpp
@@ -521,7 +521,7 @@ struct TranslatorMessageIdPtr {
const TranslatorMessage *ptr;
};
-Q_DECLARE_TYPEINFO(TranslatorMessageIdPtr, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(TranslatorMessageIdPtr, Q_RELOCATABLE_TYPE);
inline size_t qHash(TranslatorMessageIdPtr tmp)
{
@@ -547,7 +547,7 @@ struct TranslatorMessageContentPtr {
const TranslatorMessage *ptr;
};
-Q_DECLARE_TYPEINFO(TranslatorMessageContentPtr, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(TranslatorMessageContentPtr, Q_RELOCATABLE_TYPE);
inline size_t qHash(TranslatorMessageContentPtr tmp)
{
diff --git a/src/linguist/shared/translator.h b/src/linguist/shared/translator.h
index 8b58e4986..29cf68fa7 100644
--- a/src/linguist/shared/translator.h
+++ b/src/linguist/shared/translator.h
@@ -105,7 +105,7 @@ public:
{ return context == o.context && source == o.source && comment == o.comment; }
QString context, source, comment;
};
-Q_DECLARE_TYPEINFO(TMMKey, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(TMMKey, Q_RELOCATABLE_TYPE);
inline size_t qHash(const TMMKey &key)
{
return qHash(key.context) ^ qHash(key.source) ^ qHash(key.comment);
diff --git a/src/linguist/shared/translatormessage.h b/src/linguist/shared/translatormessage.h
index 3c3726d2a..310d7dfa8 100644
--- a/src/linguist/shared/translatormessage.h
+++ b/src/linguist/shared/translatormessage.h
@@ -150,7 +150,7 @@ private:
bool m_plural;
};
-Q_DECLARE_TYPEINFO(TranslatorMessage, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(TranslatorMessage, Q_RELOCATABLE_TYPE);
QT_END_NAMESPACE
diff --git a/src/qdoc/config.cpp b/src/qdoc/config.cpp
index a66e68eee..b7dcd1e7a 100644
--- a/src/qdoc/config.cpp
+++ b/src/qdoc/config.cpp
@@ -135,7 +135,7 @@ public:
QStringList accum;
QStringList next;
};
-Q_DECLARE_TYPEINFO(MetaStackEntry, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(MetaStackEntry, Q_RELOCATABLE_TYPE);
/*!
Start accumulating values in a list by appending an empty
diff --git a/src/qdoc/doc.h b/src/qdoc/doc.h
index 55153b7e6..6832743f0 100644
--- a/src/qdoc/doc.h
+++ b/src/qdoc/doc.h
@@ -117,7 +117,7 @@ private:
DocPrivate *priv { nullptr };
static DocUtilities &m_utilities;
};
-Q_DECLARE_TYPEINFO(Doc, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(Doc, Q_RELOCATABLE_TYPE);
typedef QList<Doc> DocList;
QT_END_NAMESPACE
diff --git a/src/qdoc/location.h b/src/qdoc/location.h
index 7effa191b..f35160fa7 100644
--- a/src/qdoc/location.h
+++ b/src/qdoc/location.h
@@ -114,7 +114,7 @@ private:
static QString project;
static QRegularExpression *spuriousRegExp;
};
-Q_DECLARE_TYPEINFO(Location::StackEntry, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(Location::StackEntry, Q_RELOCATABLE_TYPE);
Q_DECLARE_TYPEINFO(Location, Q_COMPLEX_TYPE); // stkTop = &stkBottom
QT_END_NAMESPACE
diff --git a/src/qdoc/openedlist.h b/src/qdoc/openedlist.h
index c41a4adf7..113a79762 100644
--- a/src/qdoc/openedlist.h
+++ b/src/qdoc/openedlist.h
@@ -70,7 +70,7 @@ private:
QString pref;
QString suff;
};
-Q_DECLARE_TYPEINFO(OpenedList, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(OpenedList, Q_RELOCATABLE_TYPE);
QT_END_NAMESPACE