Simplify interface of classes in ClassViewPlugin

Remove unused methods. Replace one slot with a call
to lambda.

Amends a673fca144

Task-number: QTCREATORBUG-25317
Change-Id: I1125b62b9ea66b8dc43038a6b748d52a5a27224f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2021-02-08 16:52:42 +01:00
parent 30d4f7b48c
commit 1b9c0c7ef5
4 changed files with 8 additions and 63 deletions

View File

@@ -199,7 +199,14 @@ void Manager::initialize()
// translate data update from the parser to listeners
connect(&d->parser, &Parser::treeDataUpdate,
this, &Manager::onTreeDataUpdate, Qt::QueuedConnection);
this, [this](QSharedPointer<QStandardItem> result) {
// do nothing if Manager is disabled
if (!state())
return;
emit treeDataUpdate(result);
}, Qt::QueuedConnection);
// connect to the cpp model manager for signals about document updates
CppTools::CppModelManager *codeModelManager = CppTools::CppModelManager::instance();
@@ -352,19 +359,5 @@ void Manager::setFlatMode(bool flat)
}, Qt::QueuedConnection);
}
/*!
Sends a new tree data update to a tree view. \a result holds the item with
the current tree.
*/
void Manager::onTreeDataUpdate(QSharedPointer<QStandardItem> result)
{
// do nothing if Manager is disabled
if (!state())
return;
emit treeDataUpdate(result);
}
} // namespace Internal
} // namespace ClassView