summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-01-07 01:34:30 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2010-01-07 01:36:16 (GMT)
commitf9ffe24a87d67f39bb877224f7e2b6f7b3ad6c02 (patch)
treef69854f2495aea6424334483e51a544ad7457509 /src
parent80d4a4945d3273a4b2ce91e34597533f661af320 (diff)
downloadQt-f9ffe24a87d67f39bb877224f7e2b6f7b3ad6c02.zip
Qt-f9ffe24a87d67f39bb877224f7e2b6f7b3ad6c02.tar.gz
Qt-f9ffe24a87d67f39bb877224f7e2b6f7b3ad6c02.tar.bz2
Fix warning in qfilesystemmodel_p.h
Reviewed-by: Rhys Weatherley
Diffstat (limited to 'src')
-rw-r--r--src/gui/dialogs/qfilesystemmodel_p.h16
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() {