diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache index 30ab43c3bac1..083477d37e9b 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache @@ -47,7 +47,7 @@ void {{prefix}}HttpRequestInput::add_file(QString variable_name, QString local_f {{prefix}}HttpRequestWorker::{{prefix}}HttpRequestWorker(QObject *parent, QNetworkAccessManager *_manager) : QObject(parent), manager(_manager), timeOutTimer(this), isResponseCompressionEnabled(false), isRequestCompressionEnabled(false), httpResponseCode(-1) { - randomGenerator = QRandomGenerator(QDateTime::currentDateTime().toSecsSinceEpoch()); + randomGenerator = QRandomGenerator(QDateTime::currentSecsSinceEpoch()); if (manager == nullptr) { manager = new QNetworkAccessManager(this); } @@ -206,7 +206,7 @@ void {{prefix}}HttpRequestWorker::execute({{prefix}}HttpRequestInput *input) { // variable layout is MULTIPART boundary = QString("__-----------------------%1%2") - .arg(QDateTime::currentDateTime().toSecsSinceEpoch()) + .arg(QDateTime::currentSecsSinceEpoch()) .arg(randomGenerator.generate()); QString boundary_delimiter = "--"; QString new_line = "\r\n"; diff --git a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXHttpRequest.cpp b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXHttpRequest.cpp index fc78f322f6f1..de3615747bd6 100644 --- a/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXHttpRequest.cpp +++ b/samples/client/petstore/cpp-qt-addDownloadProgress/client/PFXHttpRequest.cpp @@ -54,7 +54,7 @@ void PFXHttpRequestInput::add_file(QString variable_name, QString local_filename PFXHttpRequestWorker::PFXHttpRequestWorker(QObject *parent, QNetworkAccessManager *_manager) : QObject(parent), manager(_manager), timeOutTimer(this), isResponseCompressionEnabled(false), isRequestCompressionEnabled(false), httpResponseCode(-1) { - randomGenerator = QRandomGenerator(QDateTime::currentDateTime().toSecsSinceEpoch()); + randomGenerator = QRandomGenerator(QDateTime::currentSecsSinceEpoch()); if (manager == nullptr) { manager = new QNetworkAccessManager(this); } @@ -213,7 +213,7 @@ void PFXHttpRequestWorker::execute(PFXHttpRequestInput *input) { // variable layout is MULTIPART boundary = QString("__-----------------------%1%2") - .arg(QDateTime::currentDateTime().toSecsSinceEpoch()) + .arg(QDateTime::currentSecsSinceEpoch()) .arg(randomGenerator.generate()); QString boundary_delimiter = "--"; QString new_line = "\r\n"; diff --git a/samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp b/samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp index fc78f322f6f1..de3615747bd6 100644 --- a/samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXHttpRequest.cpp @@ -54,7 +54,7 @@ void PFXHttpRequestInput::add_file(QString variable_name, QString local_filename PFXHttpRequestWorker::PFXHttpRequestWorker(QObject *parent, QNetworkAccessManager *_manager) : QObject(parent), manager(_manager), timeOutTimer(this), isResponseCompressionEnabled(false), isRequestCompressionEnabled(false), httpResponseCode(-1) { - randomGenerator = QRandomGenerator(QDateTime::currentDateTime().toSecsSinceEpoch()); + randomGenerator = QRandomGenerator(QDateTime::currentSecsSinceEpoch()); if (manager == nullptr) { manager = new QNetworkAccessManager(this); } @@ -213,7 +213,7 @@ void PFXHttpRequestWorker::execute(PFXHttpRequestInput *input) { // variable layout is MULTIPART boundary = QString("__-----------------------%1%2") - .arg(QDateTime::currentDateTime().toSecsSinceEpoch()) + .arg(QDateTime::currentSecsSinceEpoch()) .arg(randomGenerator.generate()); QString boundary_delimiter = "--"; QString new_line = "\r\n";