diff --git a/src/util/externalcommandhelper.cpp b/src/util/externalcommandhelper.cpp --- a/src/util/externalcommandhelper.cpp +++ b/src/util/externalcommandhelper.cpp @@ -90,7 +90,7 @@ */ quint64 ExternalCommandHelper::getNonce() { - quint64 nonce = m_Generator.generate(); + const quint64 nonce = m_Generator.generate(); m_Nonces.insert(nonce); return nonce; } @@ -145,7 +145,7 @@ return false; } - if (device.write(buffer) != buffer.size()) { + if (!device.write(buffer)) { qCritical() << xi18n("Could not write to device %1.", targetDevice); return false; }