diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qprocess_p.h | 3 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.h | 5 | ||||
-rw-r--r-- | src/corelib/tools/qbytearraylist.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qlist.h | 6 | ||||
-rw-r--r-- | src/corelib/tools/qstringlist.h | 2 |
5 files changed, 12 insertions, 6 deletions
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h index aa7ecbe91d..eb2d1ed048 100644 --- a/src/corelib/io/qprocess_p.h +++ b/src/corelib/io/qprocess_p.h @@ -108,8 +108,7 @@ using QProcEnvKey = QByteArray; class QProcEnvValue { public: - QProcEnvValue() {} - QProcEnvValue(const QProcEnvValue &other) { *this = other; } + QProcEnvValue() = default; explicit QProcEnvValue(const QString &value) : stringValue(value) {} explicit QProcEnvValue(const QByteArray &value) : byteValue(value) {} bool operator==(const QProcEnvValue &other) const diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index f95502e75f..3cc6d559c1 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -398,10 +398,13 @@ class Q_CORE_EXPORT QVariant : type(variantType), is_shared(false), is_null(false) {} - inline Private(const Private &other) Q_DECL_NOTHROW +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + Private(const Private &other) Q_DECL_NOTHROW : data(other.data), type(other.type), is_shared(other.is_shared), is_null(other.is_null) {} + Private &operator=(const Private &other) Q_DECL_NOTHROW = default; +#endif union Data { char c; diff --git a/src/corelib/tools/qbytearraylist.h b/src/corelib/tools/qbytearraylist.h index d69e8bb54b..1261e1757c 100644 --- a/src/corelib/tools/qbytearraylist.h +++ b/src/corelib/tools/qbytearraylist.h @@ -67,7 +67,7 @@ template <> struct QListSpecialMethods<QByteArray> { #ifndef Q_CLANG_QDOC protected: - ~QListSpecialMethods() {} + ~QListSpecialMethods() = default; #endif public: inline QByteArray join() const diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 6643288bd5..e593ba9aa3 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -73,7 +73,7 @@ template <typename T> class QSet; template <typename T> struct QListSpecialMethods { protected: - ~QListSpecialMethods() {} + ~QListSpecialMethods() = default; }; template <> struct QListSpecialMethods<QByteArray>; template <> struct QListSpecialMethods<QString>; @@ -249,6 +249,8 @@ public: // can't remove it in Qt 5, since doing so would make the type trivial, // which changes the way it's passed to functions by value. inline iterator(const iterator &o) Q_DECL_NOTHROW : i(o.i){} + inline iterator &operator=(const iterator &o) Q_DECL_NOTHROW + { i = o.i; return *this; } #endif inline T &operator*() const { return i->t(); } inline T *operator->() const { return &i->t(); } @@ -302,6 +304,8 @@ public: // can't remove it in Qt 5, since doing so would make the type trivial, // which changes the way it's passed to functions by value. inline const_iterator(const const_iterator &o) Q_DECL_NOTHROW : i(o.i) {} + inline const_iterator &operator=(const const_iterator &o) Q_DECL_NOTHROW + { i = o.i; return *this; } #endif #ifdef QT_STRICT_ITERATORS inline explicit const_iterator(const iterator &o) Q_DECL_NOTHROW : i(o.i) {} diff --git a/src/corelib/tools/qstringlist.h b/src/corelib/tools/qstringlist.h index b6c48488df..6b04b7aef1 100644 --- a/src/corelib/tools/qstringlist.h +++ b/src/corelib/tools/qstringlist.h @@ -66,7 +66,7 @@ template <> struct QListSpecialMethods<QString> { #ifndef Q_QDOC protected: - ~QListSpecialMethods() {} + ~QListSpecialMethods() = default; #endif public: inline void sort(Qt::CaseSensitivity cs = Qt::CaseSensitive); |