Qt-interest Archive, February 2008
QHttp does not close output QIODevice
Message 1 in thread
Dear all,
I have a QHttp doing get requests, connected to a subclassed QIODevice
object
After my app is launched, the first request works well and is written
correctly to the QIODevice. However the next requests fail.
I remarked that QHttp calls QIODevice::open(), but not QIODevice::close().
If I manually call QIODevice::close() when QHttp::requestFinished is
triggered, everything works again.
So:
- Do I have to open the device for QHttp (he seems to do it if the device
is not opened)?
- Do I have to close it at requestFinished() (he seems never to do it) ?
And another question : the QIODevice::bytesWritten(quint64) signal is
emitted when data was succesfully written to the device. Do I have to call
it from my overloaded writeData() , or is it done by write() implementation
?
Thanks,
Etienne