From e28bd0a98dd1a7ca0846cd406b23c6e5429ac82d Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Mon, 29 Feb 2016 12:22:10 +0200 Subject: Fix cancel button functionality in Settings->Repositories->Test When pressing cancel button when testing repositories, the dialog pops up again and again. Cancel the TestRepository job if cancel button is pressed. Change-Id: I48da41a8b791bf04571acd8af4a421b11e0fccc7 Task-number: QTIFW-832 Reviewed-by: Niels Weber Reviewed-by: Iikka Eklund --- src/libs/installer/testrepository.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libs/installer/testrepository.cpp b/src/libs/installer/testrepository.cpp index 6767d9aaa..637225e84 100644 --- a/src/libs/installer/testrepository.cpp +++ b/src/libs/installer/testrepository.cpp @@ -140,8 +140,10 @@ void TestRepository::downloadCompleted() if (dlg.exec() == QDialog::Accepted) { m_repository.setUsername(dlg.user()); m_repository.setPassword(dlg.password()); + QMetaObject::invokeMethod(this, "doStart", Qt::QueuedConnection); + } else { + QMetaObject::invokeMethod(this, "doCancel", Qt::QueuedConnection); } - QMetaObject::invokeMethod(this, "doStart", Qt::QueuedConnection); return; } else if (e.type() == AuthenticationRequiredException::Type::Proxy) { const QNetworkProxy proxy = e.proxy(); -- cgit v1.2.3