summaryrefslogtreecommitdiffstats
path: root/smdirmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'smdirmodel.cpp')
-rw-r--r--smdirmodel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/smdirmodel.cpp b/smdirmodel.cpp
index 6c84784..8a403d1 100644
--- a/smdirmodel.cpp
+++ b/smdirmodel.cpp
@@ -15,7 +15,7 @@
#include "smglobals.h"
#include "helper.h"
-SmDirModel::SmDirModel(const QStringList &headers, QObject *parent) : SmTreeModel(headers, parent), mHeaders(headers){
+SmDirModel::SmDirModel(const QStringList &headers, QObject *parent) : SmTreeModel(headers, parent), mHeaders(headers), mExpensiveOps(true){
mDb = QSqlDatabase::database("treedb");
mWatch = new SmDirWatcher(NumFields, this);
connect(mWatch, SIGNAL(needRefresh()), this, SLOT(refresh()));
@@ -102,7 +102,6 @@ bool SmDirModel::setData(const QModelIndex &index, const QVariant &value, int ro
QString newPath = QString("%1/%2").arg(dir).arg(newName);
QFile::rename(old, newPath);
emit needResize();
- // watcher->collector will do the rest
return true;
}
return SmTreeModel::setData(index, value, role);
@@ -177,6 +176,8 @@ void SmDirModel::readSettings(){
mRefreshTimer->start();
connect(mRefreshTimer, SIGNAL(timeout()), this, SLOT(refresh()));
}
+ bool expensive = s.value("ui/expensiveops", true).toBool();
+ mWatch->setExpensiveOps(expensive);
}
void SmDirModel::refresh(){