| 422 | } |
| 423 | |
| 424 | QMimeType OpenWithPlugin::updateMimeTypeForUrls() |
| 425 | { |
| 426 | // Fetch the MIME type of the !!first!! URL. |
| 427 | // TODO: think about possible alternatives to using the MIME type of the first URL. |
| 428 | auto mimeType = QMimeDatabase().mimeTypeForUrl(m_urls.first()); |
| 429 | m_mimeType = mimeType.name(); |
| 430 | |
| 431 | const auto config = defaultsConfig(); |
| 432 | m_defaultOpener = FileOpener::fromConfigEntryValue(config.readEntry(m_mimeType, QString())); |
| 433 | |
| 434 | return mimeType; |
| 435 | } |
| 436 | |
| 437 | #include "openwithplugin.moc" |
| 438 | #include "moc_openwithplugin.cpp" |
nothing calls this directly
no test coverage detected