This commit is contained in:
Klaas Freitag 2013-11-20 14:02:19 +01:00
Родитель 5900b1ad25
Коммит 2767e7084a
2 изменённых файлов: 6 добавлений и 11 удалений

Просмотреть файл

@ -98,13 +98,7 @@ private slots:
class PropagateItemJob : public PropagatorJob {
Q_OBJECT
protected:
SyncFileItem _item;
void done(SyncFileItem::Status status, const QString &errorString = QString()) {
_item._errorString = errorString;
_item._status = status;
emit completed(_item);
emit finished(status);
}
void done(SyncFileItem::Status status, const QString &errorString = QString());
void updateMTimeAndETag(const char *uri, time_t);
@ -119,10 +113,11 @@ protected:
* to be called by the progress callback and will wait the amount of time needed.
*/
void limitBandwidth(qint64 progress, qint64 limit);
QElapsedTimer _lastTime;
qint64 _lastProgress;
QElapsedTimer _lastTime;
qint64 _lastProgress;
int _httpStatusCode;
SyncFileItem _item;
public:
PropagateItemJob(OwncloudPropagator* propagator, const SyncFileItem &item)

Просмотреть файл

@ -49,7 +49,7 @@ public:
FileIgnored ///< The file is in the ignored list
};
SyncFileItem() : _status(NoStatus) {}
SyncFileItem() : _should_update_etag(false), _blacklistedInDb(false), _status(NoStatus), _httpErrorCode(0) {}
friend bool operator==(const SyncFileItem& item1, const SyncFileItem& item2) {
return item1._file == item2._file;
@ -82,13 +82,13 @@ public:
QByteArray _etag;
quint64 _size;
bool _should_update_etag;
QString _fileId;
bool _blacklistedInDb;
// Variables usefull to report to the user
Status _status;
QString _errorString; // Contains a string only in case of error
int _httpErrorCode;
QString _fileId;
};