From 612f36fb3a914d1cbd1f738b6b97571efa301c39 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 4 Feb 2016 14:48:09 +0100 Subject: [PATCH] AutoTest: Apply QC coding style Change-Id: I79548cae407c5f7327953184977f8133885bc367 Reviewed-by: Robert Loehning --- src/plugins/autotest/testcodeparser.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/plugins/autotest/testcodeparser.cpp b/src/plugins/autotest/testcodeparser.cpp index dd504aba6ad..adfff0f3608 100644 --- a/src/plugins/autotest/testcodeparser.cpp +++ b/src/plugins/autotest/testcodeparser.cpp @@ -571,9 +571,10 @@ static void checkDocumentForTestCode(QFutureInterface futureInt const CppTools::CppModelManager *modelManager = CppTools::CppModelManager::instance(); QList projParts = modelManager->projectPart(fileName); - if (projParts.size()) + if (projParts.size()) { if (!projParts.at(0)->selectedForBuilding) return; + } if (includesQtQuickTest(document, modelManager)) { handleQtQuickTest(futureInterface, document); @@ -673,9 +674,9 @@ void TestCodeParser::onCppDocumentUpdated(const CPlusPlus::Document::Ptr &docume if (!project) return; const QString fileName = document->fileName(); - if (!project->files(ProjectExplorer::Project::AllFiles).contains(fileName)) { + if (!project->files(ProjectExplorer::Project::AllFiles).contains(fileName)) return; - } + qCDebug(LOG) << "calling scanForTests (onCppDocumentUpdated)"; scanForTests(QStringList(fileName)); } @@ -766,12 +767,10 @@ void TestCodeParser::scanForTests(const QStringList &fileList) m_fullUpdatePostponed = true; m_partialUpdatePostponed = false; m_postponedFiles.clear(); - } else { - if (!m_fullUpdatePostponed) { - m_partialUpdatePostponed = true; - foreach (const QString &file, fileList) - m_postponedFiles.insert(file); - } + } else if (!m_fullUpdatePostponed) { + m_partialUpdatePostponed = true; + foreach (const QString &file, fileList) + m_postponedFiles.insert(file); } return; }