| 299 | } |
| 300 | |
| 301 | void FileTemplatesPlugin::previewTemplate() |
| 302 | { |
| 303 | auto* action = qobject_cast<QAction*>(sender()); |
| 304 | if (!action || !action->data().toUrl().isValid()) |
| 305 | { |
| 306 | return; |
| 307 | } |
| 308 | auto* preview = qobject_cast<TemplatePreviewToolView*>(core()->uiController()->findToolView(i18nc("@title:window", "Template Preview"), m_toolView)); |
| 309 | if (!preview) |
| 310 | { |
| 311 | return; |
| 312 | } |
| 313 | |
| 314 | core()->documentController()->activateDocument(core()->documentController()->openDocument(action->data().toUrl())); |
| 315 | } |
| 316 | |
| 317 | #include "filetemplatesplugin.moc" |
| 318 | #include "moc_filetemplatesplugin.cpp" |
nothing calls this directly
no test coverage detected