Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/kdirmodel.cpp
Show First 20 Lines • Show All 486 Lines • ▼ Show 20 Line(s) | 479 | #ifndef NDEBUG | |||
---|---|---|---|---|---|
487 | //} | 487 | //} | ||
488 | #endif | 488 | #endif | ||
489 | dirNode->m_childNodes.append(node); | 489 | dirNode->m_childNodes.append(node); | ||
490 | const QUrl url = it->url(); | 490 | const QUrl url = it->url(); | ||
491 | m_nodeHash.insert(cleanupUrl(url), node); | 491 | m_nodeHash.insert(cleanupUrl(url), node); | ||
492 | //qDebug() << url; | 492 | //qDebug() << url; | ||
493 | 493 | | |||
494 | if (!urlsBeingFetched.isEmpty()) { | 494 | if (!urlsBeingFetched.isEmpty()) { | ||
495 | const QUrl dirUrl(url); | 495 | const QUrl &dirUrl = url; | ||
kossebau: `const QUrl &dirUrl = url;` for consistency, please. | |||||
496 | for (const QUrl &urlFetched : qAsConst(urlsBeingFetched)) { | 496 | for (const QUrl &urlFetched : qAsConst(urlsBeingFetched)) { | ||
497 | if (dirUrl.matches(urlFetched, QUrl::StripTrailingSlash) || dirUrl.isParentOf(urlFetched)) { | 497 | if (dirUrl.matches(urlFetched, QUrl::StripTrailingSlash) || dirUrl.isParentOf(urlFetched)) { | ||
498 | //qDebug() << "Listing found" << dirUrl.url() << "which is a parent of fetched url" << urlFetched; | 498 | //qDebug() << "Listing found" << dirUrl.url() << "which is a parent of fetched url" << urlFetched; | ||
499 | const QModelIndex parentIndex = indexForNode(node, dirNode->m_childNodes.count() - 1); | 499 | const QModelIndex parentIndex = indexForNode(node, dirNode->m_childNodes.count() - 1); | ||
500 | Q_ASSERT(parentIndex.isValid()); | 500 | Q_ASSERT(parentIndex.isValid()); | ||
501 | emitExpandFor.append(parentIndex); | 501 | emitExpandFor.append(parentIndex); | ||
502 | if (isDir && dirUrl != urlFetched) { | 502 | if (isDir && dirUrl != urlFetched) { | ||
503 | q->fetchMore(parentIndex); | 503 | q->fetchMore(parentIndex); | ||
▲ Show 20 Lines • Show All 805 Lines • Show Last 20 Lines |
const QUrl &dirUrl = url; for consistency, please.