[Pkg-owncloud-commits] [owncloud-client] 229/333: Change data type for fileId to QByteArray.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:57 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 6e6f647c639a57797a374379dd8134ffe7d2132f
Author: Klaas Freitag <freitag at owncloud.com>
Date: Mon Mar 24 12:21:44 2014 +0100
Change data type for fileId to QByteArray.
---
src/mirall/propagator_legacy.cpp | 10 +++++-----
src/mirall/propagator_qnam.cpp | 2 +-
src/mirall/syncengine.cpp | 2 +-
src/mirall/syncfileitem.h | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/mirall/propagator_legacy.cpp b/src/mirall/propagator_legacy.cpp
index 0884c9b..ad7f10b 100644
--- a/src/mirall/propagator_legacy.cpp
+++ b/src/mirall/propagator_legacy.cpp
@@ -122,7 +122,7 @@ void PropagateUploadFileLegacy::start()
}
// the file id should only be empty for new files up- or downloaded
- QString fid = QString::fromUtf8( hbf_transfer_file_id( trans.data() ));
+ QByteArray fid = hbf_transfer_file_id( trans.data() );
if( !fid.isEmpty() ) {
if( !_item._fileId.isEmpty() && _item._fileId != fid ) {
qDebug() << "WARN: File ID changed!" << _item._fileId << fid;
@@ -246,12 +246,12 @@ void PropagateUploadFileLegacy::notify_status_cb(void* userdata, ne_session_stat
-static QString parseFileId(ne_request *req) {
- QString fileId;
+static QByteArray parseFileId(ne_request *req) {
+ QByteArray fileId;
const char *header = ne_get_response_header(req, "OC-FileId");
if( header ) {
- fileId = QString::fromUtf8(header);
+ fileId = header;
}
return fileId;
}
@@ -284,7 +284,7 @@ bool PropagateNeonJob::updateMTimeAndETag(const char* uri, time_t mtime)
return false;
} else {
_item._etag = parseEtag(ne_get_response_header(req.data(), "etag"));
- QString fid = parseFileId(req.data());
+ QByteArray fid = parseFileId(req.data());
if( _item._fileId.isEmpty() ) {
_item._fileId = fid;
qDebug() << "FileID was empty, set it to " << _item._fileId;
diff --git a/src/mirall/propagator_qnam.cpp b/src/mirall/propagator_qnam.cpp
index 8126b66..4c44eeb 100644
--- a/src/mirall/propagator_qnam.cpp
+++ b/src/mirall/propagator_qnam.cpp
@@ -240,7 +240,7 @@ void PropagateUploadFileQNAM::slotPutFinished()
_propagator->_activeJobs--;
// the file id should only be empty for new files up- or downloaded
- QString fid = QString::fromUtf8(job->reply()->rawHeader("OC-FileID"));
+ QByteArray fid = job->reply()->rawHeader("OC-FileID");
if( !fid.isEmpty() ) {
if( !_item._fileId.isEmpty() && _item._fileId != fid ) {
qDebug() << "WARN: File ID changed!" << _item._fileId << fid;
diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index 8ae199e..97326a2 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -263,7 +263,7 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
item._originalFile = item._file;
item._instruction = file->instruction;
item._direction = SyncFileItem::None;
- item._fileId = QString::fromUtf8(file->file_id);
+ item._fileId = file->file_id;
// record the seen files to be able to clean the journal later
_seenFiles[item._file] = QString();
diff --git a/src/mirall/syncfileitem.h b/src/mirall/syncfileitem.h
index 7384910..64db255 100644
--- a/src/mirall/syncfileitem.h
+++ b/src/mirall/syncfileitem.h
@@ -82,8 +82,8 @@ public:
QByteArray _etag;
quint64 _size;
bool _should_update_etag;
- QString _fileId;
- bool _blacklistedInDb;
+ QByteArray _fileId;
+ bool _blacklistedInDb;
// Variables usefull to report to the user
Status _status;
--
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