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. Pick-to: 6.9 6.8 Change-Id: Icf8c8817ef001d0503683d071c4f004db64caa2d Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
74b875641f
commit
f6e99f347d
@ -37,7 +37,12 @@ template <> struct QListSpecialMethods<QByteArray> : QListSpecialMethodsBase<QBy
|
||||
{
|
||||
#ifndef Q_QDOC
|
||||
protected:
|
||||
QListSpecialMethods() = default;
|
||||
~QListSpecialMethods() = default;
|
||||
QListSpecialMethods(const QListSpecialMethods &) = default;
|
||||
QListSpecialMethods(QListSpecialMethods &&) = default;
|
||||
QListSpecialMethods &operator=(const QListSpecialMethods &) = default;
|
||||
QListSpecialMethods &operator=(QListSpecialMethods &&) = default;
|
||||
#endif
|
||||
public:
|
||||
using QListSpecialMethodsBase<QByteArray>::indexOf;
|
||||
|
@ -31,7 +31,12 @@ namespace QtPrivate {
|
||||
template <typename T> struct QListSpecialMethodsBase
|
||||
{
|
||||
protected:
|
||||
QListSpecialMethodsBase() = default;
|
||||
~QListSpecialMethodsBase() = default;
|
||||
QListSpecialMethodsBase(const QListSpecialMethodsBase &) = default;
|
||||
QListSpecialMethodsBase(QListSpecialMethodsBase &&) = default;
|
||||
QListSpecialMethodsBase &operator=(const QListSpecialMethodsBase &) = default;
|
||||
QListSpecialMethodsBase &operator=(QListSpecialMethodsBase &&) = default;
|
||||
|
||||
using Self = QList<T>;
|
||||
Self *self() { return static_cast<Self *>(this); }
|
||||
@ -52,7 +57,13 @@ public:
|
||||
template <typename T> struct QListSpecialMethods : QListSpecialMethodsBase<T>
|
||||
{
|
||||
protected:
|
||||
QListSpecialMethods() = default;
|
||||
~QListSpecialMethods() = default;
|
||||
QListSpecialMethods(const QListSpecialMethods &) = default;
|
||||
QListSpecialMethods(QListSpecialMethods &&) = default;
|
||||
QListSpecialMethods &operator=(const QListSpecialMethods &) = default;
|
||||
QListSpecialMethods &operator=(QListSpecialMethods &&) = default;
|
||||
|
||||
public:
|
||||
using QListSpecialMethodsBase<T>::indexOf;
|
||||
using QListSpecialMethodsBase<T>::lastIndexOf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user