diff --git a/src/plugins/classview/classviewmanager.cpp b/src/plugins/classview/classviewmanager.cpp index bf9ed8f58fd..a1cf4053751 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 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 result) -{ - // do nothing if Manager is disabled - if (!state()) - return; - - emit treeDataUpdate(result); -} - } // namespace Internal } // namespace ClassView diff --git a/src/plugins/classview/classviewmanager.h b/src/plugins/classview/classviewmanager.h index 2b0513e5738..af6d60ef045 100644 --- a/src/plugins/classview/classviewmanager.h +++ b/src/plugins/classview/classviewmanager.h @@ -60,7 +60,6 @@ signals: private: void onProjectListChanged(); - void onTreeDataUpdate(QSharedPointer result); void resetParser(); void initialize(); diff --git a/src/plugins/classview/classviewparsertreeitem.cpp b/src/plugins/classview/classviewparsertreeitem.cpp index 102abf23815..bce502262e9 100644 --- a/src/plugins/classview/classviewparsertreeitem.cpp +++ b/src/plugins/classview/classviewparsertreeitem.cpp @@ -146,36 +146,6 @@ void ParserTreeItem::addSymbolLocation(const SymbolLocation &location) d->symbolLocations.insert(location); } -/*! - Adds information about symbol locations from \a locations. - \sa SymbolLocation, removeSymbolLocation, symbolLocations -*/ - -void ParserTreeItem::addSymbolLocation(const QSet &locations) -{ - d->symbolLocations.unite(locations); -} - -/*! - Removes information about \a location. - \sa SymbolLocation, addSymbolLocation, symbolLocations -*/ - -void ParserTreeItem::removeSymbolLocation(const SymbolLocation &location) -{ - d->symbolLocations.remove(location); -} - -/*! - Removes information about \a locations. - \sa SymbolLocation, addSymbolLocation, symbolLocations -*/ - -void ParserTreeItem::removeSymbolLocations(const QSet &locations) -{ - d->symbolLocations.subtract(locations); -} - /*! Gets information about symbol positions. \sa SymbolLocation, addSymbolLocation, removeSymbolLocation @@ -199,15 +169,6 @@ void ParserTreeItem::appendChild(const ParserTreeItem::Ptr &item, const SymbolIn d->symbolInformations[inf] = item; } -/*! - Removes the \a inf symbol information. -*/ - -void ParserTreeItem::removeChild(const SymbolInformation &inf) -{ - d->symbolInformations.remove(inf); -} - /*! Returns the child item specified by \a inf symbol information. */ diff --git a/src/plugins/classview/classviewparsertreeitem.h b/src/plugins/classview/classviewparsertreeitem.h index d3ca68007ef..15a12c5f80a 100644 --- a/src/plugins/classview/classviewparsertreeitem.h +++ b/src/plugins/classview/classviewparsertreeitem.h @@ -54,18 +54,10 @@ public: void addSymbolLocation(const SymbolLocation &location); - void addSymbolLocation(const QSet &locations); - - void removeSymbolLocation(const SymbolLocation &location); - - void removeSymbolLocations(const QSet &locations); - QSet symbolLocations() const; void appendChild(const ParserTreeItem::Ptr &item, const SymbolInformation &inf); - void removeChild(const SymbolInformation &inf); - ParserTreeItem::Ptr child(const SymbolInformation &inf) const; int childCount() const;