What's a robust way to to read default applications?

Elvis Angelaccio elvis.angelaccio at kde.org
Sun Sep 24 15:24:13 UTC 2017


On domenica 24 settembre 2017 15:49:04 CEST, Nate Graham wrote:
> Hello all,
> I'm working on some code that needs to get the default file 
> manager application. I'm currently using 
> KSharedConfig::openConfig to read mimeapps.list, which works as 
> long as mimeapps.list exists. But I'm noticing that on a fresh 
> install, mimeapps.list doesn't exist--it seems to get created 
> only when the user changes something in the componentchooser 
> KCM.
>
> So what's the most robust way to read this data?

KMimeTypeTrader::self()->query("inode/directory") is probably what you are 
looking for.

>
> Nate Graham
>

Cheers,
Elvis



More information about the Plasma-devel mailing list