MCPcopy Create free account
hub / github.com/KDE/kdevelop / updateMimeTypeForUrls

Method updateMimeTypeForUrls

plugins/openwith/openwithplugin.cpp:424–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424QMimeType 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"

Callers

nothing calls this directly

Calls 5

defaultsConfigFunction · 0.85
readEntryMethod · 0.80
QStringClass · 0.50
firstMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected