Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9
-
None
-
Foundation PM Staging
Description
Every QHttpNetworkConnection(Private) contains a QNetworkConnectionMonitor. It is supposed to alert the connection about changes in network connectivity:
if (QNetworkConnectionMonitor::isEnabled()) { connect(&d->connectionMonitor, &QNetworkConnectionMonitor::reachabilityChanged, this, &QHttpNetworkConnection::onlineStateChanged, Qt::QueuedConnection); }
and then finish the connection
void QHttpNetworkConnection::onlineStateChanged(bool isOnline) { ... for (int i = 0; i < d->activeChannelCount; i++) { auto &channel = d->channels[i]; channel.emitFinishedWithError(QNetworkReply::TemporaryNetworkFailureError, "Temporary network failure."); channel.close(); } ... }
However, QNetworkConnectionMonitor is not enabled on all platforms. From an internal discussion it became clear that
it is using deprecated API on Mac/iOs(it was updated, I just don't have a great memory)- it is not very elegantly implemented on Windows because of missing OS APIs
- it is not existing on Linux
For the sake of a clean code we should revisit this class and port it away from deprecated APIs, find elegant solutions for all platforms or consider removing or replacing it alltogether.
The scope of this ticket is to make a decision on whether this class should refurbished and implemented on all platforms, removed without replacement or replaced by something new.
Attachments
Issue Links
- resulted from
-
QTBUG-136048 Analyse and resolve side effects resulting in drops of connectivity in Qt Quick apps when network connections change
-
- Reported
-