diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-01-07 01:34:30 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-01-07 01:36:16 (GMT) |
commit | f9ffe24a87d67f39bb877224f7e2b6f7b3ad6c02 (patch) | |
tree | f69854f2495aea6424334483e51a544ad7457509 | |
parent | 80d4a4945d3273a4b2ce91e34597533f661af320 (diff) | |
download | Qt-f9ffe24a87d67f39bb877224f7e2b6f7b3ad6c02.zip Qt-f9ffe24a87d67f39bb877224f7e2b6f7b3ad6c02.tar.gz Qt-f9ffe24a87d67f39bb877224f7e2b6f7b3ad6c02.tar.bz2 |
Fix warning in qfilesystemmodel_p.h
Reviewed-by: Rhys Weatherley
-rw-r--r-- | src/gui/dialogs/qfilesystemmodel_p.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/dialogs/qfilesystemmodel_p.h b/src/gui/dialogs/qfilesystemmodel_p.h index 175159f..68e19dc 100644 --- a/src/gui/dialogs/qfilesystemmodel_p.h +++ b/src/gui/dialogs/qfilesystemmodel_p.h @@ -238,15 +238,15 @@ public: void sortChildren(int column, const QModelIndex &parent); inline int translateVisibleLocation(QFileSystemNode *parent, int row) const { - if (sortOrder == Qt::AscendingOrder) - return row; - if (parent->dirtyChildrenIndex == -1 || row < parent->dirtyChildrenIndex) - if (parent->dirtyChildrenIndex != -1) - return parent->dirtyChildrenIndex - row - 1; - else + if (sortOrder != Qt::AscendingOrder) { + if (parent->dirtyChildrenIndex == -1) return parent->visibleChildren.count() - row - 1; - else - return row; + + if (row < parent->dirtyChildrenIndex) + return parent->dirtyChildrenIndex - row - 1; + } + + return row; } inline static QString myComputer() { |