From e9c9e9225c333799258bb75c98f8722e074f272e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 22 Jul 2022 17:23:08 -0700 Subject: 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 --- src/corelib/text/qlocale.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/corelib/text/qlocale.cpp') diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index c42fa645c3..b19e4498d3 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -1072,10 +1072,7 @@ QLocale::QLocale(Language language, Script script, Territory territory) Constructs a QLocale object as a copy of \a other. */ -QLocale::QLocale(const QLocale &other) -{ - d = other.d; -} +QLocale::QLocale(const QLocale &other) noexcept = default; /*! Destructor @@ -1090,11 +1087,7 @@ QLocale::~QLocale() to this QLocale object. */ -QLocale &QLocale::operator=(const QLocale &other) -{ - d = other.d; - return *this; -} +QLocale &QLocale::operator=(const QLocale &other) noexcept = default; /*! \internal -- cgit v1.2.3