From f636a1efa5a103b63db34c97ff664e6ac8ee0502 Mon Sep 17 00:00:00 2001 From: Ievgenii Meshcheriakov Date: Mon, 9 Aug 2021 12:27:50 +0200 Subject: [PATCH] QCalendarRegistry: Explicitly disable moving and copying Add Q_DISABLE_COPY_MOVE to QCalendarRegistry to silence the following warning produced by QtStaticAnalysisBot: class 'QCalendarRegistry' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator QCalendarRegistry is a singleton so it does not need to be moved or copied. The warning was introduced by d0ae1ef33a6eed02acde7304298794f4f0119e16. Task-number: QTBUG-93004 Pick-to: 6.2 Change-Id: I5e018346415b9d0a1ebc3bbde2ab7c3ad5e6d9d0 Reviewed-by: Edward Welbourne --- src/corelib/time/qcalendar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/time/qcalendar.cpp b/src/corelib/time/qcalendar.cpp index 8f545515fe..4631c9a94c 100644 --- a/src/corelib/time/qcalendar.cpp +++ b/src/corelib/time/qcalendar.cpp @@ -88,6 +88,8 @@ namespace QtPrivate { */ class QCalendarRegistry { + Q_DISABLE_COPY_MOVE(QCalendarRegistry); // This is a singleton. + /* Lock protecting the registry from concurrent modification. */