mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-23 14:11:55 +01:00
Cast to quint32
This commit is contained in:
parent
88da0db0f7
commit
a36b91ffe8
@ -279,9 +279,9 @@ void WorkerPool<HandlerType>::StartOneWorker(Worker *worker) {
|
||||
// Create a server, find an unused name and start listening
|
||||
forever {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
const qint32 unique_number = QRandomGenerator::global()->bounded(static_cast<qint32>(quint64(this) & 0xFFFFFFFF));
|
||||
const quint32 unique_number = QRandomGenerator::global()->bounded(static_cast<quint32>(quint64(this) & 0xFFFFFFFF));
|
||||
#else
|
||||
const qint32 unique_number = qrand() ^ (static_cast<qint32>(quint64(this) & 0xFFFFFFFF));
|
||||
const quint32 unique_number = qrand() ^ (static_cast<quint32>(quint64(this) & 0xFFFFFFFF));
|
||||
#endif
|
||||
const QString name = QString("%1_%2").arg(local_server_name_).arg(unique_number);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user