From 2b8d6c5fc4af14c5e2377d36b01f61d485c700d7 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 20 Feb 2015 09:11:33 +0100 Subject: Remove useless member No need to have another member variable for almost the same functionality. Consolidated where necessary. Change-Id: Iefaa410fea527f88b18b406199a449fc9e4d0533 Reviewed-by: Oliver Wolff Reviewed-by: Christian Stenger --- plugins/autotest/testcodeparser.cpp | 15 +++++++-------- plugins/autotest/testcodeparser.h | 1 - 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/plugins/autotest/testcodeparser.cpp b/plugins/autotest/testcodeparser.cpp index 004168ab6a..8c719361fa 100644 --- a/plugins/autotest/testcodeparser.cpp +++ b/plugins/autotest/testcodeparser.cpp @@ -56,7 +56,6 @@ TestCodeParser::TestCodeParser(TestTreeModel *parent) : QObject(parent), m_model(parent), m_parserEnabled(true), - m_pendingUpdate(false), m_fullUpdatePostPoned(false), m_partialUpdatePostPoned(false), m_dirty(true), @@ -89,7 +88,7 @@ void TestCodeParser::setState(State state) { m_parserState = state; if (m_parserState == Disabled) { - m_pendingUpdate = m_fullUpdatePostPoned = m_partialUpdatePostPoned = false; + m_fullUpdatePostPoned = m_partialUpdatePostPoned = false; m_postPonedFiles.clear(); } else if (m_parserState == Idle && m_dirty && currentProject()) { scanForTests(m_postPonedFiles.toList()); @@ -104,14 +103,14 @@ void TestCodeParser::emitUpdateTestTree() void TestCodeParser::updateTestTree() { if (!m_parserEnabled) { - m_pendingUpdate = true; + m_fullUpdatePostPoned = true; return; } if (ProjectExplorer::Project *project = currentProject()) { if (auto qmakeProject = qobject_cast(project)) { if (qmakeProject->asyncUpdateState() != QmakeProjectManager::QmakeProject::Base) { - m_pendingUpdate = true; + m_fullUpdatePostPoned = true; return; } connect(qmakeProject, &QmakeProjectManager::QmakeProject::proFilesEvaluated, @@ -120,7 +119,7 @@ void TestCodeParser::updateTestTree() } else return; - m_pendingUpdate = false; + m_fullUpdatePostPoned = false; clearCache(); emit cacheCleared(); @@ -476,7 +475,7 @@ void TestCodeParser::handleQtQuickTest(CPlusPlus::Document::Ptr document) void TestCodeParser::onCppDocumentUpdated(const CPlusPlus::Document::Ptr &document) { if (!m_parserEnabled) { - if (!m_pendingUpdate) { + if (!m_fullUpdatePostPoned) { m_partialUpdatePostPoned = true; m_postPonedFiles.insert(document->fileName()); } @@ -501,7 +500,7 @@ void TestCodeParser::onCppDocumentUpdated(const CPlusPlus::Document::Ptr &docume void TestCodeParser::onQmlDocumentUpdated(const QmlJS::Document::Ptr &document) { if (!m_parserEnabled) { - if (!m_pendingUpdate) { + if (!m_fullUpdatePostPoned) { m_partialUpdatePostPoned = true; m_postPonedFiles.insert(document->fileName()); } @@ -726,7 +725,7 @@ void TestCodeParser::onAllTasksFinished(Core::Id type) if (type != CppTools::Constants::TASK_INDEX) return; m_parserEnabled = true; - if (m_pendingUpdate) + if (m_fullUpdatePostPoned) updateTestTree(); else if (m_partialUpdatePostPoned) { m_partialUpdatePostPoned = false; diff --git a/plugins/autotest/testcodeparser.h b/plugins/autotest/testcodeparser.h index 85582d1d5d..d2785766ac 100644 --- a/plugins/autotest/testcodeparser.h +++ b/plugins/autotest/testcodeparser.h @@ -110,7 +110,6 @@ private: QMap m_quickDocMap; QList m_unnamedQuickDocList; bool m_parserEnabled; - bool m_pendingUpdate; bool m_fullUpdatePostPoned; bool m_partialUpdatePostPoned; bool m_dirty; -- cgit v1.2.1