|
7 | 7 | #include <QUrl> |
8 | 8 | #include <QUuid> |
9 | 9 | #include <QtGlobal> |
10 | | -#if QT_VERSION >= 0x051500 |
| 10 | +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) |
11 | 11 | #define SKIP_EMPTY_PARTS Qt::SkipEmptyParts |
12 | 12 | #else |
13 | 13 | #define SKIP_EMPTY_PARTS QString::SkipEmptyParts |
@@ -52,7 +52,7 @@ void {{prefix}}HttpRequestInput::add_file(QString variable_name, QString local_f |
52 | 52 | {{prefix}}HttpRequestWorker::{{prefix}}HttpRequestWorker(QObject *parent, QNetworkAccessManager *_manager) |
53 | 53 | : QObject(parent), manager(_manager), timeOutTimer(this), isResponseCompressionEnabled(false), isRequestCompressionEnabled(false), httpResponseCode(-1) { |
54 | 54 |
|
55 | | -#if QT_VERSION >= 0x051500 |
| 55 | +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) |
56 | 56 | randomGenerator = QRandomGenerator(QDateTime::currentDateTime().toSecsSinceEpoch()); |
57 | 57 | #else |
58 | 58 | qsrand(QDateTime::currentDateTime().toTime_t()); |
@@ -216,7 +216,7 @@ void {{prefix}}HttpRequestWorker::execute({{prefix}}HttpRequestInput *input) { |
216 | 216 | // variable layout is MULTIPART |
217 | 217 |
|
218 | 218 | boundary = QString("__-----------------------%1%2") |
219 | | - #if QT_VERSION >= 0x051500 |
| 219 | + #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) |
220 | 220 | .arg(QDateTime::currentDateTime().toSecsSinceEpoch()) |
221 | 221 | .arg(randomGenerator.generate()); |
222 | 222 | #else |
@@ -546,7 +546,7 @@ QByteArray {{prefix}}HttpRequestWorker::compress(const QByteArray& input, int le |
546 | 546 | return output;{{/contentCompression}}{{^contentCompression}} |
547 | 547 | Q_UNUSED(input); |
548 | 548 | Q_UNUSED(level); |
549 | | - Q_UNUSED(compressType); |
| 549 | + Q_UNUSED(compressType); |
550 | 550 | return QByteArray();{{/contentCompression}} |
551 | 551 | } |
552 | 552 |
|
|
0 commit comments