[Pkg-owncloud-commits] [owncloud-client] 186/333: Rename _dir to _direction
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:51 UTC 2014
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 c5f8a2555d626263ce40fdee4f9050bebf1f9786
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Thu Mar 20 14:56:31 2014 +0100
Rename _dir to _direction
(to avoid confusion with directory)
---
src/mirall/folder.cpp | 4 ++--
src/mirall/owncloudpropagator.cpp | 14 +++++++-------
src/mirall/progressdispatcher.cpp | 4 ++--
src/mirall/syncengine.cpp | 8 ++++----
src/mirall/syncfileitem.h | 2 +-
5 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp
index 1e0479b..0969c06 100644
--- a/src/mirall/folder.cpp
+++ b/src/mirall/folder.cpp
@@ -323,7 +323,7 @@ void Folder::bubbleUpSyncResult()
FolderMan::instance()->removeMonitorPath( alias(), path()+item._file );
}
- if (item._dir == SyncFileItem::Down) {
+ if (item._direction == SyncFileItem::Down) {
switch (item._instruction) {
case CSYNC_INSTRUCTION_NEW:
newItems++;
@@ -354,7 +354,7 @@ void Folder::bubbleUpSyncResult()
// nothing.
break;
}
- } else if( item._dir == SyncFileItem::None ) { // ignored files counting.
+ } else if( item._direction == SyncFileItem::None ) { // ignored files counting.
if( item._instruction == CSYNC_INSTRUCTION_IGNORE ) {
ignoredItems++;
}
diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index ef8d91c..86769b9 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -91,14 +91,14 @@ bool PropagateItemJob::checkForProblemsWithShared(int httpStatusCode, const QStr
// the file was removed or renamed, just recover the old one
downloadItem._instruction = CSYNC_INSTRUCTION_SYNC;
}
- downloadItem._dir = SyncFileItem::Down;
+ downloadItem._direction = SyncFileItem::Down;
newJob = new PropagateDownloadFileLegacy(_propagator, downloadItem);
} else {
// Directories are harder to recover.
// But just re-create the directory, next sync will be able to recover the files
SyncFileItem mkdirItem(_item);
mkdirItem._instruction = CSYNC_INSTRUCTION_SYNC;
- mkdirItem._dir = SyncFileItem::Down;
+ mkdirItem._direction = SyncFileItem::Down;
newJob = new PropagateLocalMkdir(_propagator, mkdirItem);
// Also remove the inodes and fileid from the db so no further renames are tried for
// this item.
@@ -134,11 +134,11 @@ void PropagateItemJob::slotRestoreJobCompleted(const SyncFileItem& item )
PropagateItemJob* OwncloudPropagator::createJob(const SyncFileItem& item) {
switch(item._instruction) {
case CSYNC_INSTRUCTION_REMOVE:
- if (item._dir == SyncFileItem::Down) return new PropagateLocalRemove(this, item);
+ if (item._direction == SyncFileItem::Down) return new PropagateLocalRemove(this, item);
else return new PropagateRemoteRemove(this, item);
case CSYNC_INSTRUCTION_NEW:
if (item._isDirectory) {
- if (item._dir == SyncFileItem::Down) return new PropagateLocalMkdir(this, item);
+ if (item._direction == SyncFileItem::Down) return new PropagateLocalMkdir(this, item);
else return new PropagateRemoteMkdir(this, item);
} //fall trough
case CSYNC_INSTRUCTION_SYNC:
@@ -148,20 +148,20 @@ PropagateItemJob* OwncloudPropagator::createJob(const SyncFileItem& item) {
return 0;
}
if (useLegacyJobs()) {
- if (item._dir != SyncFileItem::Up) {
+ if (item._direction != SyncFileItem::Up) {
return new PropagateDownloadFileLegacy(this, item);
} else {
return new PropagateUploadFileLegacy(this, item);
}
} else {
- if (item._dir != SyncFileItem::Up) {
+ if (item._direction != SyncFileItem::Up) {
return new PropagateDownloadFileQNAM(this, item);
} else {
return new PropagateUploadFileQNAM(this, item);
}
}
case CSYNC_INSTRUCTION_RENAME:
- if (item._dir == SyncFileItem::Up) {
+ if (item._direction == SyncFileItem::Up) {
return new PropagateRemoteRename(this, item);
} else {
return new PropagateLocalRename(this, item);
diff --git a/src/mirall/progressdispatcher.cpp b/src/mirall/progressdispatcher.cpp
index 907ea11..5867971 100644
--- a/src/mirall/progressdispatcher.cpp
+++ b/src/mirall/progressdispatcher.cpp
@@ -28,7 +28,7 @@ QString Progress::asResultString( const SyncFileItem& item)
case CSYNC_INSTRUCTION_CONFLICT:
case CSYNC_INSTRUCTION_SYNC:
case CSYNC_INSTRUCTION_NEW:
- if (item._dir != SyncFileItem::Up)
+ if (item._direction != SyncFileItem::Up)
return QCoreApplication::translate( "progress", "Downloaded");
else
return QCoreApplication::translate( "progress", "Uploaded");
@@ -48,7 +48,7 @@ QString Progress::asActionString( const SyncFileItem &item )
case CSYNC_INSTRUCTION_CONFLICT:
case CSYNC_INSTRUCTION_SYNC:
case CSYNC_INSTRUCTION_NEW:
- if (item._dir != SyncFileItem::Up)
+ if (item._direction != SyncFileItem::Up)
return QCoreApplication::translate( "progress", "downloading");
else
return QCoreApplication::translate( "progress", "uploading");
diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index 249f442..bd81aeb 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -212,7 +212,7 @@ bool SyncEngine::checkBlacklisting( SyncFileItem *item )
// has changed, it is tried again
// note that if the retryCount is -1 we never try again.
if( entry._retryCount == 0 ) {
- if( item->_dir == SyncFileItem::Up ) { // check the modtime
+ if( item->_direction == SyncFileItem::Up ) { // check the modtime
if(item->_modtime == 0 || entry._lastTryModtime == 0) {
re = false;
} else {
@@ -262,7 +262,7 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
item._file = QString::fromUtf8( file->path );
item._originalFile = item._file;
item._instruction = file->instruction;
- item._dir = SyncFileItem::None;
+ item._direction = SyncFileItem::None;
item._fileId = QString::fromUtf8(file->file_id);
// record the seen files to be able to clean the journal later
@@ -350,7 +350,7 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
break;
}
- item._dir = dir;
+ item._direction = dir;
// check for blacklisting of this item.
// if the item is on blacklist, the instruction was set to IGNORE
checkBlacklisting( &item );
@@ -530,7 +530,7 @@ void SyncEngine::slotUpdateFinished(int updateResult)
if (!_hasFiles && !_syncedItems.isEmpty()) {
qDebug() << Q_FUNC_INFO << "All the files are going to be removed, asking the user";
bool cancel = false;
- emit aboutToRemoveAllFiles(_syncedItems.first()._dir, &cancel);
+ emit aboutToRemoveAllFiles(_syncedItems.first()._direction, &cancel);
if (cancel) {
qDebug() << Q_FUNC_INFO << "Abort sync";
return;
diff --git a/src/mirall/syncfileitem.h b/src/mirall/syncfileitem.h
index d063921..52f68fa 100644
--- a/src/mirall/syncfileitem.h
+++ b/src/mirall/syncfileitem.h
@@ -73,7 +73,7 @@ public:
QString _file;
QString _renameTarget;
Type _type;
- Direction _dir;
+ Direction _direction;
bool _isDirectory;
// Variables used by the propagator
--
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