diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2020-06-11 17:16:54 +0300 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2020-06-18 18:28:41 +0300 |
commit | 68de38ded1c0e5387ae29aacaee50ba5dacfc59a (patch) | |
tree | 4bef76d45efcf52fcbebb862c353776b3b93cbd7 /src/corelib/thread/qpromise.h | |
parent | b0f445a1526fa43563522d865c5ad1546201003c (diff) |
Document QPromise API
Documented QPromise. Added snippets under auto tests
to ensure they are compiled and run in CI.
Task-number: QTBUG-81586
Change-Id: I20084e38f9d2f6fc8540f95ee03ec3d2827177e8
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/corelib/thread/qpromise.h')
-rw-r--r-- | src/corelib/thread/qpromise.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/thread/qpromise.h b/src/corelib/thread/qpromise.h index 15aea16f29..9cd9238381 100644 --- a/src/corelib/thread/qpromise.h +++ b/src/corelib/thread/qpromise.h @@ -110,6 +110,11 @@ public: d.setProgressValueAndText(progressValue, progressText); } +#if defined(Q_CLANG_QDOC) // documentation-only simplified signatures + void addResult(const T &result, int index = -1) { } + void addResult(T &&result, int index = -1) { } +#endif + private: mutable QFutureInterface<T> d = QFutureInterface<T>(); |