From b60c39fe65543b436cb47e19979b80c78000d998 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 19 Oct 2020 16:49:06 +0200 Subject: QThread::create: mark as [[nodiscard]] Also mark the helper function. Change-Id: I1469abf22cd132dbb1afe680121b6c928ffbe41e Reviewed-by: Volker Hilsheimer --- src/corelib/thread/qthread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index 7d268cffc9..ab32891a59 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -105,7 +105,7 @@ public: #if QT_CONFIG(cxx11_future) || defined(Q_CLANG_QDOC) template - static QThread *create(Function &&f, Args &&... args); + [[nodiscard]] static QThread *create(Function &&f, Args &&... args); #endif public Q_SLOTS: @@ -143,7 +143,7 @@ private: Q_DECLARE_PRIVATE(QThread) #if QT_CONFIG(cxx11_future) - static QThread *createThreadImpl(std::future &&future); + [[nodiscard]] static QThread *createThreadImpl(std::future &&future); #endif static Qt::HANDLE currentThreadIdImpl() noexcept Q_DECL_PURE_FUNCTION; -- cgit v1.2.3