|
11 | 11 | //
|
12 | 12 | #include "base/LemonUtils.hpp"
|
13 | 13 |
|
14 |
| -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) |
15 |
| -#define QT_SkipEmptyParts Qt::SkipEmptyParts |
16 |
| -#else |
17 |
| -#define QT_SkipEmptyParts QString::SkipEmptyParts |
18 |
| -#endif |
19 |
| - |
20 | 14 | Compiler::Compiler(QObject *parent) : QObject(parent) {
|
21 | 15 | compilerType = Typical;
|
22 | 16 | timeLimitRatio = 1;
|
@@ -55,15 +49,15 @@ void Compiler::setCompilerType(Compiler::CompilerType type) { compilerType = typ
|
55 | 49 | void Compiler::setCompilerName(const QString &name) { compilerName = name; }
|
56 | 50 |
|
57 | 51 | void Compiler::setSourceExtensions(const QString &extensions) {
|
58 |
| - sourceExtensions = extensions.split(";", QT_SkipEmptyParts); |
| 52 | + sourceExtensions = extensions.split(";", Qt::SkipEmptyParts); |
59 | 53 | }
|
60 | 54 |
|
61 | 55 | void Compiler::setCompilerLocation(const QString &location) { compilerLocation = location; }
|
62 | 56 |
|
63 | 57 | void Compiler::setInterpreterLocation(const QString &location) { interpreterLocation = location; }
|
64 | 58 |
|
65 | 59 | void Compiler::setBytecodeExtensions(const QString &extensions) {
|
66 |
| - bytecodeExtensions = extensions.split(";", QT_SkipEmptyParts); |
| 60 | + bytecodeExtensions = extensions.split(";", Qt::SkipEmptyParts); |
67 | 61 | }
|
68 | 62 |
|
69 | 63 | void Compiler::setEnvironment(const QProcessEnvironment &env) { environment = env; }
|
@@ -139,11 +133,7 @@ void Compiler::read(const QJsonObject &json) {
|
139 | 133 |
|
140 | 134 | QStringList _environment;
|
141 | 135 | if (json.contains("environment") && json["environment"].isString()) {
|
142 |
| -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) |
143 | 136 | _environment = json["environment"].toString().split(QLatin1Char(';'), Qt::SkipEmptyParts);
|
144 |
| -#else |
145 |
| - _environment = json["environment"].toString().split(QLatin1Char(';'), QString::SkipEmptyParts); |
146 |
| -#endif |
147 | 137 | }
|
148 | 138 |
|
149 | 139 | for (auto &i : _environment) {
|
|
0 commit comments