diff --git a/src/corelib/thread/qfutureinterface.cpp b/src/corelib/thread/qfutureinterface.cpp index 8906245191..9bb7d505e2 100644 --- a/src/corelib/thread/qfutureinterface.cpp +++ b/src/corelib/thread/qfutureinterface.cpp @@ -586,12 +586,12 @@ void QFutureInterfaceBase::swap(QFutureInterfaceBase &other) noexcept qSwap(d, other.d); } -bool QFutureInterfaceBase::refT() const +bool QFutureInterfaceBase::refT() const noexcept { return d->refCount.refT(); } -bool QFutureInterfaceBase::derefT() const +bool QFutureInterfaceBase::derefT() const noexcept { // Called from ~QFutureInterface return !d || d->refCount.derefT(); diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h index 6df15304fc..3a6fe86d76 100644 --- a/src/corelib/thread/qfutureinterface.h +++ b/src/corelib/thread/qfutureinterface.h @@ -178,8 +178,9 @@ public: void swap(QFutureInterfaceBase &other) noexcept; protected: - bool refT() const; - bool derefT() const; + // ### Qt 7: remove const from refT/derefT + bool refT() const noexcept; + bool derefT() const noexcept; void reset(); void rethrowPossibleException(); public: @@ -234,7 +235,7 @@ public: refT(); } QFutureInterface(const QFutureInterfaceBase &dd) : QFutureInterfaceBase(dd) { refT(); } - QFutureInterface(QFutureInterfaceBase &&dd) : QFutureInterfaceBase(std::move(dd)) { refT(); } + QFutureInterface(QFutureInterfaceBase &&dd) noexcept : QFutureInterfaceBase(std::move(dd)) { refT(); } QFutureInterface &operator=(const QFutureInterface &other) { QFutureInterface copy(other);