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
This commit is contained in:
parent
05b6f5d706
commit
aded2d716d
|
@ -1268,7 +1268,11 @@ bool KFileItemModelRolesUpdater::applyResolvedRoles(int index, ResolveHint hint)
|
||||||
|
|
||||||
void KFileItemModelRolesUpdater::startDirectorySizeCounting(const KFileItem &item, int index)
|
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
|
// fastpath no recursion necessary
|
||||||
|
|
||||||
auto data = m_model->data(index);
|
auto data = m_model->data(index);
|
||||||
|
@ -1291,7 +1295,7 @@ void KFileItemModelRolesUpdater::startDirectorySizeCounting(const KFileItem &ite
|
||||||
m_model->setData(index, data);
|
m_model->setData(index, data);
|
||||||
connect(m_model, &KFileItemModel::itemsChanged, this, &KFileItemModelRolesUpdater::slotItemsChanged);
|
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) {
|
QObject::connect(listJob, &KIO::ListJob::entries, this, [this, index](const KJob * /*job*/, const KIO::UDSEntryList &list) {
|
||||||
auto data = m_model->data(index);
|
auto data = m_model->data(index);
|
||||||
int origCount = data.value("count").toInt();
|
int origCount = data.value("count").toInt();
|
||||||
|
|
Loading…
Reference in a new issue