Details
-
Task
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
None
-
1
-
c1a95d1d0 (dev), 47a028270 (dev), ba3225bab (6.5), a219503f1 (tqtc/lts-6.2), 14a2bd7ad (6.6), 7abb108f8 (tqtc/lts-5.15)
-
Foundation Sprint 87, Foundation Sprint 88
Description
Running a function returning void could often be a fire-and-forget scenario, or it may even emit signals later. So having QtConcurrent::run() marked nodiscard for all return-types means users must use Q_UNUSED (or its expanded from) to ignore the warning it produces.
void doThing(); ... QtConcurrent::run(doThing); // currently: warning of unused return value ... QFuture<void> future = QtConcurrent::run(doThing); // OK, but... Q_UNUSED(future); // ... it's unused
Attachments
For Gerrit Dashboard: QTBUG-111875 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
492990,4 | QtConcurrent::run: point return value ignorers to QThreadPool::start(Callable&&) | dev | qt/qtbase | Status: MERGED | +2 | 0 |
493019,2 | [docs] Link from QtConcurent::run() to QThreadPool::start(Callable&&) | dev | qt/qtbase | Status: MERGED | +2 | 0 |
494687,2 | [docs] Link from QtConcurent::run() to QThreadPool::start(Callable&&) | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
494688,2 | [docs] Link from QtConcurent::run() to QThreadPool::start(Callable&&) | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
494692,3 | [docs] Link from QtConcurent::run() to QThreadPool::start(Callable&&) | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
494693,2 | [docs] Link from QtConcurent::run() to QThreadPool::start(Callable&&) | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |