to be used by the gwenview recursive model, note that recursive listing via
KIO::listRecursive() does not follow links
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
KDesktopFile::isDesktopFile() checks only the extension (if the file ends with .desktop) while
KFileItem::isDesktopFile() checks the MIME type which is a bit more
expensive but more correct too (the desktoppaths KCM copies links such that
the files do not end with .desktop for example)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
this will make it call access() to do a permission check if S_IRUSR,
S_IRGRP and S_IROTH are not all set which is more reliable check (much like
the one done by KFileItem::isWritable())
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
while it does not matter for comparison, for KUrl::setFileName() to produce
correct results it has to be there after KUrl::upUrl()
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>
can't mount directories on network:/, trash:/, etc. - just not a thing.
also org::kde::KDirNotify should not be used for local files and
directories
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>
other than starting kuiserver it does nothing, the kuiserver program is
already started by other classes (such as job tracker classes) on demand
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
note to self: signal is emited for the local file too when the trash is
emptied, meaning any currently listed directories which had files moved to
the trash will be updated too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
this essentially will watch the .desktop file URL which is, say, "trash:/"
and emit changes as if the .desktop file itself was modified (to update the
icon for example). that's what the KIO desktop slave was doing essentially
but now it is implemented into KDirLister itself so anything using that
class will get it!
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>