From 31e400973705e6713e15325c6cdafcc4faead034 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 9 Mar 2015 15:52:52 +0100 Subject: [PATCH] Propagator: Use QBA for responseTimestamp instead of QString --- src/gui/syncrunfilelog.cpp | 2 +- src/libsync/networkjobs.cpp | 4 ++-- src/libsync/networkjobs.h | 4 ++-- src/libsync/syncfileitem.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/syncrunfilelog.cpp b/src/gui/syncrunfilelog.cpp index 4d6578744..607ca5662 100644 --- a/src/gui/syncrunfilelog.cpp +++ b/src/gui/syncrunfilelog.cpp @@ -129,7 +129,7 @@ void SyncRunFileLog::logItem( const SyncFileItem& item ) if( item._direction == SyncFileItem::None ) { return; } - QString ts = item._responseTimeStamp; + QString ts = QString::fromAscii(item._responseTimeStamp); if( ts.length() > 6 ) { QRegExp rx("(\\d\\d:\\d\\d:\\d\\d)"); if( ts.contains(rx) ) { diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp index 49bbc10b3..afc9fac97 100644 --- a/src/libsync/networkjobs.cpp +++ b/src/libsync/networkjobs.cpp @@ -167,7 +167,7 @@ void AbstractNetworkJob::slotFinished() } // get the Date timestamp from reply - _responseTimestamp = QString::fromAscii(_reply->rawHeader("Date")); + _responseTimestamp = _reply->rawHeader("Date"); _duration = _durationTimer.elapsed(); if (_followRedirects) { @@ -207,7 +207,7 @@ quint64 AbstractNetworkJob::duration() return _duration; } -QString AbstractNetworkJob::responseTimestamp() +QByteArray AbstractNetworkJob::responseTimestamp() { return _responseTimestamp; } diff --git a/src/libsync/networkjobs.h b/src/libsync/networkjobs.h index ff75f5b14..e0824978c 100644 --- a/src/libsync/networkjobs.h +++ b/src/libsync/networkjobs.h @@ -70,7 +70,7 @@ public: void setIgnoreCredentialFailure(bool ignore); bool ignoreCredentialFailure() const { return _ignoreCredentialFailure; } - QString responseTimestamp(); + QByteArray responseTimestamp(); quint64 duration(); public slots: @@ -94,7 +94,7 @@ protected: int maxRedirects() const { return 10; } virtual bool finished() = 0; - QString _responseTimestamp; + QByteArray _responseTimestamp; QElapsedTimer _durationTimer; quint64 _duration; bool _timedout; // set to true when the timeout slot is recieved diff --git a/src/libsync/syncfileitem.h b/src/libsync/syncfileitem.h index d18963981..cb66b3004 100644 --- a/src/libsync/syncfileitem.h +++ b/src/libsync/syncfileitem.h @@ -140,7 +140,7 @@ public: Status _status; QString _errorString; // Contains a string only in case of error int _httpErrorCode; - QString _responseTimeStamp; + QByteArray _responseTimeStamp; quint64 _requestDuration; bool _isRestoration; // The original operation was forbidden, and this is a restoration int _affectedItems; // the number of affected items by the operation on this item.