PropagateUpload: Remove the Qt workaround against data corruption
authorOlivier Goffart <ogoffart@woboq.com>
Sat, 15 Jul 2017 07:36:24 +0000 (09:36 +0200)
committerOlivier Goffart <olivier@woboq.com>
Mon, 17 Jul 2017 08:12:48 +0000 (10:12 +0200)
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.

src/libsync/propagateupload.cpp
src/libsync/propagateupload.h

index 1cd0266277e0747559d5c6876ce92be6d99a60db..3032bb65faf8a831f4361d721627310b41c9db5a 100644 (file)
 #include <cmath>
 #include <cstring>
 
-#if QT_VERSION < QT_VERSION_CHECK(5, 4, 2)
-namespace {
-const char owncloudShouldSoftCancelPropertyName[] = "owncloud-should-soft-cancel";
-}
-#endif
-
 namespace OCC {
 
 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(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();
     AbstractNetworkJob::start();
 }
 
-#if QT_VERSION < QT_VERSION_CHECK(5, 4, 2)
-void PUTFileJob::slotSoftAbort()
-{
-    reply()->setProperty(owncloudShouldSoftCancelPropertyName, true);
-    reply()->abort();
-}
-#endif
-
 void PollJob::start()
 {
     setTimeout(120 * 1000);
index 8d6b1d0b6302176c0db1bdd9e8001ee9697df454..dd75509254dc24627f8b67ff36622f45060bb1ac 100644 (file)
@@ -154,10 +154,6 @@ signals:
     void finishedSignal();
     void uploadProgress(qint64, qint64);
 
-private slots:
-#if QT_VERSION < 0x050402
-    void slotSoftAbort();
-#endif
 };
 
 /**