D14442: Unify window and tab title

Mark Gaiser noreply at phabricator.kde.org
Fri Aug 10 20:44:23 BST 2018


markg added inline comments.

INLINE COMMENTS

> hallas wrote in dolphinviewcontainer.cpp:428-446
> Hi Mark,
> 
> yes I would really like to avoid this QUrl magic :) The problem (as I see it), is that I do not always have a KFileItem with the correct contents (but please correct me if I am wrong here, since this code is pretty new to me), for example: When Dolphin starts up, it basically navigates to a QUrl either passed on the command line, or uses the home directory, so in this case we do not have a populated KFileItem. But when the user navigates using the view, we should have a KFileItem, because the view basically displays a list of KFileItems, so no problem here. But if the user types in a new url in the locator, i.e. if I  type in remote:// this I do not have a KFileItem for this URL and hence we cannot display the user friendly string for it.  This is why i tried doing a KIO::stat on the QUrl, but had limited success. It seems like some of the "pseudo" protocols like remote:// and smb:// doesn't really support stat in all cases, for example stat of remote: doesn't give me the "Network" pretty name :/
> 
> So is there a way where I consistently can populate KFileItem, mainly the UDS_NAME or UDS_PRETTY_NAME attributes, given a QUrl?

When you press <enter> dolphin does it's magic and opens the url you typed. At that point a KFileITem of it lives somewhere within Dolphin's reach otherwise no view would be populated ;)

I will have a look at this tomorrow and see if i can figure something out.

Funny note though, the very first (or one of) commits i did in dolphin was unifying the title to what it is now :)
That was already an improvement over how it was, you just make it much better, hehe.

REPOSITORY
  R318 Dolphin

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

To: hallas, #dolphin, ngraham, elvisangelaccio
Cc: markg, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180810/3b0c761f/attachment.htm>


More information about the kfm-devel mailing list