summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@theqtcompany.com>2015-02-20 09:11:33 +0100
committerChristian Stenger <christian.stenger@theqtcompany.com>2015-02-27 15:04:06 +0200
commit2b8d6c5fc4af14c5e2377d36b01f61d485c700d7 (patch)
treebcf8fbac255e3aef8c91f60a7c0e3324a66671bc
parent9eb616718903e9f3b64f96d3fe72b3ec5d525263 (diff)
downloadqt-creator-2b8d6c5fc4af14c5e2377d36b01f61d485c700d7.tar.gz
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 <oliver.wolff@theqtcompany.com> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
-rw-r--r--plugins/autotest/testcodeparser.cpp15
-rw-r--r--plugins/autotest/testcodeparser.h1
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<QmakeProjectManager::QmakeProject *>(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<QString, TestInfo> m_quickDocMap;
QList<UnnamedQuickTestInfo> m_unnamedQuickDocList;
bool m_parserEnabled;
- bool m_pendingUpdate;
bool m_fullUpdatePostPoned;
bool m_partialUpdatePostPoned;
bool m_dirty;