diff options
| author | Peter Penz <[email protected]> | 2011-12-24 14:12:09 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-12-24 14:16:10 +0100 |
| commit | 00b0bfcd01a590e06ea868c353b62791cd1fff59 (patch) | |
| tree | 6cfb1890cb3018ff069ea6d749b8076158a2ac41 /src/kitemviews | |
| parent | b5b8d48bb7848b15d1dcf99d5ac23f2d2a6d433d (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')
| -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; } |
