From 390b16aea85e64bc33ce91e37898f59ad8a994c7 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 8 Jan 2015 15:08:22 +0100 Subject: QtCore: mark some operations nothrow This shotgun-surgery approach is motivated by trying to get a clean(er) build for -Wnoexcept on GCC, so it is expected that for any class touched here, there will be more operations that can be marked nothrow. But they don't show up in conditional noexcept clauses, yet, so they are deferred to some later commit. Change-Id: I0eb10d75a26c361fb22cf785399e83b434bdf233 Reviewed-by: Thiago Macieira --- src/corelib/tools/qstringlist.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/tools/qstringlist.h') 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 { #endif public: - inline QStringList() { } + inline QStringList() Q_DECL_NOTHROW { } inline explicit QStringList(const QString &i) { append(i); } inline QStringList(const QList &l) : QList(l) { } #ifdef Q_COMPILER_RVALUE_REFS - inline QStringList(QList &&l) : QList(std::move(l)) { } + inline QStringList(QList &&l) Q_DECL_NOTHROW : QList(std::move(l)) { } #endif #ifdef Q_COMPILER_INITIALIZER_LISTS inline QStringList(std::initializer_list args) : QList(args) { } @@ -103,7 +103,7 @@ public: QStringList &operator=(const QList &other) { QList::operator=(other); return *this; } #ifdef Q_COMPILER_RVALUE_REFS - QStringList &operator=(QList &&other) + QStringList &operator=(QList &&other) Q_DECL_NOTHROW { QList::operator=(std::move(other)); return *this; } #endif -- cgit v1.2.3