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

Method documentationWidget

plugins/qthelp/qthelpdocumentation.cpp:381–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379} // unnamed namespace
380
381QWidget* QtHelpDocumentation::documentationWidget(DocumentationFindWidget* findWidget, QWidget* parent)
382{
383 if(m_info.isEmpty()) { //QtHelp sometimes has empty info maps. e.g. availableaudioeffects i 4.5.2
384 return new QLabel(i18n("Could not find any documentation for '%1'", m_name), parent);
385 } else {
386 auto* view = new StandardDocumentationView(findWidget, parent);
387 view->initZoom(m_provider->name());
388 view->setDelegateLinks(true);
389 view->installUrlSchemeHandler(QByteArrayLiteral("qthelp"), new QtHelpSchemeHandler(m_provider, this));
390 view->setContextMenuPolicy(Qt::CustomContextMenu);
391 QObject::connect(view, &StandardDocumentationView::linkClicked, this, &QtHelpDocumentation::jumpedTo);
392 connect(view, &StandardDocumentationView::customContextMenuRequested, this, &QtHelpDocumentation::viewContextMenuRequested);
393
394 view->load(currentUrl());
395 return view;
396 }
397}
398
399void QtHelpDocumentation::viewContextMenuRequested(const QPoint& pos)
400{

Callers

nothing calls this directly

Calls 10

initZoomMethod · 0.80
setDelegateLinksMethod · 0.80
headerMethod · 0.80
isEmptyMethod · 0.45
nameMethod · 0.45
loadMethod · 0.45
setVisibleMethod · 0.45
setModelMethod · 0.45
engineMethod · 0.45

Tested by

no test coverage detected