From 256fbdeedd32b6ffee96280fa0afafe40fa2cb1f Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 21 Sep 2022 16:38:54 +0200 Subject: [PATCH] Mark QTimeZone's copy-constructor noexcept This appears to have been overlooked. It's just the copy-construction of a QSharedDataPointer, which is declared noexcept, so transparently safe. Change-Id: I85e1f750be26dfa94d52dfc0b14efe9c1857d645 Reviewed-by: Thiago Macieira --- src/corelib/time/qtimezone.cpp | 2 +- src/corelib/time/qtimezone.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/time/qtimezone.cpp b/src/corelib/time/qtimezone.cpp index c57e9e77fb1..298e4777192 100644 --- a/src/corelib/time/qtimezone.cpp +++ b/src/corelib/time/qtimezone.cpp @@ -381,7 +381,7 @@ QTimeZone::QTimeZone(QTimeZonePrivate &dd) Copy constructor, copy \a other to this. */ -QTimeZone::QTimeZone(const QTimeZone &other) +QTimeZone::QTimeZone(const QTimeZone &other) noexcept : d(other.d) { } diff --git a/src/corelib/time/qtimezone.h b/src/corelib/time/qtimezone.h index 825caf17402..677fb4afb24 100644 --- a/src/corelib/time/qtimezone.h +++ b/src/corelib/time/qtimezone.h @@ -61,7 +61,7 @@ public: QTimeZone(const QByteArray &zoneId, int offsetSeconds, const QString &name, const QString &abbreviation, QLocale::Territory territory = QLocale::AnyTerritory, const QString &comment = QString()); - QTimeZone(const QTimeZone &other); + QTimeZone(const QTimeZone &other) noexcept; QTimeZone(QTimeZone &&other) noexcept; ~QTimeZone();