mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
kio: KIO::ListJob optimization
only in case there is a link, there was implicit KUrl construct Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3a8f3163bf
commit
7e1088407e
1 changed files with 1 additions and 5 deletions
|
@ -1765,11 +1765,7 @@ void ListJobPrivate::slotListEntries(const KIO::UDSEntryList &list)
|
|||
const UDSEntry &entry = *it;
|
||||
|
||||
KUrl itemURL;
|
||||
// const UDSEntry::ConstIterator end2 = entry.end();
|
||||
// UDSEntry::ConstIterator it2 = entry.find(KIO::UDSEntry::UDS_URL);
|
||||
// if ( it2 != end2 )
|
||||
if (entry.contains(KIO::UDSEntry::UDS_URL)) {
|
||||
// itemURL = it2.value().toString();
|
||||
itemURL = entry.stringValue(KIO::UDSEntry::UDS_URL);
|
||||
} else {
|
||||
// no URL, use the name
|
||||
|
@ -1790,7 +1786,7 @@ void ListJobPrivate::slotListEntries(const KIO::UDSEntryList &list)
|
|||
bool listItem = true;
|
||||
if (entry.isLink()) {
|
||||
const KUrl linkDest(itemURL, entry.stringValue(KIO::UDSEntry::UDS_LINK_DEST));
|
||||
if (!m_visited.contains(linkDest.path())) {
|
||||
if (!m_visited.contains(linkDest)) {
|
||||
m_visited.append(linkDest);
|
||||
} else {
|
||||
// the link was already listed
|
||||
|
|
Loading…
Add table
Reference in a new issue