Update singleApplication.

See : https://github.com/itay-grudev/SingleApplication


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5708 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2019-01-19 15:25:48 +00:00
parent c915cb1ba9
commit c6d537a5d5
3 changed files with 143 additions and 73 deletions

View File

@@ -91,7 +91,7 @@ SingleApplication::SingleApplication( int &argc, char *argv[], bool allowSeconda
d->memory->unlock();
// Random sleep here limits the probability of a colision between two racing apps
// Random sleep here limits the probability of a collision between two racing apps
qsrand( QDateTime::currentMSecsSinceEpoch() % std::numeric_limits<uint>::max() );
QThread::sleep( 8 + static_cast <unsigned long>( static_cast <float>( qrand() ) / RAND_MAX * 10 ) );
}