summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-10-15 14:51:07 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-10-19 00:47:19 +0200
commitaee81c00cfedcc878580da1afe5b3d407d32e40f (patch)
treed55b79826fcdbc3f411137258d7d2cc3fe423786
parent79917d79656d3a217ca4f9a4c24a6d87c5ebc06a (diff)
Revert "QRegularExpression: add move constructor(s)"
The QRE classes are not ready for move construction. They would need to deal with the possibility of a null-dpointer, and they currently don't; this clashes with the policy of having moved-from classes in valid-but-unspecified state. This reverts commit 733ab10961a4d6539b4d42cf4768e9cb0b88c6a7. Change-Id: I36720dc9d0bf754a980eba373e37abf725cea174 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/text/qregularexpression.cpp37
-rw-r--r--src/corelib/text/qregularexpression.h7
2 files changed, 0 insertions, 44 deletions
diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp
index cd5cd53c55..827884d709 100644
--- a/src/corelib/text/qregularexpression.cpp
+++ b/src/corelib/text/qregularexpression.cpp
@@ -1363,24 +1363,12 @@ QRegularExpression::QRegularExpression(const QRegularExpression &re)
}
/*!
- \fn QRegularExpression::QRegularExpression(QRegularExpression &&re)
-
- Constructs a QRegularExpression object by moving from \a re.
-
- \since 6.0
-
- \sa operator=
-*/
-
-/*!
Destroys the QRegularExpression object.
*/
QRegularExpression::~QRegularExpression()
{
}
-QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QRegularExpressionPrivate)
-
/*!
Assigns the regular expression \a re to this object, and returns a reference
to the copy. Both the pattern and the pattern options are copied.
@@ -2030,8 +2018,6 @@ QRegularExpressionMatch::~QRegularExpressionMatch()
{
}
-QT_DEFINE_QSDP_SPECIALIZATION_DTOR(QRegularExpressionMatchPrivate)
-
/*!
Constructs a match result by copying the result of the given \a match.
@@ -2043,16 +2029,6 @@ QRegularExpressionMatch::QRegularExpressionMatch(const QRegularExpressionMatch &
}
/*!
- \fn QRegularExpressionMatch::QRegularExpressionMatch(QRegularExpressionMatch &&re)
-
- Constructs a match result by moving from the given \a match.
-
- \since 6.0
-
- \sa operator=()
-*/
-
-/*!
Assigns the match result \a match to this object, and returns a reference
to the copy.
*/
@@ -2474,8 +2450,6 @@ QRegularExpressionMatchIterator::~QRegularExpressionMatchIterator()
{
}
-QT_DEFINE_QSDP_SPECIALIZATION_DTOR(QRegularExpressionMatchIteratorPrivate)
-
/*!
Constructs a QRegularExpressionMatchIterator object as a copy of \a
iterator.
@@ -2488,17 +2462,6 @@ QRegularExpressionMatchIterator::QRegularExpressionMatchIterator(const QRegularE
}
/*!
- \fn QRegularExpressionMatchIterator::QRegularExpressionMatchIterator(QRegularExpressionMatchIterator &&iterator)
-
- Constructs a QRegularExpressionMatchIterator object by moving from \a
- iterator.
-
- \since 6.0
-
- \sa operator=()
-*/
-
-/*!
Assigns the iterator \a iterator to this object, and returns a reference to
the copy.
*/
diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h
index b33c44020f..b588dbf384 100644
--- a/src/corelib/text/qregularexpression.h
+++ b/src/corelib/text/qregularexpression.h
@@ -60,8 +60,6 @@ class QRegularExpressionMatchIterator;
struct QRegularExpressionPrivate;
class QRegularExpression;
-QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(QRegularExpressionPrivate, Q_CORE_EXPORT)
-
Q_CORE_EXPORT size_t qHash(const QRegularExpression &key, size_t seed = 0) noexcept;
class Q_CORE_EXPORT QRegularExpression
@@ -88,7 +86,6 @@ public:
QRegularExpression();
explicit QRegularExpression(const QString &pattern, PatternOptions options = NoPatternOption);
QRegularExpression(const QRegularExpression &re);
- QRegularExpression(QRegularExpression &&re) = default;
~QRegularExpression();
QRegularExpression &operator=(const QRegularExpression &re);
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QRegularExpression)
@@ -202,7 +199,6 @@ Q_CORE_EXPORT QDebug operator<<(QDebug debug, QRegularExpression::PatternOptions
#endif
struct QRegularExpressionMatchPrivate;
-QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QRegularExpressionMatchPrivate, Q_CORE_EXPORT)
class Q_CORE_EXPORT QRegularExpressionMatch
{
@@ -210,7 +206,6 @@ public:
QRegularExpressionMatch();
~QRegularExpressionMatch();
QRegularExpressionMatch(const QRegularExpressionMatch &match);
- QRegularExpressionMatch(QRegularExpressionMatch &&match) = default;
QRegularExpressionMatch &operator=(const QRegularExpressionMatch &match);
QRegularExpressionMatch &operator=(QRegularExpressionMatch &&match) noexcept
{ d.swap(match.d); return *this; }
@@ -278,7 +273,6 @@ class QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel {};
}
struct QRegularExpressionMatchIteratorPrivate;
-QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QRegularExpressionMatchIteratorPrivate, Q_CORE_EXPORT)
class Q_CORE_EXPORT QRegularExpressionMatchIterator
{
@@ -286,7 +280,6 @@ public:
QRegularExpressionMatchIterator();
~QRegularExpressionMatchIterator();
QRegularExpressionMatchIterator(const QRegularExpressionMatchIterator &iterator);
- QRegularExpressionMatchIterator(QRegularExpressionMatchIterator &&iterator) = default;
QRegularExpressionMatchIterator &operator=(const QRegularExpressionMatchIterator &iterator);
QRegularExpressionMatchIterator &operator=(QRegularExpressionMatchIterator &&iterator) noexcept
{ d.swap(iterator.d); return *this; }