bool lvmFound = findExternal(QStringLiteral("lvm")) ? cmdSupportFileSystem : cmdSupportNone;
and then just do e.g. m_Shrink = lvmFound;
Then we will not need to uselessly look for the same executable a few times. I know, this is also the behaviour of some other filesystems in kpmcore but I should also fix them too.
I'll look at the rest of this patch tomorrow.
Hmm, one quick idea is maybe just cache
*bool lvmFound = findExternal(QStringLiteral("lvm")) ? cmdSupportFileSystem : cmdSupportNone;*
and then just do e.g. *m_Shrink = lvmFound;*
Then we will not need to uselessly look for the same executable a few times. I know, this is also the behaviour of some other filesystems in kpmcore but I should also fix them too.
I'll look at the rest of this patch tomorrow.
Hmm, one quick idea is maybe just cache
bool lvmFound = findExternal(QStringLiteral("lvm")) ? cmdSupportFileSystem : cmdSupportNone;
and then just do e.g. m_Shrink = lvmFound;
Then we will not need to uselessly look for the same executable a few times. I know, this is also the behaviour of some other filesystems in kpmcore but I should also fix them too.
I'll look at the rest of this patch tomorrow.