QBasicTimer: purge deprecated API

Since 5.14, copy constructor and assignment.

Change-Id: Id569968ee3879caea2f69e373d392881901965f2
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Edward Welbourne 2020-07-16 17:54:35 +02:00
parent 2ae3f70a40
commit 6e5694b63b
2 changed files with 2 additions and 34 deletions

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@ -105,29 +105,6 @@ QT_BEGIN_NAMESPACE
\sa stop(), isActive(), swap()
*/
#if QT_DEPRECATED_SINCE(5, 14)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
/*!
\internal
*/
QBasicTimer::QBasicTimer(const QBasicTimer &other)
: id{other.id}
{
qWarning("QBasicTimer can't be copied");
}
/*!
\internal
*/
QBasicTimer &QBasicTimer::operator=(const QBasicTimer &other)
{
id = other.id;
qWarning("QBasicTimer can't be assigned to");
return *this;
}
#endif
#endif
/*!
\fn QBasicTimer::~QBasicTimer()

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@ -51,16 +51,7 @@ class QObject;
class Q_CORE_EXPORT QBasicTimer
{
int id;
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
Q_DISABLE_COPY(QBasicTimer)
#elif QT_DEPRECATED_SINCE(5, 14)
public:
// Just here to preserve BC, we can't remove them yet
QT_DEPRECATED_X("copy-construction is unsupported; use move-construction instead")
QBasicTimer(const QBasicTimer &);
QT_DEPRECATED_X("copy-assignment is unsupported; use move-assignment instead")
QBasicTimer &operator=(const QBasicTimer &);
#endif
public:
constexpr QBasicTimer() noexcept : id{0} {}