mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 17:58:43 -05:00
Merge pull request #1434 from pinkavaj/pi-depr1
Replace deprecated QDateTime toTime_t by toSecsSinceEpoch
This commit is contained in:
commit
2919530942
@ -60,7 +60,7 @@ uint32_t RTPRandom::PickSeed()
|
|||||||
x = (uint32_t) getpid();
|
x = (uint32_t) getpid();
|
||||||
#endif
|
#endif
|
||||||
QDateTime currentDateTime = QDateTime::currentDateTime();
|
QDateTime currentDateTime = QDateTime::currentDateTime();
|
||||||
x += currentDateTime.toTime_t();
|
x += currentDateTime.toSecsSinceEpoch();
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
x += QDateTime::currentMSecsSinceEpoch() % 1000;
|
x += QDateTime::currentMSecsSinceEpoch() % 1000;
|
||||||
#else
|
#else
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
uint64_t UidCalculator::getNewObjectId()
|
uint64_t UidCalculator::getNewObjectId()
|
||||||
{
|
{
|
||||||
QDateTime currentDateTime = QDateTime::currentDateTime();
|
QDateTime currentDateTime = QDateTime::currentDateTime();
|
||||||
uint64_t uid = currentDateTime.toTime_t();
|
uint64_t uid = currentDateTime.toSecsSinceEpoch();
|
||||||
uid *= 1000000UL; // make room for microseconds
|
uid *= 1000000UL; // make room for microseconds
|
||||||
|
|
||||||
// Fallback to milliseconds:
|
// Fallback to milliseconds:
|
||||||
|
@ -54,7 +54,7 @@ void SWGHttpRequestInput::add_file(QString variable_name, QString local_filename
|
|||||||
SWGHttpRequestWorker::SWGHttpRequestWorker(QObject *parent)
|
SWGHttpRequestWorker::SWGHttpRequestWorker(QObject *parent)
|
||||||
: QObject(parent), manager(nullptr)
|
: QObject(parent), manager(nullptr)
|
||||||
{
|
{
|
||||||
QRandomGenerator::global()->seed(QDateTime::currentDateTime().toTime_t());
|
QRandomGenerator::global()->seed(QDateTime::currentDateTime().toSecsSinceEpoch());
|
||||||
|
|
||||||
manager = new QNetworkAccessManager(this);
|
manager = new QNetworkAccessManager(this);
|
||||||
connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(on_manager_finished(QNetworkReply*)));
|
connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(on_manager_finished(QNetworkReply*)));
|
||||||
@ -163,7 +163,7 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
|
|||||||
// variable layout is MULTIPART
|
// variable layout is MULTIPART
|
||||||
|
|
||||||
boundary = "__-----------------------"
|
boundary = "__-----------------------"
|
||||||
+ QString::number(QDateTime::currentDateTime().toTime_t())
|
+ QString::number(QDateTime::currentDateTime().toSecsSinceEpoch())
|
||||||
+ QString::number(QRandomGenerator::global()->generate());
|
+ QString::number(QRandomGenerator::global()->generate());
|
||||||
QString boundary_delimiter = "--";
|
QString boundary_delimiter = "--";
|
||||||
QString new_line = "\r\n";
|
QString new_line = "\r\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user