diff options
| author | Peter Penz <[email protected]> | 2011-12-24 14:12:09 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-12-24 14:15:21 +0100 |
| commit | f07315deb093852ca86734ef60d1e19623eee3c2 (patch) | |
| tree | a1cff0005e8fa57d8f9b76d45e2e4a478a762ef1 /src/kitemviews/kfileitemmodel.cpp | |
| parent | f8d47e7e0416d4fd4e7c24e4b2de20ae43dab882 (diff) | |
Fix sort-issue for trees
If a protocol like fish is used, the sorting of sub-trees was wrong. The root
cause was a wrong comparing of URLs where the protocol was not initialized.
BUG: 289697
FIXED-IN: 4.8.0
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 70e92eaac..0ac9400c9 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1531,16 +1531,16 @@ int KFileItemModel::expansionLevelsCompare(const ItemData* a, const ItemData* b) // Compare the items of the parents that represent the first // different path after the common path. - const KUrl parentUrlA(pathA.left(index) + subPathA); - const KUrl parentUrlB(pathB.left(index) + subPathB); + const QString parentPathA = pathA.left(index) + subPathA; + const QString parentPathB = pathB.left(index) + subPathB; const ItemData* parentA = a; - while (parentA && parentA->item.url() != parentUrlA) { + while (parentA && parentA->item.url().path() != parentPathA) { parentA = parentA->parent; } const ItemData* parentB = b; - while (parentB && parentB->item.url() != parentUrlB) { + while (parentB && parentB->item.url().path() != parentPathB) { parentB = parentB->parent; } |
