diff options
Diffstat (limited to 'src/corelib/serialization/qjsonobject.h')
-rw-r--r-- | src/corelib/serialization/qjsonobject.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/corelib/serialization/qjsonobject.h b/src/corelib/serialization/qjsonobject.h index 80fe6b2f3f..d8e2ab9ca7 100644 --- a/src/corelib/serialization/qjsonobject.h +++ b/src/corelib/serialization/qjsonobject.h @@ -42,10 +42,8 @@ #include <QtCore/qjsonvalue.h> #include <QtCore/qiterator.h> -#ifdef Q_COMPILER_INITIALIZER_LISTS #include <QtCore/qpair.h> #include <initializer_list> -#endif QT_BEGIN_NAMESPACE @@ -60,34 +58,32 @@ class Q_CORE_EXPORT QJsonObject public: QJsonObject(); -#if defined(Q_COMPILER_INITIALIZER_LISTS) || defined(Q_QDOC) QJsonObject(std::initializer_list<QPair<QString, QJsonValue> > args) { initialize(); for (std::initializer_list<QPair<QString, QJsonValue> >::const_iterator i = args.begin(); i != args.end(); ++i) insert(i->first, i->second); } -#endif ~QJsonObject(); QJsonObject(const QJsonObject &other); QJsonObject &operator =(const QJsonObject &other); - QJsonObject(QJsonObject &&other) Q_DECL_NOTHROW + QJsonObject(QJsonObject &&other) noexcept : d(other.d), o(other.o) { other.d = nullptr; other.o = nullptr; } - QJsonObject &operator =(QJsonObject &&other) Q_DECL_NOTHROW + QJsonObject &operator =(QJsonObject &&other) noexcept { swap(other); return *this; } - void swap(QJsonObject &other) Q_DECL_NOTHROW + void swap(QJsonObject &other) noexcept { qSwap(d, other.d); qSwap(o, other.o); |