1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 09:18:54 -05:00

Replace deprecated QDateTime toTime_t by toSecsSinceEpoch

This commit is contained in:
Jiří Pinkava 2022-09-21 21:41:40 +02:00
parent fcbaaf7100
commit 996134d898
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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:

View File

@ -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";