Skip to content

correctly set up ref counting in QThreadPool::tryStart(std::function)

Harald Sitter requested to merge sitter/qtbase:work/sitter/runnable into kde/5.15

this function was inconsistent with the QThreadPool::tryStart(QRunnable) overload, where ref counting does get set up correctly. the lack of ref counting setup would later cause trouble because we assert the ref counting state all over QThreadPool. to prevent failed assertions we correctly set up ref counting now.

this change is not applicable to Qt6 because the ref counting has already been removed there:

BUG: 449688

Merge request reports