mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Fix FTBFS on Ubuntu 18.04
This commit is contained in:
@@ -25,8 +25,10 @@
|
|||||||
#include <QtCore/QDateTime>
|
#include <QtCore/QDateTime>
|
||||||
#include <QtCore/QByteArray>
|
#include <QtCore/QByteArray>
|
||||||
#include <QtCore/QSharedMemory>
|
#include <QtCore/QSharedMemory>
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) // ### Qt 6: remove
|
||||||
|
#else
|
||||||
#include <QRandomGenerator>
|
#include <QRandomGenerator>
|
||||||
|
#endif
|
||||||
#include "singleapplication.h"
|
#include "singleapplication.h"
|
||||||
#include "singleapplication_p.h"
|
#include "singleapplication_p.h"
|
||||||
|
|
||||||
@@ -100,7 +102,7 @@ SingleApplication::SingleApplication( int &argc, char *argv[], bool allowSeconda
|
|||||||
d->memory->unlock();
|
d->memory->unlock();
|
||||||
|
|
||||||
// Random sleep here limits the probability of a collision between two racing apps
|
// Random sleep here limits the probability of a collision between two racing apps
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 9, 0) // ### Qt 6: remove
|
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) // ### Qt 6: remove
|
||||||
qsrand( QDateTime::currentMSecsSinceEpoch() % std::numeric_limits<uint>::max() );
|
qsrand( QDateTime::currentMSecsSinceEpoch() % std::numeric_limits<uint>::max() );
|
||||||
QThread::sleep( 8 + static_cast <unsigned long>( static_cast <float>( qrand() ) / RAND_MAX * 10 ) );
|
QThread::sleep( 8 + static_cast <unsigned long>( static_cast <float>( qrand() ) / RAND_MAX * 10 ) );
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user