summaryrefslogtreecommitdiffstats
path: root/fileview.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-03-16 16:13:05 +0100
committerArno <am@disconnect.de>2013-03-16 16:13:05 +0100
commit7bda040f35c6be15dbf1ba007de28849a0803cae (patch)
tree561995ddb3cd7087dbc6b993c0a5a4cd0166418f /fileview.cpp
parent5dbe3b400f798b0d9c5c72bb1fdbf762c603fad8 (diff)
downloadSheMov-7bda040f35c6be15dbf1ba007de28849a0803cae.tar.gz
SheMov-7bda040f35c6be15dbf1ba007de28849a0803cae.tar.bz2
SheMov-7bda040f35c6be15dbf1ba007de28849a0803cae.zip
First shot at SmDirModel
Gotta take a break here. Hopefully this will end up in a custom QFilesystemModel, but I'm hitting so many bugs on the way. Some things haven't worked for ages, I guess. Anyway, the watcher doesn't do anythying right now, still fixing bugs...
Diffstat (limited to 'fileview.cpp')
-rw-r--r--fileview.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fileview.cpp b/fileview.cpp
index dba2948..07e64be 100644
--- a/fileview.cpp
+++ b/fileview.cpp
@@ -28,6 +28,7 @@
#include "fileview.h"
#include "hoverwindow.h"
#include "smglobals.h"
+#include "smdirmodel.h"
#include "helper.h"
FileView::FileView(QWidget *parent) : QTreeView(parent), mDeleteA(0) {
@@ -53,10 +54,10 @@ void FileView::markFiles(){
QRegExp re(glob);
for(int i = 0; i < rowCount; ++i){
QModelIndex cur = rootIndex().child(i, 0);
- if(cur.data(QFileSystemModel::FileNameRole).toString() == ".."){
+ if(cur.data(SmDirModel::NameRole).toString() == ".."){
continue;
}
- if(re.indexIn(cur.data(QFileSystemModel::FileNameRole).toString()) != -1){
+ if(re.indexIn(cur.data(SmDirModel::NameRole).toString()) != -1){
selectionModel()->select(cur, QItemSelectionModel::Select | QItemSelectionModel::Rows);
}
}