[Pkg-owncloud-commits] [owncloud-client] 442/470: Avoid a SyncFileStatusTracker private overload with the same name

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:25:40 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 7c2fdee78bf9608109e0274efce1a1f7ddb8c283
Author: Jocelyn Turcotte <jturcotte at woboq.com>
Date:   Thu Apr 28 21:20:24 2016 +0200

    Avoid a SyncFileStatusTracker private overload with the same name
    
    Having an overload as a private function in the same class makes the
    code harder to follow. Rename the private fileStatus to syncFileItemStatus.
---
 src/libsync/syncfilestatustracker.cpp | 14 +++++++-------
 src/libsync/syncfilestatustracker.h   |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/libsync/syncfilestatustracker.cpp b/src/libsync/syncfilestatustracker.cpp
index 35f3692..c32e4d6 100644
--- a/src/libsync/syncfilestatustracker.cpp
+++ b/src/libsync/syncfilestatustracker.cpp
@@ -102,7 +102,7 @@ SyncFileStatus SyncFileStatusTracker::fileStatus(const QString& systemFileName)
 
     if( fileName.isEmpty() ) {
         // This is the root sync folder, it doesn't have an entry in the database and won't be walked by csync, so create one manually.
-        return fileStatus(rootSyncFileItem());
+        return syncFileItemStatus(rootSyncFileItem());
     }
 
     // The SyncEngine won't notify us at all for CSYNC_FILE_SILENTLY_EXCLUDED
@@ -122,13 +122,13 @@ SyncFileStatus SyncFileStatusTracker::fileStatus(const QString& systemFileName)
 
     SyncFileItem* item = _syncEngine->findSyncItem(fileName);
     if (item) {
-        return fileStatus(*item);
+        return syncFileItemStatus(*item);
     }
 
     // If we're not currently syncing that file, look it up in the database to know if it's shared
     SyncJournalFileRecord rec = _syncEngine->journal()->getFileRecord(fileName);
     if (rec.isValid()) {
-        return fileStatus(rec.toSyncFileItem());
+        return syncFileItemStatus(rec.toSyncFileItem());
     }
     // Must be a new file, wait for the filesystem watcher to trigger a sync
     return SyncFileStatus();
@@ -158,7 +158,7 @@ void SyncFileStatusTracker::slotAboutToPropagate(SyncFileItemVector& items)
         } else if (showWarningInSocketApi(*item)) {
             _syncProblems[item->_file] = SyncFileStatus::StatusWarning;
         }
-        emit fileStatusChanged(getSystemDestination(*item), fileStatus(*item));
+        emit fileStatusChanged(getSystemDestination(*item), syncFileItemStatus(*item));
     }
 
     // Make sure to push any status that might have been resolved indirectly since the last sync
@@ -188,12 +188,12 @@ void SyncFileStatusTracker::slotItemCompleted(const SyncFileItem &item)
         Q_ASSERT(_syncProblems.find(item._file) == _syncProblems.end());
     }
 
-    emit fileStatusChanged(getSystemDestination(item), fileStatus(item));
+    emit fileStatusChanged(getSystemDestination(item), syncFileItemStatus(item));
 }
 
 void SyncFileStatusTracker::slotSyncEngineRunningChanged()
 {
-    emit fileStatusChanged(_syncEngine->localPath(), fileStatus(rootSyncFileItem()));
+    emit fileStatusChanged(_syncEngine->localPath(), syncFileItemStatus(rootSyncFileItem()));
 }
 
 void SyncFileStatusTracker::slotClearDirtyPaths()
@@ -203,7 +203,7 @@ void SyncFileStatusTracker::slotClearDirtyPaths()
     _dirtyPaths.clear();
 }
 
-SyncFileStatus SyncFileStatusTracker::fileStatus(const SyncFileItem& item)
+SyncFileStatus SyncFileStatusTracker::syncFileItemStatus(const SyncFileItem& item)
 {
     // Hack to know if the item was taken from the sync engine (Sync), or from the database (UpToDate)
     // Mark any directory in the SyncEngine's items as syncing, this is currently how we mark parent directories
diff --git a/src/libsync/syncfilestatustracker.h b/src/libsync/syncfilestatustracker.h
index 0145ca4..4158d69 100644
--- a/src/libsync/syncfilestatustracker.h
+++ b/src/libsync/syncfilestatustracker.h
@@ -50,7 +50,7 @@ private slots:
     void slotClearDirtyPaths();
 
 private:
-    SyncFileStatus fileStatus(const SyncFileItem& item);
+    SyncFileStatus syncFileItemStatus(const SyncFileItem& item);
     SyncFileItem rootSyncFileItem();
 
     void invalidateParentPaths(const QString& path);

-- 
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