X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fsignalproxy.h;h=be2c9ffd95343d45c04952e210c23b1327876ab3;hp=b787c2ad5d03e01029925abd32dfbe9f06324890;hb=e008cd12ef319c4b5f9fe5a8cc1524829551771d;hpb=4b45582f5d766e7324fe6d2abd260548ef0b9584 diff --git a/src/common/signalproxy.h b/src/common/signalproxy.h index b787c2ad..be2c9ffd 100644 --- a/src/common/signalproxy.h +++ b/src/common/signalproxy.h @@ -72,8 +72,18 @@ public: void detachObject(QObject *obj); void detachSignals(QObject *sender); void detachSlots(QObject *receiver); - + + //! Writes a QVariant to a device. + /** The data item is prefixed with the resulting blocksize, + * so the corresponding function readDataFromDevice() can check if enough data is available + * at the device to reread the item. + */ static void writeDataToDevice(QIODevice *dev, const QVariant &item); + + //! Reads a data item from a device that has been written by writeDataToDevice(). + /** If not enough data bytes are available, the function returns false and the QVariant reference + * remains untouched. + */ static bool readDataFromDevice(QIODevice *dev, quint32 &blockSize, QVariant &item); static QString methodBaseName(const QMetaMethod &method);