forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -56,7 +56,6 @@ TestCodeParser::TestCodeParser(TestTreeModel *parent)
|
|||||||
: QObject(parent),
|
: QObject(parent),
|
||||||
m_model(parent),
|
m_model(parent),
|
||||||
m_parserEnabled(true),
|
m_parserEnabled(true),
|
||||||
m_pendingUpdate(false),
|
|
||||||
m_fullUpdatePostPoned(false),
|
m_fullUpdatePostPoned(false),
|
||||||
m_partialUpdatePostPoned(false),
|
m_partialUpdatePostPoned(false),
|
||||||
m_dirty(true),
|
m_dirty(true),
|
||||||
@@ -89,7 +88,7 @@ void TestCodeParser::setState(State state)
|
|||||||
{
|
{
|
||||||
m_parserState = state;
|
m_parserState = state;
|
||||||
if (m_parserState == Disabled) {
|
if (m_parserState == Disabled) {
|
||||||
m_pendingUpdate = m_fullUpdatePostPoned = m_partialUpdatePostPoned = false;
|
m_fullUpdatePostPoned = m_partialUpdatePostPoned = false;
|
||||||
m_postPonedFiles.clear();
|
m_postPonedFiles.clear();
|
||||||
} else if (m_parserState == Idle && m_dirty && currentProject()) {
|
} else if (m_parserState == Idle && m_dirty && currentProject()) {
|
||||||
scanForTests(m_postPonedFiles.toList());
|
scanForTests(m_postPonedFiles.toList());
|
||||||
@@ -104,14 +103,14 @@ void TestCodeParser::emitUpdateTestTree()
|
|||||||
void TestCodeParser::updateTestTree()
|
void TestCodeParser::updateTestTree()
|
||||||
{
|
{
|
||||||
if (!m_parserEnabled) {
|
if (!m_parserEnabled) {
|
||||||
m_pendingUpdate = true;
|
m_fullUpdatePostPoned = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ProjectExplorer::Project *project = currentProject()) {
|
if (ProjectExplorer::Project *project = currentProject()) {
|
||||||
if (auto qmakeProject = qobject_cast<QmakeProjectManager::QmakeProject *>(project)) {
|
if (auto qmakeProject = qobject_cast<QmakeProjectManager::QmakeProject *>(project)) {
|
||||||
if (qmakeProject->asyncUpdateState() != QmakeProjectManager::QmakeProject::Base) {
|
if (qmakeProject->asyncUpdateState() != QmakeProjectManager::QmakeProject::Base) {
|
||||||
m_pendingUpdate = true;
|
m_fullUpdatePostPoned = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
connect(qmakeProject, &QmakeProjectManager::QmakeProject::proFilesEvaluated,
|
connect(qmakeProject, &QmakeProjectManager::QmakeProject::proFilesEvaluated,
|
||||||
@@ -120,7 +119,7 @@ void TestCodeParser::updateTestTree()
|
|||||||
} else
|
} else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_pendingUpdate = false;
|
m_fullUpdatePostPoned = false;
|
||||||
|
|
||||||
clearCache();
|
clearCache();
|
||||||
emit cacheCleared();
|
emit cacheCleared();
|
||||||
@@ -476,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_parserEnabled) {
|
||||||
if (!m_pendingUpdate) {
|
if (!m_fullUpdatePostPoned) {
|
||||||
m_partialUpdatePostPoned = true;
|
m_partialUpdatePostPoned = true;
|
||||||
m_postPonedFiles.insert(document->fileName());
|
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)
|
void TestCodeParser::onQmlDocumentUpdated(const QmlJS::Document::Ptr &document)
|
||||||
{
|
{
|
||||||
if (!m_parserEnabled) {
|
if (!m_parserEnabled) {
|
||||||
if (!m_pendingUpdate) {
|
if (!m_fullUpdatePostPoned) {
|
||||||
m_partialUpdatePostPoned = true;
|
m_partialUpdatePostPoned = true;
|
||||||
m_postPonedFiles.insert(document->fileName());
|
m_postPonedFiles.insert(document->fileName());
|
||||||
}
|
}
|
||||||
@@ -726,7 +725,7 @@ void TestCodeParser::onAllTasksFinished(Core::Id type)
|
|||||||
if (type != CppTools::Constants::TASK_INDEX)
|
if (type != CppTools::Constants::TASK_INDEX)
|
||||||
return;
|
return;
|
||||||
m_parserEnabled = true;
|
m_parserEnabled = true;
|
||||||
if (m_pendingUpdate)
|
if (m_fullUpdatePostPoned)
|
||||||
updateTestTree();
|
updateTestTree();
|
||||||
else if (m_partialUpdatePostPoned) {
|
else if (m_partialUpdatePostPoned) {
|
||||||
m_partialUpdatePostPoned = false;
|
m_partialUpdatePostPoned = false;
|
||||||
|
@@ -110,7 +110,6 @@ private:
|
|||||||
QMap<QString, TestInfo> m_quickDocMap;
|
QMap<QString, TestInfo> m_quickDocMap;
|
||||||
QList<UnnamedQuickTestInfo> m_unnamedQuickDocList;
|
QList<UnnamedQuickTestInfo> m_unnamedQuickDocList;
|
||||||
bool m_parserEnabled;
|
bool m_parserEnabled;
|
||||||
bool m_pendingUpdate;
|
|
||||||
bool m_fullUpdatePostPoned;
|
bool m_fullUpdatePostPoned;
|
||||||
bool m_partialUpdatePostPoned;
|
bool m_partialUpdatePostPoned;
|
||||||
bool m_dirty;
|
bool m_dirty;
|
||||||
|
Reference in New Issue
Block a user