the fix is only for non-local file URLs, KUrl already does the correct
thing by stat()-ing local file URLs (see KUrl::upUrl())
trailing slash is added to the URL by
KUrlNavigator::Private::updateButtonVisibility() too before checking if it
is possible to go up which essentially means that KUrlNavigator was not
ment to be for files (it does not autocomplete files either) even tho it is
possible to open file by adding file name manually to the URL (via dolphin
anyway, not via KFileDialog tho)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
KDateTime shall be used only for storing date and time while KLocale
shall be used to display such, not even going to test what KDateTime
does because it is basically a few methods on top of QDateTime now.
and because QDateTime knows not much about calendar systems while
KLocale supports several it makes sense for KDateTime to not be used for
displaying date and time thus the TODOs for KLocale are simply removed
note that KLocale still uses its own parser and formatter which means
that the change affects only KDateTime and its uses, not KLocale
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
TODO from 55458f706c, this is something that
should've been done when KFile::Directory was introduced (before the fork)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
note that if class was not empty any URL selected was added to recent dirs
(which could be a file, duh). now directories will be added only for
directory mode and when the class (see KFileWidget about starting
directory) is not empty
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
that way file and directory dialogs will be consistent, not to mention
there were things that KDirSelectDialog was lacking such as resizable
places area.
more changes are needed to account for the directory mode
(KFile::Directory), currently for directory only mode the filter is set
to "All Folders" but it can be changed (the filter widget is not
disabled). also when an attempt to open non-existing directory by name
(via the name input widget) the error says "the file cannot be found"
- it should be "the directory cannot be found" for directory mode
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
so that it is clear that the options shall affect only the result, also for
local files the correct thing can be done regardless of the trailing slash
as is done in KUrl::upUrl()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
same thing (all URL components are compared) except the trailing slash
option can be re-used for it essentially adding one more option (to add
trailing slash when comparing)
also fixed and tested KUrl::upUrl() for some cases
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
currently only the plasma folderview applet uses it but it has a copy of
the header so better export it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>