summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2016-02-06 06:52:22 +0100
committerArno <arno@disconnect.de>2016-02-06 06:52:22 +0100
commitfa17037f24ec8ced526effb8226f8c27da04cfbb (patch)
treec5201740c5282c44fbba0d61cfb9f4b3e4be63d6
parent44629b1bc608e17dbf34b32247f3cfb6f0619b7d (diff)
downloadSheMov-fa17037f24ec8ced526effb8226f8c27da04cfbb.tar.gz
SheMov-fa17037f24ec8ced526effb8226f8c27da04cfbb.tar.bz2
SheMov-fa17037f24ec8ced526effb8226f8c27da04cfbb.zip
Remove IN_MODIFY from inotify mask
When copying a file to a watched directory, this leads to excessive inotify events. I'm guessing that's the source for the deadlock when encoding files on othalla. Anyway, it's worth a try. Also remove a stray qApp->processEvents()
-rw-r--r--filesystemwidget.cpp1
-rw-r--r--smdirwatcher.cpp4
2 files changed, 1 insertions, 4 deletions
diff --git a/filesystemwidget.cpp b/filesystemwidget.cpp
index 07e058d..a03b6f0 100644
--- a/filesystemwidget.cpp
+++ b/filesystemwidget.cpp
@@ -272,7 +272,6 @@ void FilesystemWidget::deleteFiles(){
qApp->setOverrideCursor(Qt::WaitCursor);
TimerHandler h(mFileModel->refreshTimer());
WatcherHandler wh(mFileModel->watcher());
- qApp->processEvents();
qApp->restoreOverrideCursor();
QModelIndexList selected = mFileView->selectionModel()->selectedRows();
if(selected.isEmpty()){
diff --git a/smdirwatcher.cpp b/smdirwatcher.cpp
index 2bcaff3..cb9c6b7 100644
--- a/smdirwatcher.cpp
+++ b/smdirwatcher.cpp
@@ -52,7 +52,7 @@ void SmDirWatcher::setDir(const QString &dir){
* watching one directory at all time.
* We don't care about the other events
*/
- mDescr = inotify_add_watch(mFd, qPrintable(dir), IN_CLOSE_WRITE | IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVED_FROM | IN_MOVED_TO);
+ mDescr = inotify_add_watch(mFd, qPrintable(dir), IN_CLOSE_WRITE | IN_CREATE | IN_DELETE | IN_MOVED_FROM | IN_MOVED_TO);
qApp->restoreOverrideCursor();
}
@@ -153,8 +153,6 @@ void SmDirWatcher::run(){
emit newData(d, Added);
}else if(mask & IN_DELETE || mask & IN_MOVED_FROM){
emit newData(d, Deleted);
- }else if(mask & IN_MODIFY){
- emit newData(d, Modified);
}else if(mask & IN_CLOSE_WRITE){
emit newData(d, CloseWrite);
}