зеркало из https://github.com/nextcloud/desktop.git
PropagateUpload: Remove the Qt workaround against data corruption
This was only for Qt <= 5.4, which we don't really support anymore. And even then, the data corruption is happens very seldomly anyway.
This commit is contained in:
Родитель
5e9d6f1cbd
Коммит
3cea550d08
|
@ -35,12 +35,6 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 2)
|
|
||||||
namespace {
|
|
||||||
const char owncloudShouldSoftCancelPropertyName[] = "owncloud-should-soft-cancel";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace OCC {
|
namespace OCC {
|
||||||
|
|
||||||
Q_LOGGING_CATEGORY(lcPutJob, "sync.networkjob.put", QtInfoMsg)
|
Q_LOGGING_CATEGORY(lcPutJob, "sync.networkjob.put", QtInfoMsg)
|
||||||
|
@ -93,27 +87,10 @@ void PUTFileJob::start()
|
||||||
|
|
||||||
connect(reply(), SIGNAL(uploadProgress(qint64, qint64)), this, SIGNAL(uploadProgress(qint64, qint64)));
|
connect(reply(), SIGNAL(uploadProgress(qint64, qint64)), this, SIGNAL(uploadProgress(qint64, qint64)));
|
||||||
connect(this, SIGNAL(networkActivity()), account().data(), SIGNAL(propagatorNetworkActivity()));
|
connect(this, SIGNAL(networkActivity()), account().data(), SIGNAL(propagatorNetworkActivity()));
|
||||||
|
|
||||||
// For Qt versions not including https://codereview.qt-project.org/110150
|
|
||||||
// Also do the runtime check if compiled with an old Qt but running with fixed one.
|
|
||||||
// (workaround disabled on windows and mac because the binaries we ship have patched qt)
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 2) && !defined Q_OS_WIN && !defined Q_OS_MAC
|
|
||||||
if (QLatin1String(qVersion()) < QLatin1String("5.4.2"))
|
|
||||||
connect(_device, SIGNAL(wasReset()), this, SLOT(slotSoftAbort()));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_requestTimer.start();
|
_requestTimer.start();
|
||||||
AbstractNetworkJob::start();
|
AbstractNetworkJob::start();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 2)
|
|
||||||
void PUTFileJob::slotSoftAbort()
|
|
||||||
{
|
|
||||||
reply()->setProperty(owncloudShouldSoftCancelPropertyName, true);
|
|
||||||
reply()->abort();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void PollJob::start()
|
void PollJob::start()
|
||||||
{
|
{
|
||||||
setTimeout(120 * 1000);
|
setTimeout(120 * 1000);
|
||||||
|
|
|
@ -154,10 +154,6 @@ signals:
|
||||||
void finishedSignal();
|
void finishedSignal();
|
||||||
void uploadProgress(qint64, qint64);
|
void uploadProgress(qint64, qint64);
|
||||||
|
|
||||||
private slots:
|
|
||||||
#if QT_VERSION < 0x050402
|
|
||||||
void slotSoftAbort();
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Загрузка…
Ссылка в новой задаче