Use Qt style for enums

Change-Id: I10c1379dea467f10214772168f4c1ec3134a99ee
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
Christian Stenger
2015-12-07 08:26:54 +01:00
parent 9d9adcc87b
commit fb7ceae64b
13 changed files with 197 additions and 197 deletions

View File

@@ -114,7 +114,7 @@ void performTestRun(QFutureInterface<void> &futureInterface,
if (config->project()) {
testCaseCount += config->testCaseCount();
} else {
emitTestResultCreated(new FaultyTestResult(Result::MESSAGE_WARN,
emitTestResultCreated(new FaultyTestResult(Result::MessageWarn,
QObject::tr("Project is null for \"%1\". Removing from test run.\n"
"Check the test environment.").arg(config->displayName())));
}
@@ -148,7 +148,7 @@ void performTestRun(QFutureInterface<void> &futureInterface,
QProcessEnvironment environment = testConfiguration->environment().toProcessEnvironment();
QString commandFilePath = executableFilePath(testConfiguration->targetFile(), environment);
if (commandFilePath.isEmpty()) {
emitTestResultCreated(new FaultyTestResult(Result::MESSAGE_FATAL,
emitTestResultCreated(new FaultyTestResult(Result::MessageFatal,
QObject::tr("Could not find command \"%1\". (%2)")
.arg(testConfiguration->targetFile())
.arg(testConfiguration->displayName())));
@@ -177,7 +177,7 @@ void performTestRun(QFutureInterface<void> &futureInterface,
if (futureInterface.isCanceled()) {
testProcess.kill();
testProcess.waitForFinished();
emitTestResultCreated(new FaultyTestResult(Result::MESSAGE_FATAL,
emitTestResultCreated(new FaultyTestResult(Result::MessageFatal,
QObject::tr("Test run canceled by user.")));
}
qApp->processEvents();
@@ -188,7 +188,7 @@ void performTestRun(QFutureInterface<void> &futureInterface,
if (testProcess.state() != QProcess::NotRunning) {
testProcess.kill();
testProcess.waitForFinished();
emitTestResultCreated(new FaultyTestResult(Result::MESSAGE_FATAL, QObject::tr(
emitTestResultCreated(new FaultyTestResult(Result::MessageFatal, QObject::tr(
"Test case canceled due to timeout. \nMaybe raise the timeout?")));
}
}
@@ -208,14 +208,14 @@ void TestRunner::prepareToRunTests()
foreach (TestConfiguration *config, m_selectedTests) {
if (!omitRunConfigWarnings && config->guessedConfiguration()) {
TestResultsPane::instance()->addTestResult(new FaultyTestResult(Result::MESSAGE_WARN,
TestResultsPane::instance()->addTestResult(new FaultyTestResult(Result::MessageWarn,
tr("Project's run configuration was guessed for \"%1\".\n"
"This might cause trouble during execution.").arg(config->displayName())));
}
}
if (m_selectedTests.empty()) {
TestResultsPane::instance()->addTestResult(new FaultyTestResult(Result::MESSAGE_WARN,
TestResultsPane::instance()->addTestResult(new FaultyTestResult(Result::MessageWarn,
tr("No tests selected. Canceling test run.")));
onFinished();
return;
@@ -223,7 +223,7 @@ void TestRunner::prepareToRunTests()
ProjectExplorer::Project *project = m_selectedTests.at(0)->project();
if (!project) {
TestResultsPane::instance()->addTestResult(new FaultyTestResult(Result::MESSAGE_WARN,
TestResultsPane::instance()->addTestResult(new FaultyTestResult(Result::MessageWarn,
tr("Project is null. Canceling test run.\n"
"Only desktop kits are supported. Make sure the "
"currently active kit is a desktop kit.")));
@@ -239,7 +239,7 @@ void TestRunner::prepareToRunTests()
if (project->hasActiveBuildSettings()) {
buildProject(project);
} else {
TestResultsPane::instance()->addTestResult(new FaultyTestResult(Result::MESSAGE_FATAL,
TestResultsPane::instance()->addTestResult(new FaultyTestResult(Result::MessageFatal,
tr("Project is not configured. Canceling test run.")));
onFinished();
return;
@@ -284,7 +284,7 @@ void TestRunner::buildFinished(bool success)
if (success) {
runTests();
} else {
TestResultsPane::instance()->addTestResult(new FaultyTestResult(Result::MESSAGE_FATAL,
TestResultsPane::instance()->addTestResult(new FaultyTestResult(Result::MessageFatal,
tr("Build failed. Canceling test run.")));
onFinished();
}