Logo Search packages:      
Sourcecode: qt4-x11 version File versions

bool QIODeviceDelegate::waitForBytesWritten ( int  msecs  )  [virtual]

For buffered devices, this function waits until a payload of buffered written data has been written to the device and the bytesWritten() signal has been emitted, or until msecs milliseconds have passed. If msecs is -1, this function will not time out. For unbuffered devices, it returns immediately.

Returns true if a payload of data was written to the device; otherwise returns false (i.e. if the operation timed out, or if an error occurred).

This function can operate without an event loop. It is useful when writing non-GUI applications and when performing I/O operations in a non-GUI thread.

If called from within a slot connected to the bytesWritten() signal, bytesWritten() will not be reemitted.

Reimplement this function to provide a blocking API for a custom device. The default implementation does nothing, and returns false.

Calling this function from the main (GUI) thread might cause your user interface to freeze.
See also:

Reimplemented from QIODevice.

Definition at line 152 of file qiodevicedelegate.cpp.

References QIODevice::waitForBytesWritten().

    return m_source->waitForBytesWritten(msecs);

Generated by  Doxygen 1.6.0   Back to index