diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-10-19 16:49:06 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-10-20 01:25:31 +0200 |
commit | b60c39fe65543b436cb47e19979b80c78000d998 (patch) | |
tree | e548d489016f5c7c82b810a9401112c9a6406687 /src/corelib | |
parent | 2d0a5f7a014d1b84d5701d835aa28f1a047fbff5 (diff) |
QThread::create: mark as [[nodiscard]]
Also mark the helper function.
Change-Id: I1469abf22cd132dbb1afe680121b6c928ffbe41e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/thread/qthread.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 <typename Function, typename... Args> - 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<void> &&future); + [[nodiscard]] static QThread *createThreadImpl(std::future<void> &&future); #endif static Qt::HANDLE currentThreadIdImpl() noexcept Q_DECL_PURE_FUNCTION; |