summaryrefslogtreecommitdiff
path: root/src/plugins/autotest/quick/quicktestparser.cpp
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2019-07-30 13:17:35 +0200
committerChristian Stenger <christian.stenger@qt.io>2019-07-30 12:49:38 +0000
commit6e84529a88a1f51c35b664391c95eea35418aeeb (patch)
treec1f0a2b4370e65de68b11e57f408cba09c339bb7 /src/plugins/autotest/quick/quicktestparser.cpp
parentc020fb6e3e5e2cb4ab4dcdb76fbc7693b1e45c96 (diff)
downloadqt-creator-6e84529a88a1f51c35b664391c95eea35418aeeb.tar.gz
AutoTest: fine tune quick test case specs
and fix multiple inheritance Change-Id: I031c8518437b7b396f5b17a51d2067e4b3661530 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/autotest/quick/quicktestparser.cpp')
-rw-r--r--src/plugins/autotest/quick/quicktestparser.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/plugins/autotest/quick/quicktestparser.cpp b/src/plugins/autotest/quick/quicktestparser.cpp
index 14e04c8a2f..72592b32a0 100644
--- a/src/plugins/autotest/quick/quicktestparser.cpp
+++ b/src/plugins/autotest/quick/quicktestparser.cpp
@@ -190,33 +190,33 @@ static bool checkQmlDocumentForQuickTestCode(QFutureInterface<TestParseResultPtr
if (!qmlVisitor.isValid())
return false;
- const QVector<QuickTestCaseSpec> &testFunctions = qmlVisitor.testFunctions();
+ const QVector<QuickTestCaseSpec> &testCases = qmlVisitor.testCases();
- for (const QuickTestCaseSpec &it : testFunctions) {
- const QString testCaseName = it.m_caseName;
- const QString functionName = it.m_functionName;
- const TestCodeLocationAndType &loc = it.m_functionLocationAndType;
+ for (const QuickTestCaseSpec &testCase : testCases) {
+ const QString testCaseName = testCase.m_caseName;
QuickTestParseResult *parseResult = new QuickTestParseResult(id);
parseResult->proFile = proFile;
parseResult->itemType = TestTreeItem::TestCase;
if (!testCaseName.isEmpty()) {
- parseResult->fileName = it.m_name;
+ parseResult->fileName = testCase.m_locationAndType.m_name;
parseResult->name = testCaseName;
- parseResult->line = it.m_line;
- parseResult->column = it.m_column;
+ parseResult->line = testCase.m_locationAndType.m_line;
+ parseResult->column = testCase.m_locationAndType.m_column;
}
- QuickTestParseResult *funcResult = new QuickTestParseResult(id);
- funcResult->name = functionName;
- funcResult->displayName = functionName;
- funcResult->itemType = loc.m_type;
- funcResult->fileName = loc.m_name;
- funcResult->line = loc.m_line;
- funcResult->column = loc.m_column;
- funcResult->proFile = proFile;
-
- parseResult->children.append(funcResult);
+ for (auto function : testCase.m_functions) {
+ QuickTestParseResult *funcResult = new QuickTestParseResult(id);
+ funcResult->name = function.m_functionName;
+ funcResult->displayName = function.m_functionName;
+ funcResult->itemType = function.m_locationAndType.m_type;
+ funcResult->fileName = function.m_locationAndType.m_name;
+ funcResult->line = function.m_locationAndType.m_line;
+ funcResult->column = function.m_locationAndType.m_column;
+ funcResult->proFile = proFile;
+
+ parseResult->children.append(funcResult);
+ }
futureInterface.reportResult(TestParseResultPtr(parseResult));
}