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

Method createNavigationWidget

plugins/qmljs/duchain/qmljsducontext.cpp:24–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23template <>
24AbstractNavigationWidget* QmlJSTopDUContext::createNavigationWidget(Declaration* decl, TopDUContext* topContext,
25 AbstractNavigationWidget::DisplayHints hints) const
26{
27 if (!decl) {
28 const QUrl u = url().toUrl();
29 IncludeItem item;
30 item.pathNumber = -1;
31 item.name = u.fileName();
32 item.isDirectory = false;
33 item.basePath = u.adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash);
34
35 return new NavigationWidget(item, TopDUContextPointer(topContext ? topContext : this->topContext()), hints);
36 }
37 return new NavigationWidget(decl, topContext, hints);
38}
39
40template <>
41AbstractNavigationWidget*

Callers 2

expandingWidgetMethod · 0.45
expandingWidgetMethod · 0.45

Calls 4

urlFunction · 0.85
toUrlMethod · 0.45
fileNameMethod · 0.45
topContextMethod · 0.45

Tested by

no test coverage detected