Move TestType enum into constants...

...to avoid defining the enum in several places although almost
having the same meaning.
Additionally rename the values to ensure not to run in a name
clash at some point.

Change-Id: I0f23041b785c87efd3e7feebef855042595473f6
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-01-12 13:52:21 +01:00
committed by Niels Weber
parent 97011c6951
commit 54d753574e
8 changed files with 28 additions and 25 deletions

View File

@@ -142,8 +142,8 @@ void performTestRun(QFutureInterface<void> &futureInterface,
if (connection)
QObject::disconnect(connection);
TestConfiguration::TestType testType = testConfiguration->testType();
if (testType == TestConfiguration::Qt) {
TestType testType = testConfiguration->testType();
if (testType == TestTypeQt) {
connection = QObject::connect(&testProcess, &QProcess::readyRead, &outputReader,
&TestOutputReader::processOutput);
} else {
@@ -166,14 +166,14 @@ void performTestRun(QFutureInterface<void> &futureInterface,
continue;
}
if (testType == TestConfiguration::Qt) {
if (testType == TestTypeQt) {
QStringList argumentList(QLatin1String("-xml"));
if (!metricsOption.isEmpty())
argumentList << metricsOption;
if (testConfiguration->testCases().count())
argumentList << testConfiguration->testCases();
testProcess.setArguments(argumentList);
} else { // TestConfiguration::GTest
} else { // TestTypeGTest
const QStringList &testSets = testConfiguration->testCases();
if (testSets.size()) {
QStringList argumentList;