Use queued connection for "other replies"
so the handler is not called while looping through the list of these replies to abort them. The handler must not be called in that situation because it mutates the list.
This commit is contained in:
parent
11834f89d4
commit
5227a7961e
|
@ -976,7 +976,7 @@ void SyncthingConnection::requestDirStatus(const QString &dirId)
|
|||
auto *const reply = requestData(QStringLiteral("db/status"), query);
|
||||
reply->setProperty("dirId", dirId);
|
||||
m_otherReplies << reply;
|
||||
QObject::connect(reply, &QNetworkReply::finished, this, &SyncthingConnection::readDirStatus);
|
||||
QObject::connect(reply, &QNetworkReply::finished, this, &SyncthingConnection::readDirStatus, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -1094,7 +1094,7 @@ void SyncthingConnection::requestCompletion(const QString &devId, const QString
|
|||
reply->setProperty("devId", devId);
|
||||
reply->setProperty("dirId", dirId);
|
||||
m_otherReplies << reply;
|
||||
QObject::connect(reply, &QNetworkReply::finished, this, &SyncthingConnection::readCompletion);
|
||||
QObject::connect(reply, &QNetworkReply::finished, this, &SyncthingConnection::readCompletion, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
/// \cond
|
||||
|
|
Loading…
Reference in New Issue