From 9e8df7d2b3e84b5fd51f3a873733cc0232c0840d Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 23 Jul 2015 15:51:38 +0200 Subject: Rename member to better reflect its meaning Change-Id: I50a1f0ff69f638fceae4887c64be52f7d5b92822 Reviewed-by: Niels Weber --- plugins/autotest/testcodeparser.cpp | 19 +++++++++---------- plugins/autotest/testcodeparser.h | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/plugins/autotest/testcodeparser.cpp b/plugins/autotest/testcodeparser.cpp index f945e89686..edf5102419 100644 --- a/plugins/autotest/testcodeparser.cpp +++ b/plugins/autotest/testcodeparser.cpp @@ -55,7 +55,7 @@ namespace Internal { TestCodeParser::TestCodeParser(TestTreeModel *parent) : QObject(parent), m_model(parent), - m_parserEnabled(true), + m_codeModelParsing(false), m_fullUpdatePostponed(false), m_partialUpdatePostponed(false), m_dirty(true), @@ -79,7 +79,7 @@ TestCodeParser::~TestCodeParser() void TestCodeParser::setState(State state) { // avoid triggering parse before code model parsing has finished - if (!m_parserEnabled) + if (m_codeModelParsing) return; if ((state == Disabled || state == Idle) @@ -103,7 +103,7 @@ void TestCodeParser::emitUpdateTestTree() void TestCodeParser::updateTestTree() { - if (!m_parserEnabled) { + if (m_codeModelParsing) { m_fullUpdatePostponed = true; return; } @@ -475,7 +475,7 @@ void TestCodeParser::handleQtQuickTest(CPlusPlus::Document::Ptr document) void TestCodeParser::onCppDocumentUpdated(const CPlusPlus::Document::Ptr &document) { - if (!m_parserEnabled) { + if (m_codeModelParsing) { if (!m_fullUpdatePostponed) { m_partialUpdatePostponed = true; m_postponedFiles.insert(document->fileName()); @@ -500,7 +500,7 @@ void TestCodeParser::onCppDocumentUpdated(const CPlusPlus::Document::Ptr &docume void TestCodeParser::onQmlDocumentUpdated(const QmlJS::Document::Ptr &document) { - if (!m_parserEnabled) { + if (m_codeModelParsing) { if (!m_fullUpdatePostponed) { m_partialUpdatePostponed = true; m_postponedFiles.insert(document->fileName()); @@ -540,7 +540,7 @@ void TestCodeParser::onProjectPartsUpdated(ProjectExplorer::Project *project) { if (project != ProjectExplorer::SessionManager::startupProject()) return; - if (!m_parserEnabled || m_parserState == Disabled) + if (m_codeModelParsing || m_parserState == Disabled) m_fullUpdatePostponed = true; else emitUpdateTestTree(); @@ -727,9 +727,8 @@ void TestCodeParser::removeTestsIfNecessaryByProFile(const QString &proFile) void TestCodeParser::onTaskStarted(Core::Id type) { - if (type != CppTools::Constants::TASK_INDEX) - return; - m_parserEnabled = false; + if (type == CppTools::Constants::TASK_INDEX) + m_codeModelParsing = true; } void TestCodeParser::onAllTasksFinished(Core::Id type) @@ -737,7 +736,7 @@ void TestCodeParser::onAllTasksFinished(Core::Id type) // only CPP parsing is relevant as we trigger Qml parsing internally anyway if (type != CppTools::Constants::TASK_INDEX) return; - m_parserEnabled = true; + m_codeModelParsing = false; // avoid illegal parser state if respective widgets became hidden while parsing setState(Idle); diff --git a/plugins/autotest/testcodeparser.h b/plugins/autotest/testcodeparser.h index 1b8215fe50..5a1ad98be4 100644 --- a/plugins/autotest/testcodeparser.h +++ b/plugins/autotest/testcodeparser.h @@ -111,7 +111,7 @@ private: QMap m_cppDocMap; QMap m_quickDocMap; QList m_unnamedQuickDocList; - bool m_parserEnabled; + bool m_codeModelParsing; bool m_fullUpdatePostponed; bool m_partialUpdatePostponed; bool m_dirty; -- cgit v1.2.1