From a4854839a4c3148e91d1a103f2b5b634f581fe14 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Wed, 7 Mar 2018 17:45:10 -0800 Subject: [PATCH] Enable user selection of destination folder when creating a test. --- tools/auto-tester/src/Test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/auto-tester/src/Test.cpp b/tools/auto-tester/src/Test.cpp index 1078ce1bc4..c14c6b9437 100644 --- a/tools/auto-tester/src/Test.cpp +++ b/tools/auto-tester/src/Test.cpp @@ -430,6 +430,11 @@ void Test::createTest() { return; } + QString imageDestinationDirectory = QFileDialog::getExistingDirectory(nullptr, "Please select folder to save the test images", ".", QFileDialog::ShowDirsOnly); + if (imageDestinationDirectory == "") { + return; + } + QStringList sortedImageFilenames = createListOfAll_imagesInDirectory("jpg", imageSourceDirectory); int i = 1; @@ -442,7 +447,6 @@ void Test::createTest() { exit(-1); } QString newFilename = "ExpectedImage_" + QString::number(i - 1).rightJustified(5, '0') + ".png"; - QString imageDestinationDirectory = getExpectedImageDestinationDirectory(currentFilename); QString fullNewFileName = imageDestinationDirectory + "/" + newFilename; try {