diff --git a/qrtplib/rtprandom.cpp b/qrtplib/rtprandom.cpp index e5764714c..9362649f5 100644 --- a/qrtplib/rtprandom.cpp +++ b/qrtplib/rtprandom.cpp @@ -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 diff --git a/sdrbase/util/uid.cpp b/sdrbase/util/uid.cpp index 2cfbdad0c..db1098640 100644 --- a/sdrbase/util/uid.cpp +++ b/sdrbase/util/uid.cpp @@ -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: diff --git a/swagger/sdrangel/code/qt5/client/SWGHttpRequest.cpp b/swagger/sdrangel/code/qt5/client/SWGHttpRequest.cpp index 650af414b..e581396e6 100644 --- a/swagger/sdrangel/code/qt5/client/SWGHttpRequest.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGHttpRequest.cpp @@ -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";