| 106 | }; |
| 107 | |
| 108 | DocumentationController::DocumentationController(Core* core) |
| 109 | : m_factory(new DocumentationViewFactory) |
| 110 | { |
| 111 | StandardDocumentationView::registerCustomUrlSchemes(); |
| 112 | |
| 113 | m_showDocumentation = core->uiController()->activeMainWindow()->actionCollection()->addAction(QStringLiteral("showDocumentation")); |
| 114 | m_showDocumentation->setText(i18nc("@action", "Show Documentation")); |
| 115 | m_showDocumentation->setIcon(QIcon::fromTheme(QStringLiteral("documentation"))); |
| 116 | connect(m_showDocumentation, &QAction::triggered, this, &DocumentationController::doShowDocumentation); |
| 117 | |
| 118 | // registering the tool view here so it registered before the areas are restored |
| 119 | // and thus also gets treated like the ones registered from plugins |
| 120 | // cmp. comment about tool views in CorePrivate::initialize |
| 121 | core->uiController()->addToolView(i18nc("@title:window", "Documentation"), m_factory); |
| 122 | } |
| 123 | |
| 124 | DocumentationController::~DocumentationController() |
| 125 | { |
nothing calls this directly
no test coverage detected