summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qregularexpression.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-07-22 17:23:08 -0700
committerThiago Macieira <thiago.macieira@intel.com>2022-07-30 07:27:56 -0700
commite9c9e9225c333799258bb75c98f8722e074f272e (patch)
tree790ae18e35bf3da9708e87f216e27761135be9c9 /src/corelib/text/qregularexpression.cpp
parent3fcb0237dc718bc3605b231a1079ba9dfb5219b1 (diff)
QVariant: make many more QtCore types nothrow-copyable
All of those are implicitly-shared Qt data types whose copy constructors can't throw and have wide contracts (there aren't even any assertions for validity in any of them). These are all types with a QVariant implicit constructor, except for QCborValue, which is updated on this list so QJsonValue (which has a QVariant constructor) is also legitimately noexcept. To ensure we haven't made a mistake, the Private constructor checks again. Change-Id: I3859764fed084846bcb0fffd17044d8319a45e1f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/text/qregularexpression.cpp')
-rw-r--r--src/corelib/text/qregularexpression.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp
index f736f47059..2e5eabbbc8 100644
--- a/src/corelib/text/qregularexpression.cpp
+++ b/src/corelib/text/qregularexpression.cpp
@@ -1354,10 +1354,7 @@ QRegularExpression::QRegularExpression(const QString &pattern, PatternOptions op
\sa operator=()
*/
-QRegularExpression::QRegularExpression(const QRegularExpression &re)
- : d(re.d)
-{
-}
+QRegularExpression::QRegularExpression(const QRegularExpression &re) noexcept = default;
/*!
\fn QRegularExpression::QRegularExpression(QRegularExpression &&re)
@@ -1386,11 +1383,7 @@ 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.
*/
-QRegularExpression &QRegularExpression::operator=(const QRegularExpression &re)
-{
- d = re.d;
- return *this;
-}
+QRegularExpression &QRegularExpression::operator=(const QRegularExpression &re) noexcept = default;
/*!
\fn void QRegularExpression::swap(QRegularExpression &other)