summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplyfileimpl.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2023-06-09 17:30:54 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2023-06-09 17:30:54 +0300
commitda6e958319e95fe564d3b30c931492dd666bfaff (patch)
tree16ac1556a573daeba5c9c4b795f86aa166ffe467 /src/network/access/qnetworkreplyfileimpl.cpp
parent29400a683f96867133b28299c0d0bd6bcf40df35 (diff)
parenta96fc76fa78f3500266b3a34016f9e1bd29b319c (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.11' into tqtc/lts-5.15-opensourcev5.15.11-lts-lgpl
Diffstat (limited to 'src/network/access/qnetworkreplyfileimpl.cpp')
-rw-r--r--src/network/access/qnetworkreplyfileimpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qnetworkreplyfileimpl.cpp b/src/network/access/qnetworkreplyfileimpl.cpp
index b6be93147a..6e69b4c4d3 100644
--- a/src/network/access/qnetworkreplyfileimpl.cpp
+++ b/src/network/access/qnetworkreplyfileimpl.cpp
@@ -89,9 +89,10 @@ QNetworkReplyFileImpl::QNetworkReplyFileImpl(QNetworkAccessManager *manager, con
// we handle only local files
QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Request for opening non-local file %1").arg(url.toString());
setError(QNetworkReply::ProtocolInvalidOperationError, msg);
+ setFinished(true); // We're finished, will emit finished() after ctor is done.
QMetaObject::invokeMethod(this, "errorOccurred", Qt::QueuedConnection,
Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ProtocolInvalidOperationError));
- fileOpenFinished(false);
+ QMetaObject::invokeMethod(this, [this](){ fileOpenFinished(false); }, Qt::QueuedConnection);
return;
}
#endif