From 637249a8c1ef722c5646e1ca85d516f88a1a1dc6 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 11 Apr 2014 13:40:17 +0200 Subject: Allow long-running commands to be canceled. At the moment, canceling a build waits for the current command to finish, which means that a badly behaving process or piece of JavaScript code can block qbs indefinitely. Task-number: QBS-552 Change-Id: I8ac23f068dd6083905a9681097da6b970c0b646b Reviewed-by: Joerg Bornemann --- tests/auto/api/tst_api.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/auto/api') diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp index aaafd49ce..13af57c4a 100644 --- a/tests/auto/api/tst_api.cpp +++ b/tests/auto/api/tst_api.cpp @@ -442,8 +442,7 @@ void TestApi::infiniteLoop() QVERIFY2(!setupJob->error().hasError(), qPrintable(setupJob->error().toString())); qbs::Project project = setupJob->project(); const QScopedPointer buildJob(project.buildAllProducts(qbs::BuildOptions())); - QTimer::singleShot(1000, setupJob.data(), SLOT(cancel())); - QEXPECT_FAIL(0, "QBS-552", Continue); + QTimer::singleShot(1000, buildJob.data(), SLOT(cancel())); QVERIFY(waitForFinished(buildJob.data(), 3000)); } -- cgit v1.2.3