Skip to content

Commit

Permalink
Delete copy-assign for QTZP backends
Browse files Browse the repository at this point in the history
Nothing should be using it and one or two of them would need
non-trivial implementation if not deleted.

Change-Id: I4769eaba8abff1d7915e17e2ab010f7ec8e02551
Reviewed-by: Giuseppe D'Angelo <[email protected]>
Reviewed-by: Marc Mutz <[email protected]>
  • Loading branch information
ediosyncratic committed Nov 6, 2024
1 parent 4be99b1 commit 8c0dcf1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/corelib/time/qtimezoneprivate_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE

class Q_AUTOTEST_EXPORT QTimeZonePrivate : public QSharedData
{
// Nothing should be copy-assigning instances of either this or its derived
// classes (only clone() should copy, using the copy-constructor):
bool operator=(const QTimeZonePrivate &) const = delete;
public:
// Version of QTimeZone::OffsetData struct using msecs for efficiency
struct Data {
Expand Down Expand Up @@ -174,6 +177,7 @@ template<> QTimeZonePrivate *QSharedDataPointer<QTimeZonePrivate>::clone();

class Q_AUTOTEST_EXPORT QUtcTimeZonePrivate final : public QTimeZonePrivate
{
bool operator=(const QUtcTimeZonePrivate &) const = delete;
public:
// Create default UTC time zone
QUtcTimeZonePrivate();
Expand Down Expand Up @@ -236,6 +240,7 @@ class Q_AUTOTEST_EXPORT QUtcTimeZonePrivate final : public QTimeZonePrivate
#if QT_CONFIG(timezone_tzdb)
class QChronoTimeZonePrivate final : public QTimeZonePrivate
{
bool operator=(const QChronoTimeZonePrivate &) const = delete;
QChronoTimeZonePrivate(const QChronoTimeZonePrivate &) = default;
public:
QChronoTimeZonePrivate();
Expand Down Expand Up @@ -265,6 +270,7 @@ class QChronoTimeZonePrivate final : public QTimeZonePrivate
#elif defined(Q_OS_DARWIN)
class Q_AUTOTEST_EXPORT QMacTimeZonePrivate final : public QTimeZonePrivate
{
bool operator=(const QMacTimeZonePrivate &) const = delete;
public:
// Create default time zone
QMacTimeZonePrivate();
Expand Down Expand Up @@ -310,6 +316,7 @@ class Q_AUTOTEST_EXPORT QMacTimeZonePrivate final : public QTimeZonePrivate
#elif defined(Q_OS_ANDROID)
class QAndroidTimeZonePrivate final : public QTimeZonePrivate
{
bool operator=(const QAndroidTimeZonePrivate &) const = delete;
public:
// Create default time zone
QAndroidTimeZonePrivate();
Expand Down Expand Up @@ -378,6 +385,7 @@ struct QTzTimeZoneCacheEntry

class Q_AUTOTEST_EXPORT QTzTimeZonePrivate final : public QTimeZonePrivate
{
bool operator=(const QTzTimeZonePrivate &) const = delete;
QTzTimeZonePrivate(const QTzTimeZonePrivate &) = default;
public:
// Create default time zone
Expand Down Expand Up @@ -430,6 +438,7 @@ class Q_AUTOTEST_EXPORT QTzTimeZonePrivate final : public QTimeZonePrivate
#elif QT_CONFIG(icu)
class Q_AUTOTEST_EXPORT QIcuTimeZonePrivate final : public QTimeZonePrivate
{
bool operator=(const QIcuTimeZonePrivate &) const = delete;
public:
// Create default time zone
QIcuTimeZonePrivate();
Expand Down Expand Up @@ -473,6 +482,7 @@ class Q_AUTOTEST_EXPORT QIcuTimeZonePrivate final : public QTimeZonePrivate
#elif defined(Q_OS_WIN)
class Q_AUTOTEST_EXPORT QWinTimeZonePrivate final : public QTimeZonePrivate
{
bool operator=(const QWinTimeZonePrivate &) const = delete;
public:
struct QWinTransitionRule {
int startYear;
Expand Down

0 comments on commit 8c0dcf1

Please sign in to comment.