| 184 | } |
| 185 | |
| 186 | void StandardDocumentationView::initZoom(const QString& configSubGroup) |
| 187 | { |
| 188 | Q_D(StandardDocumentationView); |
| 189 | |
| 190 | Q_ASSERT_X(!d->m_zoomController, "StandardDocumentationView::initZoom", "Can not initZoom a second time."); |
| 191 | |
| 192 | // ZoomController writes to configGroup, so it cannot be read-only, and therefore outerGroup cannot be const. |
| 193 | KConfigGroup outerGroup(KSharedConfig::openConfig(), QStringLiteral("Documentation View")); |
| 194 | const KConfigGroup configGroup(&outerGroup, configSubGroup); |
| 195 | d->m_zoomController = new ZoomController(configGroup, this); |
| 196 | connect(d->m_zoomController, &ZoomController::factorChanged, |
| 197 | this, &StandardDocumentationView::updateZoomFactor); |
| 198 | updateZoomFactor(d->m_zoomController->factor()); |
| 199 | } |
| 200 | |
| 201 | void StandardDocumentationView::setDocumentation(const IDocumentation::Ptr& doc) |
| 202 | { |
no test coverage detected