AutoTest: Make automatic popup of results pane configurable

Let the test results pane automatically popup before the
first test result is added to indicate running the tests
has started.
Beside this provide settings for enabling or disabling
the popup of the results pane on start or finish of a
test run and make it possible to limit the automatic
popup on finish to failed test runs.

Change-Id: Ib22735536effd9f2330b39a7d2830c97839eb21f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2019-03-13 11:05:22 +01:00
parent 5944c7f0f6
commit 6dee2dc019
8 changed files with 96 additions and 3 deletions

View File

@@ -41,6 +41,9 @@ static const char limitResultOutputKey[] = "LimitResultOutput";
static const char autoScrollKey[] = "AutoScrollResults";
static const char processArgsKey[] = "ProcessArgs";
static const char displayApplicationKey[] = "DisplayApp";
static const char popupOnStartKey[] = "PopupOnStart";
static const char popupOnFinishKey[] = "PopupOnFinish";
static const char popupOnFailKey[] = "PopupOnFail";
static const char groupSuffix[] = ".group";
constexpr int defaultTimeout = 60000;
@@ -60,6 +63,9 @@ void TestSettings::toSettings(QSettings *s) const
s->setValue(autoScrollKey, autoScroll);
s->setValue(processArgsKey, processArgs);
s->setValue(displayApplicationKey, displayApplication);
s->setValue(popupOnStartKey, popupOnStart);
s->setValue(popupOnFinishKey, popupOnFinish);
s->setValue(popupOnFailKey, popupOnFail);
// store frameworks and their current active and grouping state
for (const Core::Id &id : frameworks.keys()) {
s->setValue(QLatin1String(id.name()), frameworks.value(id));
@@ -78,6 +84,9 @@ void TestSettings::fromSettings(QSettings *s)
autoScroll = s->value(autoScrollKey, true).toBool();
processArgs = s->value(processArgsKey, false).toBool();
displayApplication = s->value(displayApplicationKey, false).toBool();
popupOnStart = s->value(popupOnStartKey, true).toBool();
popupOnFinish = s->value(popupOnFinishKey, true).toBool();
popupOnFail = s->value(popupOnFailKey, false).toBool();
// try to get settings for registered frameworks
TestFrameworkManager *frameworkManager = TestFrameworkManager::instance();
const QList<Core::Id> &registered = frameworkManager->registeredFrameworkIds();