QThread::create: mark as [[nodiscard]]
Also mark the helper function. Change-Id: I1469abf22cd132dbb1afe680121b6c928ffbe41e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
2d0a5f7a01
commit
b60c39fe65
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user