diff options
Diffstat (limited to 'fileview.cpp')
-rw-r--r-- | fileview.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fileview.cpp b/fileview.cpp index 649ef3c..7853504 100644 --- a/fileview.cpp +++ b/fileview.cpp @@ -11,7 +11,7 @@ #include <QKeyEvent> #include <QModelIndex> #include <QRegExp> -#include <QDirModel> +#include <QFileSystemModel> #include <QSortFilterProxyModel> #include <QAction> #include <QApplication> @@ -42,13 +42,13 @@ void FileView::createFolder(){ mCreateFolderDialog->show(); } -void FileView::refresh(){ +/*void FileView::refresh(){ QSortFilterProxyModel *proxy = static_cast<QSortFilterProxyModel*>(model()); - QDirModel *model = static_cast<QDirModel*>(proxy->sourceModel()); + QFileSystemModel *model = static_cast<QFileSystemModel*>(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<QSortFilterProxyModel*>(model()); - QDirModel *model = static_cast<QDirModel*>(proxy->sourceModel()); + QFileSystemModel *model = static_cast<QFileSystemModel*>(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<QSortFilterProxyModel*>(model()); - QDirModel *model = static_cast<QDirModel*>(proxy->sourceModel()); + QFileSystemModel *model = static_cast<QFileSystemModel*>(proxy->sourceModel()); QModelIndex sRoot = proxy->mapToSource(rootIndex()); QModelIndex newIdx = model->mkdir(sRoot, folderName); if(newIdx == QModelIndex()){ |