[Qt-interest] QNetworkAccessManager and a QHash of QNetworkReply pointers
Andre Somers
andre at familiesomers.nl
Mon Sep 6 10:18:35 CEST 2010
Op 6-9-2010 9:33, Juha Ruotsalainen schreef:
> Hi there,
>
> My Friday was spent tracking down this mysterious bug. At least mysterious to me...
>
> Our application uses a QNetworkAccessManager (NAM) to perform all net access. The QNetworkReply pointers that NAM's get routine returns are stored into a QHash where reply pointers are keys into the hash and values consist of a QPair<bool, some_enum_type>.
In addition to Mandeeps reply, I am just wondering what the point of the
construction above is. Why keep a hash with a little bit of data on your
requests around at all? NAM inherits QObject. That means that it also
has dynamic property capabilities. Why not store the additional data you
want to keep with the NAM with the NAM itself? That also frees you from
having to maintain a hash with additional data at all.
André
More information about the Qt-interest-old
mailing list