From 56166deb76f56dcc12502bbbadf8a5d10a12c0a2 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 25 Jul 2018 12:21:29 +0200 Subject: Added test that checks what happens when there is an error in the remote discovery (Many of the expected error string are left empty because the current error message is not insterresting --- test/syncenginetestutils.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/syncenginetestutils.h') diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h index 536521b70..59bccc12a 100644 --- a/test/syncenginetestutils.h +++ b/test/syncenginetestutils.h @@ -773,7 +773,14 @@ public: open(QIODevice::ReadOnly); } - void abort() override {} + void abort() override { + // Follow more or less the implementation of QNetworkReplyImpl::abort + close(); + setError(OperationCanceledError, tr("Operation canceled")); + emit error(OperationCanceledError); + setFinished(true); + emit finished(); + } qint64 readData(char *, qint64) override { return 0; } }; -- cgit v1.2.3