D23989: Fixed interaction with DOS/Windows executables in KRun::runUrl

Marcin DÅ‚ubakowski noreply at phabricator.kde.org
Mon Sep 16 15:07:02 BST 2019


mdlubakowski marked 3 inline comments as done.
mdlubakowski added inline comments.

INLINE COMMENTS

> dfaure wrote in krun.cpp:390
> Can you split this into two "else if" conditions? It will be more readable (both the condition, and the comment). This only duplicates a trivial "canRun = false" statement.
> 
> And then we could further simplify this by checking the new bool first, so it only needs to be checked once...
> 
>   if (!supportsRunningExecutable) {
>       canRun = false;
>   } else if (!isFileExecutable && !isTextFile) {
>       [....]
>   } else if (!isFileExecutable && isTextFile) {
>       canRun = false;
>   }
> 
> What do you think?

Agree, it looks cleaner like that.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D23989

To: mdlubakowski, dfaure, #frameworks
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190916/4df83393/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list