While trying to implement custom protocol handlers for QNetworkAccessManager, I spotted this:
QNetworkReply::isFinished() is non-virtual, and is implemented to return d_func()->isFinished()
Since d_func isn't accessible from outside Qt sources, the custom protocol handlers can't overload QNetworkReplyPrivate::isFinished(), therefore isFinished() always returns false (as per its definition in the base class in qnetworkreply_p.h).
Because of this, some functions (e.g. a synchronous download along the lines of
QNetworkReply *r=nam->get(whatever);
while(!r->isFinished())
QCoreApplication::instance()->processEvents();
// do something)
work fine for the builtin handlers, but there's no chance for a handler implemented outside of Qt to work correctly in this context.
- is replaced by
-
QTBUG-11737 QNetworkReply subclasses: Make possible to override isFinished()
-
- Closed
-