[Pkg-owncloud-commits] [owncloud-client] 320/498: Sync: Rename ignored file member to _serverHasIgnoredFiles.

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:02 UTC 2015


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 7b8dc9777ed35bc5132c3ccac7bec55dc32daf6a
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Mon Jul 13 15:41:11 2015 +0200

    Sync: Rename ignored file member to _serverHasIgnoredFiles.
    
    This should make it more obvious that only the server state about
    ignored files is stored in the db.
---
 src/libsync/syncfileitem.h            | 4 ++--
 src/libsync/syncjournaldb.cpp         | 6 +++---
 src/libsync/syncjournalfilerecord.cpp | 4 ++--
 src/libsync/syncjournalfilerecord.h   | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/libsync/syncfileitem.h b/src/libsync/syncfileitem.h
index 8c2b933..80ba367 100644
--- a/src/libsync/syncfileitem.h
+++ b/src/libsync/syncfileitem.h
@@ -64,7 +64,7 @@ public:
     };
 
     SyncFileItem() : _type(UnknownType),  _direction(None), _isDirectory(false),
-        _hasIgnoredFiles(false), _hasBlacklistEntry(false), _status(NoStatus),
+         _serverHasIgnoredFiles(false), _hasBlacklistEntry(false), _status(NoStatus),
         _isRestoration(false), _should_update_metadata(false),
         _httpErrorCode(0), _requestDuration(0), _affectedItems(1),
         _instruction(CSYNC_INSTRUCTION_NONE), _modtime(0), _size(0), _inode(0)
@@ -130,7 +130,7 @@ public:
     Type _type BITFIELD(3);
     Direction _direction BITFIELD(2);
     bool _isDirectory BITFIELD(1);
-    bool _hasIgnoredFiles BITFIELD(1);
+    bool _serverHasIgnoredFiles BITFIELD(1);
 
     /// Whether there's an entry in the blacklist table.
     /// Note: that entry may have retries left, so this can be true
diff --git a/src/libsync/syncjournaldb.cpp b/src/libsync/syncjournaldb.cpp
index 4801c86..e9dd5a5 100644
--- a/src/libsync/syncjournaldb.cpp
+++ b/src/libsync/syncjournaldb.cpp
@@ -640,7 +640,7 @@ bool SyncJournalDb::setFileRecord( const SyncJournalFileRecord& _record )
         _setFileRecordQuery->bindValue(11, fileId );
         _setFileRecordQuery->bindValue(12, remotePerm );
         _setFileRecordQuery->bindValue(13, record._fileSize );
-        _setFileRecordQuery->bindValue(14, record._hasIgnoredFiles ? 1:0);
+        _setFileRecordQuery->bindValue(14, record._serverHasIgnoredFiles ? 1:0);
 
         if( !_setFileRecordQuery->exec() ) {
             qWarning() << "Error SQL statement setFileRecord: " << _setFileRecordQuery->lastQuery() <<  " :"
@@ -651,7 +651,7 @@ bool SyncJournalDb::setFileRecord( const SyncJournalFileRecord& _record )
         qDebug() <<  _setFileRecordQuery->lastQuery() << phash << plen << record._path << record._inode
                  << record._mode
                  << QString::number(Utility::qDateTimeToTime_t(record._modtime)) << QString::number(record._type)
-                 << record._etag << record._fileId << record._remotePerm << record._fileSize << (record._hasIgnoredFiles ? 1:0);
+                 << record._etag << record._fileId << record._remotePerm << record._fileSize << (record._serverHasIgnoredFiles ? 1:0);
 
         _setFileRecordQuery->reset();
         return true;
@@ -730,7 +730,7 @@ SyncJournalFileRecord SyncJournalDb::getFileRecord( const QString& filename )
             rec._fileId  = _getFileRecordQuery->baValue(8);
             rec._remotePerm = _getFileRecordQuery->baValue(9);
             rec._fileSize   = _getFileRecordQuery->int64Value(10);
-            rec._hasIgnoredFiles = _getFileRecordQuery->intValue(11) > 0 ? true : false;
+            rec._serverHasIgnoredFiles = (_getFileRecordQuery->intValue(11) > 0);
         } else {
             QString err = _getFileRecordQuery->error();
             qDebug() << "No journal entry found for " << filename;
diff --git a/src/libsync/syncjournalfilerecord.cpp b/src/libsync/syncjournalfilerecord.cpp
index 8bca298..cdc808a 100644
--- a/src/libsync/syncjournalfilerecord.cpp
+++ b/src/libsync/syncjournalfilerecord.cpp
@@ -28,14 +28,14 @@
 namespace OCC {
 
 SyncJournalFileRecord::SyncJournalFileRecord()
-    :_inode(0), _type(0), _fileSize(0), _mode(0), _hasIgnoredFiles(false)
+    :_inode(0), _type(0), _fileSize(0), _mode(0), _serverHasIgnoredFiles(false)
 {
 }
 
 SyncJournalFileRecord::SyncJournalFileRecord(const SyncFileItem &item, const QString &localFileName)
     : _path(item._file), _modtime(Utility::qDateTimeFromTime_t(item._modtime)),
       _type(item._type), _etag(item._etag), _fileId(item._fileId), _fileSize(item._size),
-      _remotePerm(item._remotePerm), _mode(0), _hasIgnoredFiles(item._hasIgnoredFiles)
+      _remotePerm(item._remotePerm), _mode(0), _serverHasIgnoredFiles(item._serverHasIgnoredFiles)
 {
     // use the "old" inode coming with the item for the case where the
     // filesystem stat fails. That can happen if the the file was removed
diff --git a/src/libsync/syncjournalfilerecord.h b/src/libsync/syncjournalfilerecord.h
index b18a2ab..f3546c5 100644
--- a/src/libsync/syncjournalfilerecord.h
+++ b/src/libsync/syncjournalfilerecord.h
@@ -46,7 +46,7 @@ public:
     qint64     _fileSize;
     QByteArray _remotePerm;
     int        _mode;
-    bool       _hasIgnoredFiles;
+    bool       _serverHasIgnoredFiles;
 };
 
 bool OWNCLOUDSYNC_EXPORT

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