D20049: Fix unexpected behaviour when calling dolphin with a file as an argument

Elvis Angelaccio noreply at phabricator.kde.org
Sun Apr 7 20:55:25 BST 2019


elvisangelaccio requested changes to this revision.
elvisangelaccio added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> main.cpp:144
> +    
> +    for (QUrl url: urls) {
> +        if (QFileInfo(url.toLocalFile()).isDir()) {

Please make `url` a const reference. We should also prevent a possible detaching by using `qAsConst(urls)`:

  for (const QUrl &url : qAsConst(urls))

REPOSITORY
  R318 Dolphin

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

To: krutovmikhail, #dolphin, elvisangelaccio
Cc: pino, apol, elvisangelaccio, kfm-devel, alexde, feverfew, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190407/948084f6/attachment.htm>


More information about the kfm-devel mailing list