diff options
author | Katja Marttila <katja.marttila@theqtcompany.com> | 2016-02-29 12:22:10 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2016-06-20 06:32:17 +0000 |
commit | e28bd0a98dd1a7ca0846cd406b23c6e5429ac82d (patch) | |
tree | 19f2a317e89f09046ca754ec2bbb9ca5139974bf /src/libs/installer/testrepository.cpp | |
parent | 86c218e7fa619864112abba5fa607f847fc114f3 (diff) |
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 <niels.weber@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/libs/installer/testrepository.cpp')
-rw-r--r-- | src/libs/installer/testrepository.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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(); |