Changeset View
Changeset View
Standalone View
Standalone View
src/core/listjob.cpp
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Line(s) | 106 | for (; it != end; ++it) { | |||
---|---|---|---|---|---|
112 | QString filename; | 112 | QString filename; | ||
113 | if (!udsUrl.isEmpty()) { | 113 | if (!udsUrl.isEmpty()) { | ||
114 | itemURL = QUrl(udsUrl); | 114 | itemURL = QUrl(udsUrl); | ||
115 | filename = itemURL.fileName(); | 115 | filename = itemURL.fileName(); | ||
116 | } else { // no URL, use the name | 116 | } else { // no URL, use the name | ||
117 | itemURL = q->url(); | 117 | itemURL = q->url(); | ||
118 | filename = entry.stringValue(KIO::UDSEntry::UDS_NAME); | 118 | filename = entry.stringValue(KIO::UDSEntry::UDS_NAME); | ||
119 | Q_ASSERT(!filename.isEmpty()); // we'll recurse forever otherwise :) | 119 | Q_ASSERT(!filename.isEmpty()); // we'll recurse forever otherwise :) | ||
120 | if (itemURL.path() == QLatin1Char('/')) { | ||||
121 | itemURL.setPath(itemURL.path() + filename); | ||||
122 | } else { | ||||
120 | itemURL.setPath(itemURL.path() + '/' + filename); | 123 | itemURL.setPath(itemURL.path() + '/' + filename); | ||
121 | } | 124 | } | ||
125 | } | ||||
122 | 126 | | |||
123 | if (entry.isDir() && !entry.isLink()) { | 127 | if (entry.isDir() && !entry.isLink()) { | ||
124 | Q_ASSERT(!filename.isEmpty()); | 128 | Q_ASSERT(!filename.isEmpty()); | ||
125 | QString displayName = entry.stringValue(KIO::UDSEntry::UDS_DISPLAY_NAME); | 129 | QString displayName = entry.stringValue(KIO::UDSEntry::UDS_DISPLAY_NAME); | ||
126 | if (displayName.isEmpty()) { | 130 | if (displayName.isEmpty()) { | ||
127 | displayName = filename; | 131 | displayName = filename; | ||
128 | } | 132 | } | ||
129 | // skip hidden dirs when listing if requested | 133 | // skip hidden dirs when listing if requested | ||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |