AutoTest: Remove pointless member

Change-Id: I1b5bd421e93bb6425e29941a21cfccc6cac5d6ce
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2018-01-05 10:11:52 +01:00
parent 3f7f5b9a95
commit b759960980
2 changed files with 5 additions and 7 deletions

View File

@@ -73,12 +73,11 @@ TestTreeModel::~TestTreeModel()
void TestTreeModel::setupParsingConnections() void TestTreeModel::setupParsingConnections()
{ {
if (!m_connectionsInitialized) static bool connectionsInitialized = false;
m_parser->setDirty(); if (connectionsInitialized)
m_parser->setState(TestCodeParser::Idle);
if (m_connectionsInitialized)
return; return;
m_parser->setDirty();
m_parser->setState(TestCodeParser::Idle);
ProjectExplorer::SessionManager *sm = ProjectExplorer::SessionManager::instance(); ProjectExplorer::SessionManager *sm = ProjectExplorer::SessionManager::instance();
connect(sm, &ProjectExplorer::SessionManager::startupProjectChanged, connect(sm, &ProjectExplorer::SessionManager::startupProjectChanged,
@@ -97,7 +96,7 @@ void TestTreeModel::setupParsingConnections()
m_parser, &TestCodeParser::onQmlDocumentUpdated, Qt::QueuedConnection); m_parser, &TestCodeParser::onQmlDocumentUpdated, Qt::QueuedConnection);
connect(qmlJsMM, &QmlJS::ModelManagerInterface::aboutToRemoveFiles, connect(qmlJsMM, &QmlJS::ModelManagerInterface::aboutToRemoveFiles,
this, &TestTreeModel::removeFiles, Qt::QueuedConnection); this, &TestTreeModel::removeFiles, Qt::QueuedConnection);
m_connectionsInitialized = true; connectionsInitialized = true;
} }
bool TestTreeModel::setData(const QModelIndex &index, const QVariant &value, int role) bool TestTreeModel::setData(const QModelIndex &index, const QVariant &value, int role)

View File

@@ -91,7 +91,6 @@ private:
void setupParsingConnections(); void setupParsingConnections();
TestCodeParser *m_parser; TestCodeParser *m_parser;
bool m_connectionsInitialized = false;
}; };
class TestTreeSortFilterModel : public QSortFilterProxyModel class TestTreeSortFilterModel : public QSortFilterProxyModel