diff options
author | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2021-08-09 12:27:50 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-10 13:21:28 +0000 |
commit | 1527ca3bfb3c9aef97a3a8adb17c0fa530dd68f5 (patch) | |
tree | 66fe925fec74edf59f6efb781c60b6af28193888 | |
parent | 865a713d6bded5d19a64077a17b9295bbeb3b699 (diff) |
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
Change-Id: I5e018346415b9d0a1ebc3bbde2ab7c3ad5e6d9d0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit f636a1efa5a103b63db34c97ff664e6ac8ee0502)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/corelib/time/qcalendar.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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. */ |