Use std::chrono for TaskProgress::setHalfLifeTimePerTask

It is more descriptive than an int.

Change-Id: I6add6a74850a9976c92509c404edb0c9fc403d21
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Eike Ziller
2024-01-19 12:26:10 +01:00
parent d53c5344ec
commit 52fb6f925b
4 changed files with 13 additions and 8 deletions

View File

@@ -74,7 +74,8 @@ TestRunner::TestRunner()
auto progress = new TaskProgress(taskTree);
progress->setDisplayName(Tr::tr("Running Tests"));
progress->setAutoStopOnCancel(false);
progress->setHalfLifeTimePerTask(10000); // 10 seconds
using namespace std::chrono_literals;
progress->setHalfLifeTimePerTask(10s);
connect(progress, &TaskProgress::canceled, this, [this, progress] {
// Progress was a child of task tree which is going to be deleted directly.
// Unwind properly.