MCPcopy Create free account
hub / github.com/KDE/kdevelop / remove

Method remove

kdevplatform/sublime/idealcontroller.cpp:323–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323QWidget* ToolViewWidgetCache::remove(const Document* document)
324{
325 Q_ASSERT(document);
326
327 const auto it = m_widgets.constFind(document);
328 if (it == m_widgets.cend()) {
329 qCDebug(SUBLIME) << "no tool view widget to destroy for the removed tool view" << document->documentSpecifier();
330 return nullptr;
331 }
332 qCDebug(SUBLIME).nospace() << "destroying the tool view widget for the removed tool view "
333 << document->documentSpecifier() << ", use count: " << it->useCount();
334
335 auto* const widget = it->widget();
336 Q_ASSERT(widget);
337 m_widgets.erase(it);
338 return widget;
339}
340
341class IdealToolBar : public QToolBar
342{

Callers 1

toolViewRemovedMethod · 0.45

Calls 4

useCountMethod · 0.80
constFindMethod · 0.45
documentSpecifierMethod · 0.45
widgetMethod · 0.45

Tested by

no test coverage detected