summaryrefslogtreecommitdiffstats
path: root/filesystemfileproxy.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-05-12 19:58:20 +0200
committerArno <am@disconnect.de>2010-05-12 19:58:20 +0200
commite0fcfd2bc9bee8fd5b27157acab4be8497117844 (patch)
treee38ad067636094321b99b9ce6f0647dcc0ccee3f /filesystemfileproxy.cpp
parent962fbe7377d47bf50cc580fcac21a98cd8a0fd85 (diff)
downloadSheMov-e0fcfd2bc9bee8fd5b27157acab4be8497117844.tar.gz
SheMov-e0fcfd2bc9bee8fd5b27157acab4be8497117844.tar.bz2
SheMov-e0fcfd2bc9bee8fd5b27157acab4be8497117844.zip
Discard QDirModel
QDirModel is deprecated by the Nokia guys. Use QFileSystemModel instead.
Diffstat (limited to 'filesystemfileproxy.cpp')
-rw-r--r--filesystemfileproxy.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/filesystemfileproxy.cpp b/filesystemfileproxy.cpp
index 25fb12b..31059ec 100644
--- a/filesystemfileproxy.cpp
+++ b/filesystemfileproxy.cpp
@@ -7,7 +7,7 @@
#include <QModelIndex>
#include <QVariant>
-#include <QDirModel>
+#include <QFileSystemModel>
#include <QFileInfo>
#include "filesystemfileproxy.h"
@@ -16,7 +16,7 @@ FilesystemFileProxy::FilesystemFileProxy(QObject *parent) : QSortFilterProxyMode
bool FilesystemFileProxy::lessThan(const QModelIndex &left, const QModelIndex &right) const {
if(left.model()->headerData(left.column(), Qt::Horizontal).toString() == tr("Name")){
- QDirModel *source = static_cast<QDirModel*>(sourceModel());
+ QFileSystemModel *source = static_cast<QFileSystemModel*>(sourceModel());
if(source->isDir(left) && source->isDir(right)){
return left.data().toString().toLower() < right.data().toString().toLower();
}
@@ -29,7 +29,7 @@ bool FilesystemFileProxy::lessThan(const QModelIndex &left, const QModelIndex &r
return left.data().toString().toLower() < right.data().toString().toLower();
}
if(left.model()->headerData(left.column(), Qt::Horizontal).toString() == tr("Size")){
- QDirModel *source = static_cast<QDirModel*>(sourceModel());
+ QFileSystemModel *source = static_cast<QFileSystemModel*>(sourceModel());
QFileInfo lInfo = source->fileInfo(left);
QFileInfo rInfo = source->fileInfo(right);
if(lInfo.isDir() && rInfo.isDir()){