[Pkg-owncloud-commits] [owncloud-client] 223/332: Merge remote-tracking branch 'origin/1.6' into il

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:03 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 81d786733ddb883f9a700b9e9947dc1dcc31a801
Merge: 336e74b beb9300
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Fri Jul 18 16:59:29 2014 +0200

    Merge remote-tracking branch 'origin/1.6' into il
    
    Conflicts:
    	VERSION.cmake
    	src/mirall/propagator_qnam.cpp
    	src/mirall/propagator_qnam.h

 ChangeLog                          |  9 +++++++
 cmake/modules/NSIS.template.in     |  4 ++--
 src/mirall/owncloudsetupwizard.cpp | 20 ++++++++++++++--
 src/mirall/owncloudsetupwizard.h   |  1 +
 src/mirall/propagator_legacy.cpp   | 49 ++++++++++++++++++++++++++++----------
 src/mirall/propagator_legacy.h     |  6 ++++-
 src/mirall/propagator_qnam.cpp     | 42 ++++++++++++++++++++++++++------
 src/mirall/propagator_qnam.h       |  9 +++----
 8 files changed, 112 insertions(+), 28 deletions(-)

diff --cc src/mirall/propagator_qnam.cpp
index 0417b83,e3a6a91..6c0808c
--- a/src/mirall/propagator_qnam.cpp
+++ b/src/mirall/propagator_qnam.cpp
@@@ -394,26 -394,6 +394,26 @@@ void PropagateUploadFileQNAM::abort(
  
  ///////////////////////////////////////////////////////////////////////////////////////////////////
  
 +// DOES NOT take owncership of the device.
- GETFileJob::GETFileJob(Account* account, const QString& path, QIODevice *device,
++GETFileJob::GETFileJob(Account* account, const QString& path, QFile *device,
 +                    const QMap<QByteArray, QByteArray> &headers, QByteArray expectedEtagForResume,
-                     QObject* parent)
++                    quint64 _resumeStart,  QObject* parent)
 +: AbstractNetworkJob(account, path, parent),
 +  _device(device), _headers(headers), _expectedEtagForResume(expectedEtagForResume),
-   _errorStatus(SyncFileItem::NoStatus)
++  _resumeStart(_resumeStart) , _errorStatus(SyncFileItem::NoStatus)
 +{
 +}
 +
- GETFileJob::GETFileJob(Account* account, const QUrl& url, QIODevice *device,
++GETFileJob::GETFileJob(Account* account, const QUrl& url, QFile *device,
 +                    const QMap<QByteArray, QByteArray> &headers,
 +                    QObject* parent)
 +: AbstractNetworkJob(account, url.toEncoded(), parent),
-   _device(device), _headers(headers),
++  _device(device), _headers(headers), _resumeStart(0),
 +  _errorStatus(SyncFileItem::NoStatus), _directDownloadUrl(url)
 +{
 +}
 +
 +
  void GETFileJob::start() {
      QNetworkRequest req;
      for(QMap<QByteArray, QByteArray>::const_iterator it = _headers.begin(); it != _headers.end(); ++it) {
@@@ -576,22 -570,9 +604,22 @@@ void PropagateDownloadFileQNAM::start(
          _startSize = done;
      }
  
 -    _job = new GETFileJob(AccountManager::instance()->account(),
 -                          _propagator->_remoteFolder + _item._file,
 -                          &_tmpFile, headers, expectedEtagForResume, _startSize);
 +    if (_item._directDownloadUrl.isEmpty()) {
 +        // Normal job, download from oC instance
 +        _job = new GETFileJob(AccountManager::instance()->account(),
-                               _propagator->_remoteFolder + _item._file,
-                               &_tmpFile, headers, expectedEtagForResume);
++                            _propagator->_remoteFolder + _item._file,
++                            &_tmpFile, headers, expectedEtagForResume, _startSize);
 +    } else {
 +        // We were provided a direct URL, use that one
 +        if (!_item._directDownloadCookies.isEmpty()) {
 +            headers["Cookie"] = _item._directDownloadCookies.toUtf8();
 +        }
 +        QUrl url = QUrl::fromUserInput(_item._directDownloadUrl);
 +        _job = new GETFileJob(AccountManager::instance()->account(),
 +                              url,
 +                              &_tmpFile, headers);
 +        qDebug() << Q_FUNC_INFO << "directDownloadUrl given for " << _item._file << _item._directDownloadUrl;
 +    }
      _job->setTimeout(_propagator->httpTimeout() * 1000);
      connect(_job, SIGNAL(finishedSignal()), this, SLOT(slotGetFinished()));
      connect(_job, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(slotDownloadProgress(qint64,qint64)));
diff --cc src/mirall/propagator_qnam.h
index 9e41ead,7c92b8d..3d87e22
--- a/src/mirall/propagator_qnam.h
+++ b/src/mirall/propagator_qnam.h
@@@ -109,19 -109,17 +109,20 @@@ class GETFileJob : public AbstractNetwo
      QMap<QByteArray, QByteArray> _headers;
      QString _errorString;
      QByteArray _expectedEtagForResume;
+     quint64 _resumeStart;
      SyncFileItem::Status _errorStatus;
 +    QUrl _directDownloadUrl;
 +    QByteArray _etag;
  public:
  
      // DOES NOT take owncership of the device.
-     explicit GETFileJob(Account* account, const QString& path, QIODevice *device,
+     explicit GETFileJob(Account* account, const QString& path, QFile *device,
                          const QMap<QByteArray, QByteArray> &headers, QByteArray expectedEtagForResume,
-                         QObject* parent = 0);
 -                        quint64 resumeStart, QObject* parent = 0)
 -    : AbstractNetworkJob(account, path, parent),
 -      _device(device), _headers(headers), _expectedEtagForResume(expectedEtagForResume),
 -      _resumeStart(resumeStart), _errorStatus(SyncFileItem::NoStatus) {}
++                        quint64 resumeStart, QObject* parent = 0);
 +    // For directDownloadUrl:
-     explicit GETFileJob(Account* account, const QUrl& url, QIODevice *device,
++    explicit GETFileJob(Account* account, const QUrl& url, QFile *device,
 +                        const QMap<QByteArray, QByteArray> &headers,
 +                        QObject* parent = 0);
  
      virtual void start();
      virtual bool finished() {

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