QListSpecialMethods: honor RO5
This looks like another case of a base class with a protected, defaulted destructor, which interferes with RO5. Explicitly redeclare the other special member functions in order to suppress the warnings coming from the deprecated copies. Change-Id: Icf8c8817ef001d0503683d071c4f004db64caa2d Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit f6e99f347d243749af8d9beacd7c68852f0ff636) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 25296f86d6b1394035384c5aced0dbfaf0bdfd86)
This commit is contained in:
parent
8ba1f4ab8a
commit
516ace2e6a
@ -37,7 +37,12 @@ template <> struct QListSpecialMethods<QByteArray> : QListSpecialMethodsBase<QBy
|
|||||||
{
|
{
|
||||||
#ifndef Q_QDOC
|
#ifndef Q_QDOC
|
||||||
protected:
|
protected:
|
||||||
|
QListSpecialMethods() = default;
|
||||||
~QListSpecialMethods() = default;
|
~QListSpecialMethods() = default;
|
||||||
|
QListSpecialMethods(const QListSpecialMethods &) = default;
|
||||||
|
QListSpecialMethods(QListSpecialMethods &&) = default;
|
||||||
|
QListSpecialMethods &operator=(const QListSpecialMethods &) = default;
|
||||||
|
QListSpecialMethods &operator=(QListSpecialMethods &&) = default;
|
||||||
#endif
|
#endif
|
||||||
public:
|
public:
|
||||||
using QListSpecialMethodsBase<QByteArray>::indexOf;
|
using QListSpecialMethodsBase<QByteArray>::indexOf;
|
||||||
|
@ -30,7 +30,12 @@ namespace QtPrivate {
|
|||||||
template <typename T> struct QListSpecialMethodsBase
|
template <typename T> struct QListSpecialMethodsBase
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
QListSpecialMethodsBase() = default;
|
||||||
~QListSpecialMethodsBase() = default;
|
~QListSpecialMethodsBase() = default;
|
||||||
|
QListSpecialMethodsBase(const QListSpecialMethodsBase &) = default;
|
||||||
|
QListSpecialMethodsBase(QListSpecialMethodsBase &&) = default;
|
||||||
|
QListSpecialMethodsBase &operator=(const QListSpecialMethodsBase &) = default;
|
||||||
|
QListSpecialMethodsBase &operator=(QListSpecialMethodsBase &&) = default;
|
||||||
|
|
||||||
using Self = QList<T>;
|
using Self = QList<T>;
|
||||||
Self *self() { return static_cast<Self *>(this); }
|
Self *self() { return static_cast<Self *>(this); }
|
||||||
@ -51,7 +56,13 @@ public:
|
|||||||
template <typename T> struct QListSpecialMethods : QListSpecialMethodsBase<T>
|
template <typename T> struct QListSpecialMethods : QListSpecialMethodsBase<T>
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
QListSpecialMethods() = default;
|
||||||
~QListSpecialMethods() = default;
|
~QListSpecialMethods() = default;
|
||||||
|
QListSpecialMethods(const QListSpecialMethods &) = default;
|
||||||
|
QListSpecialMethods(QListSpecialMethods &&) = default;
|
||||||
|
QListSpecialMethods &operator=(const QListSpecialMethods &) = default;
|
||||||
|
QListSpecialMethods &operator=(QListSpecialMethods &&) = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using QListSpecialMethodsBase<T>::indexOf;
|
using QListSpecialMethodsBase<T>::indexOf;
|
||||||
using QListSpecialMethodsBase<T>::lastIndexOf;
|
using QListSpecialMethodsBase<T>::lastIndexOf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user