forked from qt-creator/qt-creator
TaskTree: Reuse withTimeout()
Add static runBlocking() overloads. Replace int timeout arg with std::chrono::milliseconds. Change-Id: Id10a010f05eda8452cd7e4cd9ee46216087fc70e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -375,8 +375,7 @@ static void transfer(QPromise<void> &promise, const FilePath &source, const File
|
||||
if (promise.isCanceled())
|
||||
return;
|
||||
|
||||
TaskTree taskTree(transferTask(source, destination));
|
||||
if (!taskTree.runBlocking(promise.future()))
|
||||
if (!TaskTree::runBlocking(transferTask(source, destination), promise.future()))
|
||||
promise.future().cancel();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user