Commit 9e8df7d2 authored by Christian Stenger's avatar Christian Stenger
Browse files

Rename member to better reflect its meaning



Change-Id: I50a1f0ff69f638fceae4887c64be52f7d5b92822
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent 8fd27bc3
...@@ -55,7 +55,7 @@ namespace Internal { ...@@ -55,7 +55,7 @@ namespace Internal {
TestCodeParser::TestCodeParser(TestTreeModel *parent) TestCodeParser::TestCodeParser(TestTreeModel *parent)
: QObject(parent), : QObject(parent),
m_model(parent), m_model(parent),
m_parserEnabled(true), m_codeModelParsing(false),
m_fullUpdatePostponed(false), m_fullUpdatePostponed(false),
m_partialUpdatePostponed(false), m_partialUpdatePostponed(false),
m_dirty(true), m_dirty(true),
...@@ -79,7 +79,7 @@ TestCodeParser::~TestCodeParser() ...@@ -79,7 +79,7 @@ TestCodeParser::~TestCodeParser()
void TestCodeParser::setState(State state) void TestCodeParser::setState(State state)
{ {
// avoid triggering parse before code model parsing has finished // avoid triggering parse before code model parsing has finished
if (!m_parserEnabled) if (m_codeModelParsing)
return; return;
if ((state == Disabled || state == Idle) if ((state == Disabled || state == Idle)
...@@ -103,7 +103,7 @@ void TestCodeParser::emitUpdateTestTree() ...@@ -103,7 +103,7 @@ void TestCodeParser::emitUpdateTestTree()
void TestCodeParser::updateTestTree() void TestCodeParser::updateTestTree()
{ {
if (!m_parserEnabled) { if (m_codeModelParsing) {
m_fullUpdatePostponed = true; m_fullUpdatePostponed = true;
return; return;
} }
...@@ -475,7 +475,7 @@ void TestCodeParser::handleQtQuickTest(CPlusPlus::Document::Ptr document) ...@@ -475,7 +475,7 @@ void TestCodeParser::handleQtQuickTest(CPlusPlus::Document::Ptr document)
void TestCodeParser::onCppDocumentUpdated(const CPlusPlus::Document::Ptr &document) void TestCodeParser::onCppDocumentUpdated(const CPlusPlus::Document::Ptr &document)
{ {
if (!m_parserEnabled) { if (m_codeModelParsing) {
if (!m_fullUpdatePostponed) { if (!m_fullUpdatePostponed) {
m_partialUpdatePostponed = true; m_partialUpdatePostponed = true;
m_postponedFiles.insert(document->fileName()); m_postponedFiles.insert(document->fileName());
...@@ -500,7 +500,7 @@ void TestCodeParser::onCppDocumentUpdated(const CPlusPlus::Document::Ptr &docume ...@@ -500,7 +500,7 @@ void TestCodeParser::onCppDocumentUpdated(const CPlusPlus::Document::Ptr &docume
void TestCodeParser::onQmlDocumentUpdated(const QmlJS::Document::Ptr &document) void TestCodeParser::onQmlDocumentUpdated(const QmlJS::Document::Ptr &document)
{ {
if (!m_parserEnabled) { if (m_codeModelParsing) {
if (!m_fullUpdatePostponed) { if (!m_fullUpdatePostponed) {
m_partialUpdatePostponed = true; m_partialUpdatePostponed = true;
m_postponedFiles.insert(document->fileName()); m_postponedFiles.insert(document->fileName());
...@@ -540,7 +540,7 @@ void TestCodeParser::onProjectPartsUpdated(ProjectExplorer::Project *project) ...@@ -540,7 +540,7 @@ void TestCodeParser::onProjectPartsUpdated(ProjectExplorer::Project *project)
{ {
if (project != ProjectExplorer::SessionManager::startupProject()) if (project != ProjectExplorer::SessionManager::startupProject())
return; return;
if (!m_parserEnabled || m_parserState == Disabled) if (m_codeModelParsing || m_parserState == Disabled)
m_fullUpdatePostponed = true; m_fullUpdatePostponed = true;
else else
emitUpdateTestTree(); emitUpdateTestTree();
...@@ -727,9 +727,8 @@ void TestCodeParser::removeTestsIfNecessaryByProFile(const QString &proFile) ...@@ -727,9 +727,8 @@ void TestCodeParser::removeTestsIfNecessaryByProFile(const QString &proFile)
void TestCodeParser::onTaskStarted(Core::Id type) void TestCodeParser::onTaskStarted(Core::Id type)
{ {
if (type != CppTools::Constants::TASK_INDEX) if (type == CppTools::Constants::TASK_INDEX)
return; m_codeModelParsing = true;
m_parserEnabled = false;
} }
void TestCodeParser::onAllTasksFinished(Core::Id type) void TestCodeParser::onAllTasksFinished(Core::Id type)
...@@ -737,7 +736,7 @@ 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 // only CPP parsing is relevant as we trigger Qml parsing internally anyway
if (type != CppTools::Constants::TASK_INDEX) if (type != CppTools::Constants::TASK_INDEX)
return; return;
m_parserEnabled = true; m_codeModelParsing = false;
// avoid illegal parser state if respective widgets became hidden while parsing // avoid illegal parser state if respective widgets became hidden while parsing
setState(Idle); setState(Idle);
......
...@@ -111,7 +111,7 @@ private: ...@@ -111,7 +111,7 @@ private:
QMap<QString, TestInfo> m_cppDocMap; QMap<QString, TestInfo> m_cppDocMap;
QMap<QString, TestInfo> m_quickDocMap; QMap<QString, TestInfo> m_quickDocMap;
QList<UnnamedQuickTestInfo> m_unnamedQuickDocList; QList<UnnamedQuickTestInfo> m_unnamedQuickDocList;
bool m_parserEnabled; bool m_codeModelParsing;
bool m_fullUpdatePostponed; bool m_fullUpdatePostponed;
bool m_partialUpdatePostponed; bool m_partialUpdatePostponed;
bool m_dirty; bool m_dirty;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment