summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2020-04-20 11:20:45 +0300
committerKatja Marttila <katja.marttila@qt.io>2020-04-28 09:38:30 +0300
commit4f5eace163eeb34504cb8044c42b147df03fafed (patch)
tree8e953142cb3b798c4dbc99684aec912e7df49b08 /tests
parenta05dc40daa16819823eeddb50a9fcc4656eb8f3b (diff)
Answer queries from command line
Standard input is possible in Windows only in console application. This change makes installers to be console applications by default. If started as gui from command line, console is released and application is restarted so cmd.exe won't be waiting for application to finish. If started from explorer, console is launched but released immediately. This may be seen on screen with short console flash. Using command line interface messagebox strings and possible answer values for it are printed to console. Answers must be given in case sensitive format as StandardButton QMetaEnum is utilized when reading button values. This ensures that if StandardButtons are added/removed/changed the code continues to work. Also added a new option 'default-answer' which will answer the questions with default button values without user interaction. Task-number: QTIFW-1739 Change-Id: I710f921f5c927dbd13090af32f93656dded84e72 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp b/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp
index a6d100603..4c8b5d93a 100644
--- a/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp
+++ b/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp
@@ -200,8 +200,7 @@ private slots:
void messageBoxFromScriptDefaultAnswer()
{
setRepository(":///data/messagebox");
- // Resets in autoAcceptMessageBoxes set in previous function
- MessageBoxHandler::instance()->setDefaultAction(MessageBoxHandler::AskUser);
+ core->acceptMessageBoxDefaultButton();
core->installSelectedComponentsSilently(QStringList () << "A");
// These values are written in script based on default