From a1e62e7ba14b00ac7c361936a18e7bc42bf1286d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 2 Apr 2019 10:54:54 +0200 Subject: Replace Q_DECL_NOEXCEPT with noexcept in corelib In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira --- src/corelib/itemmodels/qitemselectionmodel.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/itemmodels/qitemselectionmodel.h') diff --git a/src/corelib/itemmodels/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h index 1c924053a5..e5cd24817b 100644 --- a/src/corelib/itemmodels/qitemselectionmodel.h +++ b/src/corelib/itemmodels/qitemselectionmodel.h @@ -61,9 +61,9 @@ public: inline QItemSelectionRange(const QItemSelectionRange &other) : tl(other.tl), br(other.br) {} # ifdef Q_COMPILER_RVALUE_REFS - QItemSelectionRange(QItemSelectionRange &&other) Q_DECL_NOTHROW + QItemSelectionRange(QItemSelectionRange &&other) noexcept : tl(std::move(other.tl)), br(std::move(other.br)) {} - QItemSelectionRange &operator=(QItemSelectionRange &&other) Q_DECL_NOTHROW + QItemSelectionRange &operator=(QItemSelectionRange &&other) noexcept { tl = std::move(other.tl); br = std::move(other.br); return *this; } # endif QItemSelectionRange &operator=(const QItemSelectionRange &other) @@ -72,7 +72,7 @@ public: QItemSelectionRange(const QModelIndex &topL, const QModelIndex &bottomR) : tl(topL), br(bottomR) {} explicit QItemSelectionRange(const QModelIndex &index) : tl(index), br(tl) {} - void swap(QItemSelectionRange &other) Q_DECL_NOTHROW + void swap(QItemSelectionRange &other) noexcept { qSwap(tl, other.tl); qSwap(br, other.br); @@ -249,7 +249,7 @@ Q_TEMPLATE_EXTERN template class Q_CORE_EXPORT QList; class Q_CORE_EXPORT QItemSelection : public QList { public: - QItemSelection() Q_DECL_NOTHROW : QList() {} + QItemSelection() noexcept : QList() {} QItemSelection(const QModelIndex &topLeft, const QModelIndex &bottomRight); // reusing QList::swap() here is OK! -- cgit v1.2.3