Commit 63e4132d authored by Ronan Abhamon's avatar Ronan Abhamon

fix(src/externals/single-application/SingleApplication): add casts

parent 0fd79e86
...@@ -211,7 +211,7 @@ void SingleApplicationPrivate::connectToPrimary (int msecs, char connectionType) ...@@ -211,7 +211,7 @@ void SingleApplicationPrivate::connectToPrimary (int msecs, char connectionType)
initMsg.append(connectionType); initMsg.append(connectionType);
initMsg.append(reinterpret_cast<const char *>(&instanceNumber), sizeof(quint32)); initMsg.append(reinterpret_cast<const char *>(&instanceNumber), sizeof(quint32));
initMsg.append(QByteArray::number(qChecksum(initMsg.constData(), initMsg.length()), 256)); initMsg.append(QByteArray::number(qChecksum(initMsg.constData(), static_cast<uint>(initMsg.length())), 256));
socket->write(initMsg); socket->write(initMsg);
socket->flush(); socket->flush();
...@@ -296,12 +296,12 @@ void SingleApplicationPrivate::slotConnectionEstablished () { ...@@ -296,12 +296,12 @@ void SingleApplicationPrivate::slotConnectionEstablished () {
initMsg += tmp; initMsg += tmp;
// Verify the checksum of the initMsg // Verify the checksum of the initMsg
QByteArray checksum = QByteArray::number( QByteArray checksum = QByteArray::number(
qChecksum(initMsg.constData(), initMsg.length()), qChecksum(initMsg.constData(), static_cast<uint>(initMsg.length())),
256 256
); );
tmp = nextConnSocket->read(checksum.length()); tmp = nextConnSocket->read(checksum.length());
if (checksum == tmp) if (checksum == tmp)
break; // Otherwise set to invalid connection (next line) break; // Otherwise set to invalid connection (next line)
} }
default: default:
connectionType = InvalidConnection; connectionType = InvalidConnection;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment