[Pkg-owncloud-commits] [owncloud-client] 214/470: Remove the mutex from ExcludedFiles

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:25:04 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit a4e0899af4eec5883bb16011c5760ca0c3707f76
Author: Jocelyn Turcotte <jturcotte at woboq.com>
Date:   Fri Mar 18 17:15:30 2016 +0100

    Remove the mutex from ExcludedFiles
    
    It's always accessed from the main thread.
---
 src/libsync/excludedfiles.cpp | 5 -----
 src/libsync/excludedfiles.h   | 2 --
 2 files changed, 7 deletions(-)

diff --git a/src/libsync/excludedfiles.cpp b/src/libsync/excludedfiles.cpp
index 3724c48..d4eed06 100644
--- a/src/libsync/excludedfiles.cpp
+++ b/src/libsync/excludedfiles.cpp
@@ -14,8 +14,6 @@
 #include "excludedfiles.h"
 
 #include <QFileInfo>
-#include <QReadLocker>
-#include <QWriteLocker>
 
 extern "C" {
 #include "std/c_string.h"
@@ -44,13 +42,11 @@ ExcludedFiles& ExcludedFiles::instance()
 
 void ExcludedFiles::addExcludeFilePath(const QString& path)
 {
-    QWriteLocker locker(&_mutex);
     _excludeFiles.append(path);
 }
 
 bool ExcludedFiles::reloadExcludes()
 {
-    QWriteLocker locker(&_mutex);
     c_strlist_destroy(*_excludesPtr);
     *_excludesPtr = NULL;
 
@@ -89,6 +85,5 @@ bool ExcludedFiles::isExcluded(
         relativePath.chop(1);
     }
 
-    QReadLocker lock(&_mutex);
     return csync_excluded_no_ctx(*_excludesPtr, relativePath.toUtf8(), type) != CSYNC_NOT_EXCLUDED;
 }
diff --git a/src/libsync/excludedfiles.h b/src/libsync/excludedfiles.h
index 3a71108..5e47f7c 100644
--- a/src/libsync/excludedfiles.h
+++ b/src/libsync/excludedfiles.h
@@ -16,7 +16,6 @@
 #include "owncloudlib.h"
 
 #include <QObject>
-#include <QReadWriteLock>
 #include <QStringList>
 
 extern "C" {
@@ -68,7 +67,6 @@ private:
     // but the pointer can be in a csync_context so that it can itself also query the list.
     c_strlist_t** _excludesPtr;
     QStringList _excludeFiles;
-    mutable QReadWriteLock _mutex;
 };
 
 } // namespace OCC

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list