| 330 | } |
| 331 | |
| 332 | void OpenWithPlugin::openDefault() const |
| 333 | { |
| 334 | // check preferred handler |
| 335 | if (m_defaultOpener.isValid()) { |
| 336 | if (m_defaultOpener.isPart()) { |
| 337 | delegateToParts(m_defaultOpener.id()); |
| 338 | } else { |
| 339 | delegateToExternalApplication(m_defaultOpener.service()); |
| 340 | } |
| 341 | return; |
| 342 | } |
| 343 | |
| 344 | // default handlers |
| 345 | if (isDirectory(m_mimeType)) { |
| 346 | KService::Ptr service = KApplicationTrader::preferredService(m_mimeType); |
| 347 | delegateToExternalApplication(service); |
| 348 | } else { |
| 349 | for (const QUrl& u : std::as_const(m_urls)) { |
| 350 | ICore::self()->documentController()->openDocument( u ); |
| 351 | } |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | void OpenWithPlugin::delegateToParts(const QString& pluginId) const |
| 356 | { |
nothing calls this directly
no test coverage detected