diff --git a/examples/network/torrent/connectionmanager.cpp b/examples/network/torrent/connectionmanager.cpp index fa102517490..0e15c226b8e 100644 --- a/examples/network/torrent/connectionmanager.cpp +++ b/examples/network/torrent/connectionmanager.cpp @@ -78,7 +78,7 @@ QByteArray ConnectionManager::clientId() const // Generate peer id int startupTime = int(QDateTime::currentDateTime().toTime_t()); - id += QString::asprintf("-QT%04x-", (QT_VERSION % 0xffff00) >> 8).toLatin1(); + id += QString::asprintf("-QT%04x-", QT_VERSION >> 8).toLatin1(); id += QByteArray::number(startupTime, 10); id += QByteArray(20 - id.size(), '-'); }