From e0fcfd2bc9bee8fd5b27157acab4be8497117844 Mon Sep 17 00:00:00 2001 From: Arno Date: Wed, 12 May 2010 19:58:20 +0200 Subject: Discard QDirModel QDirModel is deprecated by the Nokia guys. Use QFileSystemModel instead. --- fileview.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'fileview.cpp') diff --git a/fileview.cpp b/fileview.cpp index 649ef3c..7853504 100644 --- a/fileview.cpp +++ b/fileview.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -42,13 +42,13 @@ void FileView::createFolder(){ mCreateFolderDialog->show(); } -void FileView::refresh(){ +/*void FileView::refresh(){ QSortFilterProxyModel *proxy = static_cast(model()); - QDirModel *model = static_cast(proxy->sourceModel()); + QFileSystemModel *model = static_cast(proxy->sourceModel()); QModelIndex root = rootIndex(); QModelIndex real = proxy->mapToSource(root); model->refresh(root); -} +}*/ void FileView::doMark(){ int rowCount = model()->rowCount(rootIndex()); @@ -56,7 +56,7 @@ void FileView::doMark(){ if(rowCount && !sRegex.isEmpty()){ QRegExp re(sRegex); QSortFilterProxyModel *proxy = static_cast(model()); - QDirModel *model = static_cast(proxy->sourceModel()); + QFileSystemModel *model = static_cast(proxy->sourceModel()); bool match(false); for(int i = 0; i < rowCount; ++i){ QModelIndex cur = rootIndex().child(i, 0); @@ -86,7 +86,7 @@ void FileView::doCreateFolder(){ return; } QSortFilterProxyModel *proxy = static_cast(model()); - QDirModel *model = static_cast(proxy->sourceModel()); + QFileSystemModel *model = static_cast(proxy->sourceModel()); QModelIndex sRoot = proxy->mapToSource(rootIndex()); QModelIndex newIdx = model->mkdir(sRoot, folderName); if(newIdx == QModelIndex()){ -- cgit v1.2.3-70-g09d2