D9610: Revive folderpanel when outside $HOME

Anthony Fieroni noreply at phabricator.kde.org
Tue Jan 2 18:49:18 GMT 2018


anthonyfieroni added inline comments.

INLINE COMMENTS

> michaelh wrote in kfileitemmodel.cpp:637
> Just tested it. It's not working. 
> url().adjusted(QUrl::StripTrailingSlash) does not strip from 'file:///'

QUrl::StripTrailingSlash will strip in loop all '/' that why it's not working. Thanks for testing.

> kfileitemmodel.cpp:651
>      for (int i = 0; i < subDirs.count() - 1; ++i) {
>          urlToExpand.setPath(urlToExpand.path() + '/' + subDirs.at(i));
>          m_urlsToExpand.insert(urlToExpand);

You can add check here.

  QString path = urlToExpand.path();
  if (!path.endsWith(QLatin1Char('/')) {
      path.append(QLatin1Char('/'));
  }
  urlToExpand.setPath(path() + subDirs.at(i));

REPOSITORY
  R318 Dolphin

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

To: michaelh, #dolphin
Cc: elvisangelaccio, ngraham, anthonyfieroni, michaelh, spoorun, navarromorales, isidorov, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180102/8dd15150/attachment.htm>


More information about the kfm-devel mailing list