fix: remove fixed datastream version

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers 2023-04-03 18:00:56 -07:00
parent 5b50b806ec
commit 197be9cfd0
2 changed files with 1 additions and 4 deletions

View File

@ -446,7 +446,6 @@ void create_link::runPrivileged(const QString& offset)
// construct block of data to send // construct block of data to send
QByteArray block; QByteArray block;
QDataStream out(&block, QIODevice::WriteOnly); QDataStream out(&block, QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_5_0); // choose correct version better?
qint32 blocksize = quint32(sizeof(quint32)); qint32 blocksize = quint32(sizeof(quint32));
for (auto link : m_links_to_make) { for (auto link : m_links_to_make) {
@ -469,7 +468,7 @@ void create_link::runPrivileged(const QString& offset)
QDataStream in; QDataStream in;
quint32 blockSize = 0; quint32 blockSize = 0;
in.setDevice(clientConnection); in.setDevice(clientConnection);
in.setVersion(QDataStream::Qt_5_0);
qDebug() << "Reading path results from client"; qDebug() << "Reading path results from client";
qDebug() << "bytes available" << clientConnection->bytesAvailable(); qDebug() << "bytes available" << clientConnection->bytesAvailable();

View File

@ -120,7 +120,6 @@ void FileLinkApp::joinServer(QString server)
blockSize = 0; blockSize = 0;
in.setDevice(&socket); in.setDevice(&socket);
in.setVersion(QDataStream::Qt_5_0);
connect(&socket, &QLocalSocket::connected, this, [&]() { qDebug() << "connected to server"; }); connect(&socket, &QLocalSocket::connected, this, [&]() { qDebug() << "connected to server"; });
@ -203,7 +202,6 @@ void FileLinkApp::sendResults()
// construct block of data to send // construct block of data to send
QByteArray block; QByteArray block;
QDataStream out(&block, QIODevice::WriteOnly); QDataStream out(&block, QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_5_0);
qint32 blocksize = quint32(sizeof(quint32)); qint32 blocksize = quint32(sizeof(quint32));
for (auto result : m_path_results) { for (auto result : m_path_results) {