aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/classview/classviewmanager.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2021-02-08 16:52:42 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2021-02-09 10:14:17 +0000
commit1b9c0c7ef5ade38d2c435c1b9a2d88089d51f630 (patch)
tree11a5c6bd6f21417340250140bb758c704fc54527 /src/plugins/classview/classviewmanager.cpp
parent30d4f7b48c4a886133714b4856de3a20658858c7 (diff)
Simplify interface of classes in ClassViewPlugin
Remove unused methods. Replace one slot with a call to lambda. Amends a673fca1445a0f34b6799d9d60e521c8ae9b68af Task-number: QTCREATORBUG-25317 Change-Id: I1125b62b9ea66b8dc43038a6b748d52a5a27224f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/classview/classviewmanager.cpp')
-rw-r--r--src/plugins/classview/classviewmanager.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/plugins/classview/classviewmanager.cpp b/src/plugins/classview/classviewmanager.cpp
index bf9ed8f58f..a1cf405375 100644
--- a/src/plugins/classview/classviewmanager.cpp
+++ b/src/plugins/classview/classviewmanager.cpp
@@ -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