kopia lustrzana https://github.com/f4exb/sdrangel
Replace deprecated QDateTime toTime_t by toSecsSinceEpoch
rodzic
fcbaaf7100
commit
996134d898
|
@ -60,7 +60,7 @@ uint32_t RTPRandom::PickSeed()
|
|||
x = (uint32_t) getpid();
|
||||
#endif
|
||||
QDateTime currentDateTime = QDateTime::currentDateTime();
|
||||
x += currentDateTime.toTime_t();
|
||||
x += currentDateTime.toSecsSinceEpoch();
|
||||
#if defined(WIN32)
|
||||
x += QDateTime::currentMSecsSinceEpoch() % 1000;
|
||||
#else
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
uint64_t UidCalculator::getNewObjectId()
|
||||
{
|
||||
QDateTime currentDateTime = QDateTime::currentDateTime();
|
||||
uint64_t uid = currentDateTime.toTime_t();
|
||||
uint64_t uid = currentDateTime.toSecsSinceEpoch();
|
||||
uid *= 1000000UL; // make room for microseconds
|
||||
|
||||
// Fallback to milliseconds:
|
||||
|
|
|
@ -54,7 +54,7 @@ void SWGHttpRequestInput::add_file(QString variable_name, QString local_filename
|
|||
SWGHttpRequestWorker::SWGHttpRequestWorker(QObject *parent)
|
||||
: QObject(parent), manager(nullptr)
|
||||
{
|
||||
QRandomGenerator::global()->seed(QDateTime::currentDateTime().toTime_t());
|
||||
QRandomGenerator::global()->seed(QDateTime::currentDateTime().toSecsSinceEpoch());
|
||||
|
||||
manager = new QNetworkAccessManager(this);
|
||||
connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(on_manager_finished(QNetworkReply*)));
|
||||
|
@ -163,7 +163,7 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
|
|||
// variable layout is MULTIPART
|
||||
|
||||
boundary = "__-----------------------"
|
||||
+ QString::number(QDateTime::currentDateTime().toTime_t())
|
||||
+ QString::number(QDateTime::currentDateTime().toSecsSinceEpoch())
|
||||
+ QString::number(QRandomGenerator::global()->generate());
|
||||
QString boundary_delimiter = "--";
|
||||
QString new_line = "\r\n";
|
||||
|
|
Ładowanie…
Reference in New Issue