diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-01-08 15:08:22 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-01-10 08:43:15 +0100 |
commit | 390b16aea85e64bc33ce91e37898f59ad8a994c7 (patch) | |
tree | 0cefc9dd8f47cfca2af11e0337c26d22fc7af063 /src/corelib/io/qurl.h | |
parent | 2c2801860dde4d707af9ce291489bee1750955d1 (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qurl.h')
-rw-r--r-- | src/corelib/io/qurl.h | 8 |
1 files changed, 4 insertions, 4 deletions
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; |