Fortune* Example: Bump QDataStream format version
One of the examples were using a different version than the others. Though QString's formatting probably didn't change since then so it was no problem. Anyway, pretend like we're releasing it now for the first time and set 6.5 on all of them Task-number: QTBUG-108875 Pick-to: 6.5 Change-Id: I28b496ab3d8ff54c503a032ba15882cdf3d5eccf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
605eec7b55
commit
71cd3bc074
@ -62,7 +62,7 @@ void FortuneThread::run()
|
||||
//! [8] //! [11]
|
||||
|
||||
QDataStream in(&socket);
|
||||
in.setVersion(QDataStream::Qt_4_0);
|
||||
in.setVersion(QDataStream::Qt_6_5);
|
||||
QString fortune;
|
||||
//! [11] //! [12]
|
||||
|
||||
|
@ -61,7 +61,7 @@ Client::Client(QWidget *parent)
|
||||
|
||||
//! [1]
|
||||
in.setDevice(tcpSocket);
|
||||
in.setVersion(QDataStream::Qt_4_0);
|
||||
in.setVersion(QDataStream::Qt_6_5);
|
||||
//! [1]
|
||||
|
||||
connect(hostCombo, &QComboBox::editTextChanged,
|
||||
|
@ -95,7 +95,7 @@ void Server::sendFortune()
|
||||
//! [5]
|
||||
QByteArray block;
|
||||
QDataStream out(&block, QIODevice::WriteOnly);
|
||||
out.setVersion(QDataStream::Qt_5_10);
|
||||
out.setVersion(QDataStream::Qt_6_5);
|
||||
|
||||
out << fortunes[QRandomGenerator::global()->bounded(fortunes.size())];
|
||||
//! [4] //! [7]
|
||||
|
@ -25,7 +25,7 @@ void FortuneThread::run()
|
||||
|
||||
QByteArray block;
|
||||
QDataStream out(&block, QIODevice::WriteOnly);
|
||||
out.setVersion(QDataStream::Qt_4_0);
|
||||
out.setVersion(QDataStream::Qt_6_5);
|
||||
out << text;
|
||||
//! [3] //! [4]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user