AutoTest: Use TestResult as value type

Don't construct it on heap and don't use shared pointer for it.

Change-Id: I51c9da405ed14d24b5f20242b4d049f9e2958f09
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2023-01-14 16:25:51 +01:00
parent 3ff5661327
commit d05c5b7d07
54 changed files with 396 additions and 437 deletions

View File

@@ -121,7 +121,7 @@ QString QuickTestParser::quickTestName(const CPlusPlus::Document::Ptr &doc) cons
// check for using quick_test_main() directly
CPlusPlus::Document::Ptr document = m_cppSnapshot.preprocessedDocument(fileContent, filePath);
if (document.isNull())
return QString();
return {};
document->check();
CPlusPlus::AST *ast = document->translationUnit()->ast();
QuickTestAstVisitor astVisitor(document, m_cppSnapshot);
@@ -202,7 +202,7 @@ QList<Document::Ptr> QuickTestParser::scanDirectoryForQuickTestQmlFiles(const Ut
static bool checkQmlDocumentForQuickTestCode(QFutureInterface<TestParseResultPtr> &futureInterface,
const Document::Ptr &qmlJSDoc,
ITestFramework *framework,
const Utils::FilePath &proFile = Utils::FilePath(),
const Utils::FilePath &proFile = {},
bool checkForDerivedTest = false)
{
if (qmlJSDoc.isNull())