diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2022-07-22 17:23:08 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-07-30 07:27:56 -0700 |
| commit | e9c9e9225c333799258bb75c98f8722e074f272e (patch) | |
| tree | 790ae18e35bf3da9708e87f216e27761135be9c9 /src/corelib/io/qurl.cpp | |
| parent | 3fcb0237dc718bc3605b231a1079ba9dfb5219b1 (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/io/qurl.cpp')
| -rw-r--r-- | src/corelib/io/qurl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index c3122e27f27..14d89a9ea8d 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -1837,7 +1837,7 @@ QUrl::QUrl() : d(nullptr) /*! Constructs a copy of \a other. */ -QUrl::QUrl(const QUrl &other) : d(other.d) +QUrl::QUrl(const QUrl &other) noexcept : d(other.d) { if (d) d->ref.ref(); @@ -3227,7 +3227,7 @@ bool QUrl::operator !=(const QUrl &url) const /*! Assigns the specified \a url to this object. */ -QUrl &QUrl::operator =(const QUrl &url) +QUrl &QUrl::operator =(const QUrl &url) noexcept { if (!d) { if (url.d) { |
