mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Don't compute size for non-local urls
Hide progressInfo for listDir job on the non-recursize path.
BUG: 472912
(cherry picked from commit aded2d716d
)
This commit is contained in:
parent
9ccba3e44b
commit
706c2fa257
|
@ -1268,7 +1268,11 @@ bool KFileItemModelRolesUpdater::applyResolvedRoles(int index, ResolveHint hint)
|
|||
|
||||
void KFileItemModelRolesUpdater::startDirectorySizeCounting(const KFileItem &item, int index)
|
||||
{
|
||||
if (ContentDisplaySettings::directorySizeCount() || item.isSlow() || !item.isLocalFile()) {
|
||||
if (!item.isLocalFile()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ContentDisplaySettings::directorySizeCount() || item.isSlow()) {
|
||||
// fastpath no recursion necessary
|
||||
|
||||
auto data = m_model->data(index);
|
||||
|
@ -1291,7 +1295,7 @@ void KFileItemModelRolesUpdater::startDirectorySizeCounting(const KFileItem &ite
|
|||
m_model->setData(index, data);
|
||||
connect(m_model, &KFileItemModel::itemsChanged, this, &KFileItemModelRolesUpdater::slotItemsChanged);
|
||||
|
||||
auto listJob = KIO::listDir(url);
|
||||
auto listJob = KIO::listDir(url, KIO::HideProgressInfo);
|
||||
QObject::connect(listJob, &KIO::ListJob::entries, this, [this, index](const KJob * /*job*/, const KIO::UDSEntryList &list) {
|
||||
auto data = m_model->data(index);
|
||||
int origCount = data.value("count").toInt();
|
||||
|
|
Loading…
Reference in a new issue