diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2020-06-09 10:52:51 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2020-08-21 10:56:00 +0300 |
commit | f2ab63396c1f101216b2c6ade37528492e464785 (patch) | |
tree | 6aeceb76196b453d8a999ddf2d4e8b0d1dc43aef /tests | |
parent | 190b643736d7fa3270dca5926e018d6eef6d74cb (diff) |
CLI: Ask user confirmation before performing installer actions
Also add new option --confirm-command to skip the interactive query.
Task-number: QTIFW-1834
Change-Id: I1c63fd990431c792a523da7047637f54b193bee6
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'tests')
3 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/installer/createshortcutoperation/tst_createshortcutoperation.cpp b/tests/auto/installer/createshortcutoperation/tst_createshortcutoperation.cpp index a8826124e..19fbee0a9 100644 --- a/tests/auto/installer/createshortcutoperation/tst_createshortcutoperation.cpp +++ b/tests/auto/installer/createshortcutoperation/tst_createshortcutoperation.cpp @@ -71,6 +71,7 @@ private slots: QHash<QString, QString>(), true); core->setAllowedRunningProcesses(QStringList() << QCoreApplication::applicationFilePath()); core->disableWriteMaintenanceTool(); + core->setAutoConfirmCommand(); QSet<Repository> repoList; Repository repo = Repository::fromUserInput(":///data/repository"); repoList.insert(repo); diff --git a/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp b/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp index 83d93d647..464e1eef7 100644 --- a/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp +++ b/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp @@ -97,6 +97,7 @@ private slots: QHash<QString, QString>(), true); core->setAllowedRunningProcesses(QStringList() << QCoreApplication::applicationFilePath()); core->disableWriteMaintenanceTool(); + core->setAutoConfirmCommand(); m_installDir = QInstaller::generateTemporaryFileName(); QVERIFY(QDir().mkpath(m_installDir)); core->setValue(scTargetDir, m_installDir); diff --git a/tests/auto/installer/shared/packagemanager.h b/tests/auto/installer/shared/packagemanager.h index a62f13484..d5260ef5e 100644 --- a/tests/auto/installer/shared/packagemanager.h +++ b/tests/auto/installer/shared/packagemanager.h @@ -47,6 +47,7 @@ struct PackageManager QString appFilePath = QCoreApplication::applicationFilePath(); core->setAllowedRunningProcesses(QStringList() << appFilePath); core->disableWriteMaintenanceTool(); + core->setAutoConfirmCommand(); QSet<Repository> repoList; Repository repo = Repository::fromUserInput(repository); repoList.insert(repo); |