[Pkg-owncloud-commits] [owncloud-client] 201/332: Merge branch 'il'
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:00 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 2fdb3cfdfb13e75221c83f2c3472c7834075702e
Merge: e5191ac 8961e61
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed Jul 16 10:49:16 2014 +0200
Merge branch 'il'
Conflicts:
src/mirall/folder.cpp
src/mirall/propagator_qnam.cpp
src/creds/httpcredentials.cpp | 48 ++++++++++++++++++++++--------
src/creds/httpcredentials.h | 1 +
src/creds/shibboleth/shibbolethwebview.cpp | 14 +++++++--
src/creds/shibboleth/shibbolethwebview.h | 1 +
src/mirall/folder.cpp | 5 +---
src/mirall/propagator_qnam.cpp | 27 +++++++++++++----
src/mirall/propagator_qnam.h | 2 +-
src/mirall/protocolwidget.cpp | 7 +++++
src/mirall/syncengine.cpp | 26 ++++++++--------
src/mirall/syncengine.h | 3 +-
src/mirall/theme.cpp | 3 +-
11 files changed, 98 insertions(+), 39 deletions(-)
diff --cc src/mirall/folder.cpp
index 5f14ae9,ab00164..7e78fde
--- a/src/mirall/folder.cpp
+++ b/src/mirall/folder.cpp
@@@ -700,23 -715,10 +700,20 @@@ void Folder::slotTransmissionProgress(c
ProgressDispatcher::instance()->setProgressInfo(alias(), pi);
}
+// a job is completed: count the errors and forward to the ProgressDispatcher
+void Folder::slotJobCompleted(const SyncFileItem &item)
+{
+ if (Progress::isWarningKind(item._status)) {
+ // Count all error conditions.
+ _syncResult.setWarnCount(_syncResult.warnCount()+1);
+ }
+ emit ProgressDispatcher::instance()->jobCompleted(alias(), item);
+}
+
+
void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction direction, bool *cancel)
{
- QString msg = direction == SyncFileItem::Down ?
- tr("This sync would remove all the files in the local sync folder '%1'.\n"
- "If you or your administrator have reset your account on the server, choose "
- "\"Keep files\". If you want your data to be removed, choose \"Remove all files\".") :
-#ifndef TOKEN_AUTH_ONLY
+ QString msg =
tr("This sync would remove all the files in the sync folder '%1'.\n"
"This might be because the folder was silently reconfigured, or that all "
"the file were manually removed.\n"
diff --cc src/mirall/propagator_qnam.cpp
index 475a5b9,0417b83..f0d10ab
--- a/src/mirall/propagator_qnam.cpp
+++ b/src/mirall/propagator_qnam.cpp
@@@ -126,15 -126,21 +126,21 @@@ public
ChunkDevice(QIODevice *file, qint64 start, qint64 size)
: QIODevice(file), _file(file), _read(0), _size(size), _start(start) {
- _file->seek(start);
+ _file = QPointer<QIODevice>(file);
+ _file.data()->seek(start);
}
- virtual qint64 writeData(const char* , qint64 ) {
+ virtual qint64 writeData(const char* , qint64 ) Q_DECL_OVERRIDE {
Q_ASSERT(!"write to read only device");
return 0;
}
- virtual qint64 readData(char* data, qint64 maxlen) {
+ virtual qint64 readData(char* data, qint64 maxlen) Q_DECL_OVERRIDE {
+ if (_file.isNull()) {
+ qDebug() << Q_FUNC_INFO << "Upload file object deleted during upload";
+ close();
+ return -1;
+ }
maxlen = qMin(maxlen, chunkSize() - _read);
if (maxlen == 0)
return 0;
@@@ -145,11 -151,15 +151,15 @@@
return ret;
}
- virtual bool atEnd() const {
+ virtual bool atEnd() const Q_DECL_OVERRIDE {
- return _read >= chunkSize() || _file->atEnd();
+ if (_file.isNull()) {
+ qDebug() << Q_FUNC_INFO << "Upload file object deleted during upload";
+ return true;
+ }
+ return _read >= chunkSize() || _file.data()->atEnd();
}
- virtual qint64 size() const{
+ virtual qint64 size() const Q_DECL_OVERRIDE{
return _size;
}
@@@ -163,9 -173,14 +173,14 @@@
return false;
}
- virtual bool seek ( qint64 pos ) {
+ virtual bool seek ( qint64 pos ) Q_DECL_OVERRIDE {
+ if (_file.isNull()) {
+ qDebug() << Q_FUNC_INFO << "Upload file object deleted during upload";
+ close();
+ return false;
+ }
_read = pos;
- return _file->seek(pos + _start);
+ return _file.data()->seek(pos + _start);
}
};
diff --cc src/mirall/propagator_qnam.h
index fee64cf,9e41ead..0db5b1d
--- a/src/mirall/propagator_qnam.h
+++ b/src/mirall/propagator_qnam.h
@@@ -97,9 -97,9 +97,9 @@@ public
private slots:
void slotPutFinished();
void slotUploadProgress(qint64,qint64);
- void abort();
+ void abort() Q_DECL_OVERRIDE;
void startNextChunk();
- void finalize(const Mirall::SyncFileItem&);
+ void finalize(const SyncFileItem&);
};
--
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