Removed silly configDir hack from thread.

This commit is contained in:
Klaas Freitag 2013-04-22 15:06:28 +02:00
parent 9f0348979b
commit 8928c87fc3
3 changed files with 3 additions and 19 deletions

View file

@ -43,8 +43,6 @@ namespace Mirall {
/* static variables to hold the credentials */
QString CSyncThread::_csyncConfigDir; // to be able to remove the lock file.
QMutex CSyncThread::_mutex;
QMutex CSyncThread::_syncMutex;
@ -309,11 +307,6 @@ void CSyncThread::startSync()
_needsUpdate = false;
_mutex.unlock();
MirallConfigFile cfg;
_mutex.lock();
_csyncConfigDir = cfg.configPath();
_mutex.unlock();
// cleans up behind us and emits finished() to ease error handling
CSyncRunScopeHelper helper(_csync_ctx, this);
@ -354,7 +347,7 @@ void CSyncThread::startSync()
if( walkOk ) {
if( csync_walk_local_tree(_csync_ctx, &walkFinalize, 0) < 0 ||
csync_walk_remote_tree( _csync_ctx, &walkFinalize, 0 ) < 0 ) {
qDebug() << "Error in finalize treewalk.";
qDebug() << "Error in finalize treewalk.";
} else {
// emit the treewalk results.
emit treeWalkResult(_syncedItems);
@ -363,11 +356,6 @@ void CSyncThread::startSync()
qDebug() << Q_FUNC_INFO << "Sync finished";
}
QString CSyncThread::csyncConfigDir()
{
return _csyncConfigDir;
}
void CSyncThread::progress(const char *remote_url, enum csync_notify_type_e kind,
long long o1, long long o2, void *userdata)
{

View file

@ -38,8 +38,6 @@ public:
CSyncThread(CSYNC *);
~CSyncThread();
static QString csyncConfigDir();
QString csyncErrorToString( CSYNC_ERROR_CODE, const char * );
Q_INVOKABLE void startSync();
@ -76,9 +74,6 @@ private:
static QMutex _mutex;
static QMutex _syncMutex;
static QString _csyncConfigDir;
SyncFileItemVector _syncedItems;
CSYNC *_csync_ctx;

View file

@ -334,7 +334,8 @@ void ownCloudFolder::slotThreadTreeWalkResult(const SyncFileItemVector& items)
void ownCloudFolder::slotTerminateSync()
{
qDebug() << "folder " << alias() << " Terminating!";
QString configDir = _csync->csyncConfigDir();
MirallConfigFile cfg;
QString configDir = cfg.configPath();
qDebug() << "csync's Config Dir: " << configDir;
if( _thread ) {