Initialize the stream status to OK in the QIODevice constructor.
Without this, the status is an an uninitialize state, which causes the precondition checks to fail on writes.
This commit is contained in:
1 parent
9d017281fe
commit
bec0d71cc1
1 file changed
+1
-1
@@ -28,7 +28,7 @@ MsgPackStream::MsgPackStream() :
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
MsgPackStream::MsgPackStream(QIODevice *d) :
|
MsgPackStream::MsgPackStream(QIODevice *d) :
|
||||||
dev(d), owndev(false)
|
dev(d), owndev(false), q_status(Ok)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
MsgPackStream::MsgPackStream(QByteArray *a, QIODevice::OpenMode mode) :
|
MsgPackStream::MsgPackStream(QByteArray *a, QIODevice::OpenMode mode) :
|
||||||
|
|||||||
Reference in new issue
Block a user