Op 9-8-2012 1:02, Justin Ferguson schreef:
> Is there a clean manner for using the QNAMs finished(qnetworkreply*)
> signal and then determining whose reply it is and calling its handler?
> Everything I can think of seems sorta clunky and error prone; or is
> there a synchronous QNAM-like class? Having to reimplement the HTTP
> code in a qtcpsocket seems counter-productive and qhttp is apparently
> deprecated.
>
At the moment you do the request, you already get a pointer to the reply 
object. You can just keep that pointer around, or you can add some kind 
identifier to the reply object by using the fact that QNetworkReply is a 
QObject, and QObject has setProperty with dynamic properties. That makes 
it easy to set a marker on the reply object, that you can test for when 
you receive a pointer to the object again from the finished() signal.

André

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to