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:
Mårten Nordheim 2023-01-13 16:51:59 +01:00
parent 605eec7b55
commit 71cd3bc074
4 changed files with 4 additions and 4 deletions

View File

@ -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]

View File

@ -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,

View File

@ -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]

View File

@ -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]