| 34 | } |
| 35 | |
| 36 | QString commandLineString(const JobParameters& params) |
| 37 | { |
| 38 | QStringList args; |
| 39 | |
| 40 | args << params.executablePath; |
| 41 | |
| 42 | if (!params.checks.isEmpty()) { |
| 43 | args << QLatin1String("-checks=") + params.checks; |
| 44 | } |
| 45 | |
| 46 | if (params.onlyQt) { |
| 47 | args << QStringLiteral("-only-qt"); |
| 48 | } |
| 49 | |
| 50 | if (params.qtDeveloper) { |
| 51 | args << QStringLiteral("-qt-developer"); |
| 52 | } |
| 53 | |
| 54 | if (params.qt4Compat) { |
| 55 | args << QStringLiteral("-qt4-compat"); |
| 56 | } |
| 57 | |
| 58 | if (params.visitImplicitCode) { |
| 59 | args << QStringLiteral("-visit-implicit-code"); |
| 60 | } |
| 61 | |
| 62 | if (params.ignoreIncludedFiles) { |
| 63 | args << QStringLiteral("-ignore-included-files"); |
| 64 | } |
| 65 | |
| 66 | if (!params.headerFilter.isEmpty()) { |
| 67 | args << QLatin1String("-header-filter=") + params.headerFilter; |
| 68 | } |
| 69 | |
| 70 | if (params.enableAllFixits) { |
| 71 | args << QStringLiteral("-enable-all-fixits"); |
| 72 | } |
| 73 | |
| 74 | if (params.noInplaceFixits) { |
| 75 | args << QStringLiteral("-no-inplace-fixits"); |
| 76 | } |
| 77 | |
| 78 | if (!params.extraAppend.isEmpty()) { |
| 79 | args << QLatin1String("-extra-arg=") + params.extraAppend; |
| 80 | } |
| 81 | |
| 82 | if (!params.extraPrepend.isEmpty()) { |
| 83 | args << QLatin1String("-extra-arg-before=%1") + params.extraPrepend; |
| 84 | } |
| 85 | |
| 86 | if (!params.extraClazy.isEmpty()) { |
| 87 | args << KShell::splitArgs(params.extraClazy); |
| 88 | } |
| 89 | |
| 90 | args << QLatin1String("-p=\"") + params.buildDir + QLatin1Char('\"'); |
| 91 | |
| 92 | // for (auto it = args.begin(), end = args.end(); it != end; ++it) { |
| 93 | // QString& commandPart = *it; |