summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qdebug.h2
-rw-r--r--src/corelib/io/qprocess_p.h2
-rw-r--r--src/corelib/io/qurl.h8
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h13
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp2
-rw-r--r--src/corelib/kernel/qvariant.h12
-rw-r--r--src/corelib/tools/qarraydata.h4
-rw-r--r--src/corelib/tools/qbitarray.h6
-rw-r--r--src/corelib/tools/qbytearray.h7
-rw-r--r--src/corelib/tools/qcache.h4
-rw-r--r--src/corelib/tools/qcollator.h10
-rw-r--r--src/corelib/tools/qhash.h8
-rw-r--r--src/corelib/tools/qlist.h2
-rw-r--r--src/corelib/tools/qregularexpression.h12
-rw-r--r--src/corelib/tools/qshareddata.h26
-rw-r--r--src/corelib/tools/qstring.h10
-rw-r--r--src/corelib/tools/qstringlist.h6
-rw-r--r--src/corelib/tools/qtimezone.h4
-rw-r--r--src/corelib/tools/qvector.h2
19 files changed, 72 insertions, 68 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 4295800f1a..99c2909aa0 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -85,7 +85,7 @@ public:
inline QDebug(const QDebug &o):stream(o.stream) { ++stream->ref; }
inline QDebug &operator=(const QDebug &other);
~QDebug();
- inline void swap(QDebug &other) { qSwap(stream, other.stream); }
+ inline void swap(QDebug &other) Q_DECL_NOTHROW { qSwap(stream, other.stream); }
QDebug &resetFormat();
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h
index 35626ddc38..8c5987aa05 100644
--- a/src/corelib/io/qprocess_p.h
+++ b/src/corelib/io/qprocess_p.h
@@ -98,7 +98,7 @@ public:
QByteArray key;
uint hash;
};
-inline uint qHash(const QProcEnvKey &key) { return key.hash; }
+inline uint qHash(const QProcEnvKey &key) Q_DECL_NOTHROW { return key.hash; }
class QProcEnvValue
{
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index abf96f5fcd..a1f62925e2 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -173,14 +173,14 @@ public:
QUrl &operator=(const QString &url);
#endif
#ifdef Q_COMPILER_RVALUE_REFS
- QUrl(QUrl &&other) : d(0)
- { qSwap(d, other.d); }
- inline QUrl &operator=(QUrl &&other)
+ QUrl(QUrl &&other) Q_DECL_NOTHROW : d(other.d)
+ { other.d = Q_NULLPTR; }
+ inline QUrl &operator=(QUrl &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
~QUrl();
- inline void swap(QUrl &other) { qSwap(d, other.d); }
+ inline void swap(QUrl &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
void setUrl(const QString &url, ParsingMode mode = TolerantMode);
QString url(FormattingOptions options = FormattingOptions(PrettyDecoded)) const;
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index a49cf160cc..75c2009fe4 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -91,7 +91,7 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, const QModelIndex &);
class QPersistentModelIndexData;
// qHash is a friend, but we can't use default arguments for friends (ยง8.3.6.4)
-uint qHash(const QPersistentModelIndex &index, uint seed = 0);
+uint qHash(const QPersistentModelIndex &index, uint seed = 0) Q_DECL_NOTHROW;
class Q_CORE_EXPORT QPersistentModelIndex
{
@@ -106,11 +106,12 @@ public:
{ return !operator==(other); }
QPersistentModelIndex &operator=(const QPersistentModelIndex &other);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QPersistentModelIndex(QPersistentModelIndex &&other) : d(other.d) { other.d = 0; }
- inline QPersistentModelIndex &operator=(QPersistentModelIndex &&other)
+ inline QPersistentModelIndex(QPersistentModelIndex &&other) Q_DECL_NOTHROW
+ : d(other.d) { other.d = Q_NULLPTR; }
+ inline QPersistentModelIndex &operator=(QPersistentModelIndex &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
- inline void swap(QPersistentModelIndex &other) { qSwap(d, other.d); }
+ inline void swap(QPersistentModelIndex &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
bool operator==(const QModelIndex &other) const;
bool operator!=(const QModelIndex &other) const;
QPersistentModelIndex &operator=(const QModelIndex &other);
@@ -128,14 +129,14 @@ public:
bool isValid() const;
private:
QPersistentModelIndexData *d;
- friend uint qHash(const QPersistentModelIndex &, uint seed);
+ friend uint qHash(const QPersistentModelIndex &, uint seed) Q_DECL_NOTHROW;
#ifndef QT_NO_DEBUG_STREAM
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QPersistentModelIndex &);
#endif
};
Q_DECLARE_SHARED(QPersistentModelIndex)
-inline uint qHash(const QPersistentModelIndex &index, uint seed)
+inline uint qHash(const QPersistentModelIndex &index, uint seed) Q_DECL_NOTHROW
{ return qHash(index.d, seed); }
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index ca3d92bad1..555b5e0263 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -318,7 +318,7 @@ QCoreApplication *QCoreApplication::self = 0;
uint QCoreApplicationPrivate::attribs = (1 << Qt::AA_SynthesizeMouseForUnhandledTouchEvents);
struct QCoreApplicationData {
- QCoreApplicationData() {
+ QCoreApplicationData() Q_DECL_NOTHROW {
#ifndef QT_NO_LIBRARY
app_libpaths = 0;
#endif
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 7dce813bb5..7bee756fa5 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -253,13 +253,13 @@ class Q_CORE_EXPORT QVariant
QVariant& operator=(const QVariant &other);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QVariant(QVariant &&other) : d(other.d)
+ inline QVariant(QVariant &&other) Q_DECL_NOTHROW : d(other.d)
{ other.d = Private(); }
- inline QVariant &operator=(QVariant &&other)
+ inline QVariant &operator=(QVariant &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
- inline void swap(QVariant &other) { qSwap(d, other.d); }
+ inline void swap(QVariant &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
Type type() const;
int userType() const;
@@ -360,15 +360,15 @@ class Q_CORE_EXPORT QVariant
};
struct Private
{
- inline Private(): type(Invalid), is_shared(false), is_null(true)
+ inline Private() Q_DECL_NOTHROW : type(Invalid), is_shared(false), is_null(true)
{ data.ptr = 0; }
// Internal constructor for initialized variants.
- explicit inline Private(uint variantType)
+ explicit inline Private(uint variantType) Q_DECL_NOTHROW
: type(variantType), is_shared(false), is_null(false)
{}
- inline Private(const Private &other)
+ inline Private(const Private &other) Q_DECL_NOTHROW
: data(other.data), type(other.type),
is_shared(other.is_shared), is_null(other.is_null)
{}
diff --git a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h
index 2119b3d4ac..df44503a8e 100644
--- a/src/corelib/tools/qarraydata.h
+++ b/src/corelib/tools/qarraydata.h
@@ -113,7 +113,7 @@ struct Q_CORE_EXPORT QArrayData
size_t alignment) Q_DECL_NOTHROW;
static const QArrayData shared_null[2];
- static QArrayData *sharedNull() { return const_cast<QArrayData*>(shared_null); }
+ static QArrayData *sharedNull() Q_DECL_NOTHROW { return const_cast<QArrayData*>(shared_null); }
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QArrayData::AllocationOptions)
@@ -237,7 +237,7 @@ struct QTypedArrayData
return result;
}
- static QTypedArrayData *sharedNull()
+ static QTypedArrayData *sharedNull() Q_DECL_NOTHROW
{
Q_STATIC_ASSERT(sizeof(QTypedArrayData) == sizeof(QArrayData));
return static_cast<QTypedArrayData *>(QArrayData::sharedNull());
diff --git a/src/corelib/tools/qbitarray.h b/src/corelib/tools/qbitarray.h
index 768dfa912d..8d550554ff 100644
--- a/src/corelib/tools/qbitarray.h
+++ b/src/corelib/tools/qbitarray.h
@@ -53,12 +53,12 @@ public:
QBitArray(const QBitArray &other) : d(other.d) {}
inline QBitArray &operator=(const QBitArray &other) { d = other.d; return *this; }
#ifdef Q_COMPILER_RVALUE_REFS
- inline QBitArray(QBitArray &&other) : d(std::move(other.d)) {}
- inline QBitArray &operator=(QBitArray &&other)
+ inline QBitArray(QBitArray &&other) Q_DECL_NOTHROW : d(std::move(other.d)) {}
+ inline QBitArray &operator=(QBitArray &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
- inline void swap(QBitArray &other) { qSwap(d, other.d); }
+ inline void swap(QBitArray &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
inline int size() const { return (d.size() << 3) - *d.constData(); }
inline int count() const { return (d.size() << 3) - *d.constData(); }
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 6286624961..a549585400 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -195,12 +195,13 @@ public:
QByteArray &operator=(const QByteArray &);
QByteArray &operator=(const char *str);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QByteArray(QByteArray && other) : d(other.d) { other.d = Data::sharedNull(); }
- inline QByteArray &operator=(QByteArray &&other)
+ inline QByteArray(QByteArray && other) Q_DECL_NOTHROW : d(other.d) { other.d = Data::sharedNull(); }
+ inline QByteArray &operator=(QByteArray &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
- inline void swap(QByteArray &other) { qSwap(d, other.d); }
+ inline void swap(QByteArray &other) Q_DECL_NOTHROW
+ { qSwap(d, other.d); }
inline int size() const;
bool isEmpty() const;
diff --git a/src/corelib/tools/qcache.h b/src/corelib/tools/qcache.h
index 960e0422a1..80fdb8c9cd 100644
--- a/src/corelib/tools/qcache.h
+++ b/src/corelib/tools/qcache.h
@@ -83,7 +83,7 @@ class QCache
Q_DISABLE_COPY(QCache)
public:
- inline explicit QCache(int maxCost = 100);
+ inline explicit QCache(int maxCost = 100) Q_DECL_NOTHROW;
inline ~QCache() { clear(); }
inline int maxCost() const { return mx; }
@@ -110,7 +110,7 @@ private:
};
template <class Key, class T>
-inline QCache<Key, T>::QCache(int amaxCost)
+inline QCache<Key, T>::QCache(int amaxCost) Q_DECL_NOTHROW
: f(0), l(0), mx(amaxCost), total(0) {}
template <class Key, class T>
diff --git a/src/corelib/tools/qcollator.h b/src/corelib/tools/qcollator.h
index f9ae44cf6b..98f06bcc1f 100644
--- a/src/corelib/tools/qcollator.h
+++ b/src/corelib/tools/qcollator.h
@@ -52,10 +52,10 @@ public:
~QCollatorSortKey();
QCollatorSortKey &operator=(const QCollatorSortKey &other);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QCollatorSortKey &operator=(QCollatorSortKey &&other)
+ inline QCollatorSortKey &operator=(QCollatorSortKey &&other) Q_DECL_NOTHROW
{ swap(other); return *this; }
#endif
- void swap(QCollatorSortKey &other)
+ void swap(QCollatorSortKey &other) Q_DECL_NOTHROW
{ d.swap(other.d); }
int compare(const QCollatorSortKey &key) const;
@@ -82,13 +82,13 @@ public:
~QCollator();
QCollator &operator=(const QCollator &);
#ifdef Q_COMPILER_RVALUE_REFS
- QCollator(QCollator &&other)
+ QCollator(QCollator &&other) Q_DECL_NOTHROW
: d(other.d) { other.d = 0; }
- QCollator &operator=(QCollator &&other)
+ QCollator &operator=(QCollator &&other) Q_DECL_NOTHROW
{ swap(other); return *this; }
#endif
- void swap(QCollator &other)
+ void swap(QCollator &other) Q_DECL_NOTHROW
{ qSwap(d, other.d); }
void setLocale(const QLocale &locale);
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 2a2c840c23..13006095e6 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -328,7 +328,7 @@ class QHash
static inline int alignOfNode() { return qMax<int>(sizeof(void*), Q_ALIGNOF(Node)); }
public:
- inline QHash() : d(const_cast<QHashData *>(&QHashData::shared_null)) { }
+ inline QHash() Q_DECL_NOTHROW : d(const_cast<QHashData *>(&QHashData::shared_null)) { }
#ifdef Q_COMPILER_INITIALIZER_LISTS
inline QHash(std::initializer_list<std::pair<Key,T> > list)
: d(const_cast<QHashData *>(&QHashData::shared_null))
@@ -343,11 +343,11 @@ public:
QHash<Key, T> &operator=(const QHash<Key, T> &other);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QHash(QHash<Key, T> &&other) : d(other.d) { other.d = const_cast<QHashData *>(&QHashData::shared_null); }
- inline QHash<Key, T> &operator=(QHash<Key, T> &&other)
+ inline QHash(QHash<Key, T> &&other) Q_DECL_NOTHROW : d(other.d) { other.d = const_cast<QHashData *>(&QHashData::shared_null); }
+ inline QHash<Key, T> &operator=(QHash<Key, T> &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
- inline void swap(QHash<Key, T> &other) { qSwap(d, other.d); }
+ inline void swap(QHash<Key, T> &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
bool operator==(const QHash<Key, T> &other) const;
inline bool operator!=(const QHash<Key, T> &other) const { return !(*this == other); }
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 321c3e6765..2031c32069 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -112,7 +112,7 @@ class QList : public QListSpecialMethods<T>
union { QListData p; QListData::Data *d; };
public:
- inline QList() : d(const_cast<QListData::Data *>(&QListData::shared_null)) { }
+ inline QList() Q_DECL_NOTHROW : d(const_cast<QListData::Data *>(&QListData::shared_null)) { }
QList(const QList<T> &l);
~QList();
QList<T> &operator=(const QList<T> &l);
diff --git a/src/corelib/tools/qregularexpression.h b/src/corelib/tools/qregularexpression.h
index f332227094..8e19a53142 100644
--- a/src/corelib/tools/qregularexpression.h
+++ b/src/corelib/tools/qregularexpression.h
@@ -77,11 +77,11 @@ public:
QRegularExpression &operator=(const QRegularExpression &re);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QRegularExpression &operator=(QRegularExpression &&re)
+ QRegularExpression &operator=(QRegularExpression &&re) Q_DECL_NOTHROW
{ d.swap(re.d); return *this; }
#endif
- inline void swap(QRegularExpression &re) { d.swap(re.d); }
+ void swap(QRegularExpression &other) Q_DECL_NOTHROW { d.swap(other.d); }
QString pattern() const;
void setPattern(const QString &pattern);
@@ -169,10 +169,10 @@ public:
QRegularExpressionMatch &operator=(const QRegularExpressionMatch &match);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QRegularExpressionMatch &operator=(QRegularExpressionMatch &&match)
+ QRegularExpressionMatch &operator=(QRegularExpressionMatch &&match) Q_DECL_NOTHROW
{ d.swap(match.d); return *this; }
#endif
- inline void swap(QRegularExpressionMatch &match) { d.swap(match.d); }
+ void swap(QRegularExpressionMatch &other) Q_DECL_NOTHROW { d.swap(other.d); }
QRegularExpression regularExpression() const;
QRegularExpression::MatchType matchType() const;
@@ -226,10 +226,10 @@ public:
QRegularExpressionMatchIterator(const QRegularExpressionMatchIterator &iterator);
QRegularExpressionMatchIterator &operator=(const QRegularExpressionMatchIterator &iterator);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QRegularExpressionMatchIterator &operator=(QRegularExpressionMatchIterator &&iterator)
+ QRegularExpressionMatchIterator &operator=(QRegularExpressionMatchIterator &&iterator) Q_DECL_NOTHROW
{ d.swap(iterator.d); return *this; }
#endif
- void swap(QRegularExpressionMatchIterator &iterator) { d.swap(iterator.d); }
+ void swap(QRegularExpressionMatchIterator &other) Q_DECL_NOTHROW { d.swap(other.d); }
bool isValid() const;
diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h
index 53f51b7f2e..183b9ff238 100644
--- a/src/corelib/tools/qshareddata.h
+++ b/src/corelib/tools/qshareddata.h
@@ -79,7 +79,7 @@ public:
inline QSharedDataPointer() { d = 0; }
inline ~QSharedDataPointer() { if (d && !d->ref.deref()) delete d; }
- explicit QSharedDataPointer(T *data);
+ explicit QSharedDataPointer(T *data) Q_DECL_NOTHROW;
inline QSharedDataPointer(const QSharedDataPointer<T> &o) : d(o.d) { if (d) d->ref.ref(); }
inline QSharedDataPointer<T> & operator=(const QSharedDataPointer<T> &o) {
if (o.d != d) {
@@ -104,14 +104,14 @@ public:
return *this;
}
#ifdef Q_COMPILER_RVALUE_REFS
- QSharedDataPointer(QSharedDataPointer &&o) : d(o.d) { o.d = 0; }
- inline QSharedDataPointer<T> &operator=(QSharedDataPointer<T> &&other)
+ QSharedDataPointer(QSharedDataPointer &&o) Q_DECL_NOTHROW : d(o.d) { o.d = Q_NULLPTR; }
+ inline QSharedDataPointer<T> &operator=(QSharedDataPointer<T> &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
inline bool operator!() const { return !d; }
- inline void swap(QSharedDataPointer &other)
+ inline void swap(QSharedDataPointer &other) Q_DECL_NOTHROW
{ qSwap(d, other.d); }
protected:
@@ -155,7 +155,7 @@ public:
inline QExplicitlySharedDataPointer() { d = 0; }
inline ~QExplicitlySharedDataPointer() { if (d && !d->ref.deref()) delete d; }
- explicit QExplicitlySharedDataPointer(T *data);
+ explicit QExplicitlySharedDataPointer(T *data) Q_DECL_NOTHROW;
inline QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer<T> &o) : d(o.d) { if (d) d->ref.ref(); }
template<class X>
@@ -193,14 +193,14 @@ public:
return *this;
}
#ifdef Q_COMPILER_RVALUE_REFS
- inline QExplicitlySharedDataPointer(QExplicitlySharedDataPointer &&o) : d(o.d) { o.d = 0; }
- inline QExplicitlySharedDataPointer<T> &operator=(QExplicitlySharedDataPointer<T> &&other)
+ inline QExplicitlySharedDataPointer(QExplicitlySharedDataPointer &&o) Q_DECL_NOTHROW : d(o.d) { o.d = Q_NULLPTR; }
+ inline QExplicitlySharedDataPointer<T> &operator=(QExplicitlySharedDataPointer<T> &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
inline bool operator!() const { return !d; }
- inline void swap(QExplicitlySharedDataPointer &other)
+ inline void swap(QExplicitlySharedDataPointer &other) Q_DECL_NOTHROW
{ qSwap(d, other.d); }
protected:
@@ -213,7 +213,8 @@ private:
};
template <class T>
-Q_INLINE_TEMPLATE QSharedDataPointer<T>::QSharedDataPointer(T *adata) : d(adata)
+Q_INLINE_TEMPLATE QSharedDataPointer<T>::QSharedDataPointer(T *adata) Q_DECL_NOTHROW
+ : d(adata)
{ if (d) d->ref.ref(); }
template <class T>
@@ -249,7 +250,8 @@ Q_OUTOFLINE_TEMPLATE void QExplicitlySharedDataPointer<T>::detach_helper()
}
template <class T>
-Q_INLINE_TEMPLATE QExplicitlySharedDataPointer<T>::QExplicitlySharedDataPointer(T *adata) : d(adata)
+Q_INLINE_TEMPLATE QExplicitlySharedDataPointer<T>::QExplicitlySharedDataPointer(T *adata) Q_DECL_NOTHROW
+ : d(adata)
{ if (d) d->ref.ref(); }
template <class T>
@@ -273,12 +275,12 @@ namespace std {
QT_BEGIN_NAMESPACE
template <class T>
-Q_INLINE_TEMPLATE uint qHash(const QSharedDataPointer<T> &ptr, uint seed = 0)
+Q_INLINE_TEMPLATE uint qHash(const QSharedDataPointer<T> &ptr, uint seed = 0) Q_DECL_NOTHROW
{
return qHash(ptr.data(), seed);
}
template <class T>
-Q_INLINE_TEMPLATE uint qHash(const QExplicitlySharedDataPointer<T> &ptr, uint seed = 0)
+Q_INLINE_TEMPLATE uint qHash(const QExplicitlySharedDataPointer<T> &ptr, uint seed = 0) Q_DECL_NOTHROW
{
return qHash(ptr.data(), seed);
}
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 4d51521b12..71d10f0663 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -210,7 +210,7 @@ class Q_CORE_EXPORT QString
public:
typedef QStringData Data;
- inline QString();
+ inline QString() Q_DECL_NOTHROW;
explicit QString(const QChar *unicode, int size = -1);
QString(QChar c);
QString(int size, QChar c);
@@ -221,11 +221,11 @@ public:
QString &operator=(const QString &);
inline QString &operator=(QLatin1String latin1);
#ifdef Q_COMPILER_RVALUE_REFS
- inline QString(QString && other) : d(other.d) { other.d = Data::sharedNull(); }
- inline QString &operator=(QString &&other)
+ inline QString(QString && other) Q_DECL_NOTHROW : d(other.d) { other.d = Data::sharedNull(); }
+ inline QString &operator=(QString &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
- inline void swap(QString &other) { qSwap(d, other.d); }
+ inline void swap(QString &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
inline int size() const { return d->size; }
inline int count() const { return d->size; }
inline int length() const;
@@ -1040,7 +1040,7 @@ inline void QCharRef::setRow(uchar arow) { QChar(*this).setRow(arow); }
inline void QCharRef::setCell(uchar acell) { QChar(*this).setCell(acell); }
-inline QString::QString() : d(Data::sharedNull()) {}
+inline QString::QString() Q_DECL_NOTHROW : d(Data::sharedNull()) {}
inline QString::~QString() { if (!d->ref.deref()) Data::deallocate(d); }
inline void QString::reserve(int asize)
diff --git a/src/corelib/tools/qstringlist.h b/src/corelib/tools/qstringlist.h
index 542ab781c5..f82981b9dc 100644
--- a/src/corelib/tools/qstringlist.h
+++ b/src/corelib/tools/qstringlist.h
@@ -90,11 +90,11 @@ class QStringList : public QList<QString>
{
#endif
public:
- inline QStringList() { }
+ inline QStringList() Q_DECL_NOTHROW { }
inline explicit QStringList(const QString &i) { append(i); }
inline QStringList(const QList<QString> &l) : QList<QString>(l) { }
#ifdef Q_COMPILER_RVALUE_REFS
- inline QStringList(QList<QString> &&l) : QList<QString>(std::move(l)) { }
+ inline QStringList(QList<QString> &&l) Q_DECL_NOTHROW : QList<QString>(std::move(l)) { }
#endif
#ifdef Q_COMPILER_INITIALIZER_LISTS
inline QStringList(std::initializer_list<QString> args) : QList<QString>(args) { }
@@ -103,7 +103,7 @@ public:
QStringList &operator=(const QList<QString> &other)
{ QList<QString>::operator=(other); return *this; }
#ifdef Q_COMPILER_RVALUE_REFS
- QStringList &operator=(QList<QString> &&other)
+ QStringList &operator=(QList<QString> &&other) Q_DECL_NOTHROW
{ QList<QString>::operator=(std::move(other)); return *this; }
#endif
diff --git a/src/corelib/tools/qtimezone.h b/src/corelib/tools/qtimezone.h
index ffc2316b5f..ef0bdc57cd 100644
--- a/src/corelib/tools/qtimezone.h
+++ b/src/corelib/tools/qtimezone.h
@@ -79,10 +79,10 @@ public:
QTimeZone &operator=(const QTimeZone &other);
#ifdef Q_COMPILER_RVALUE_REFS
- QTimeZone &operator=(QTimeZone &&other) { swap(other); return *this; }
+ QTimeZone &operator=(QTimeZone &&other) Q_DECL_NOTHROW { swap(other); return *this; }
#endif
- void swap(QTimeZone &other)
+ void swap(QTimeZone &other) Q_DECL_NOTHROW
{ d.swap(other.d); }
bool operator==(const QTimeZone &other) const;
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index c00bd07a72..c3d65b7d51 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -61,7 +61,7 @@ class QVector
Data *d;
public:
- inline QVector() : d(Data::sharedNull()) { }
+ inline QVector() Q_DECL_NOTHROW : d(Data::sharedNull()) { }
explicit QVector(int size);
QVector(int size, const T &t);
inline QVector(const QVector<T> &v);