|
32 | 32 | #include <iostream>
|
33 | 33 | #include <QProcess>
|
34 | 34 | #include <QDir>
|
35 |
| -#include <QRegExp> |
36 | 35 | #include <QSet>
|
37 | 36 | #include <QStack>
|
38 | 37 | #include <QDirIterator>
|
|
46 | 45 | #include "shared.h"
|
47 | 46 | #include "excludelist.h"
|
48 | 47 |
|
| 48 | +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
| 49 | + #define QSTRING_SPLIT_BEHAVIOR_NAMESPACE QString |
| 50 | +#else |
| 51 | + #define QSTRING_SPLIT_BEHAVIOR_NAMESPACE Qt |
| 52 | +#endif |
| 53 | + |
49 | 54 | QString appBinaryPath;
|
50 | 55 | bool runStripEnabled = true;
|
51 | 56 | bool bundleAllButCoreLibs = false;
|
@@ -307,7 +312,7 @@ bool copyCopyrightFile(QString libPath){
|
307 | 312 | myProcess->waitForFinished();
|
308 | 313 | strOut = myProcess->readAllStandardOutput();
|
309 | 314 |
|
310 |
| - QStringList outputLines = strOut.split("\n", QString::SkipEmptyParts); |
| 315 | + QStringList outputLines = strOut.split("\n", QSTRING_SPLIT_BEHAVIOR_NAMESPACE::SkipEmptyParts); |
311 | 316 |
|
312 | 317 | foreach (QString outputLine, outputLines) {
|
313 | 318 | if((outputLine.contains("usr/share/doc")) && (outputLine.contains("/copyright")) && (outputLine.contains(" "))){
|
@@ -356,7 +361,7 @@ LddInfo findDependencyInfo(const QString &binaryPath)
|
356 | 361 | static const QRegularExpression regexp(QStringLiteral("^.+ => (.+) \\("));
|
357 | 362 |
|
358 | 363 | QString output = ldd.readAllStandardOutput();
|
359 |
| - QStringList outputLines = output.split("\n", QString::SkipEmptyParts); |
| 364 | + QStringList outputLines = output.split("\n", QSTRING_SPLIT_BEHAVIOR_NAMESPACE::SkipEmptyParts); |
360 | 365 | if (outputLines.size() < 2) {
|
361 | 366 | if ((output.contains("statically linked") == false)){
|
362 | 367 | LogError() << "Could not parse ldd output under 2 lines:" << output;
|
@@ -851,7 +856,7 @@ void changeIdentification(const QString &id, const QString &binaryPath)
|
851 | 856 | }
|
852 | 857 | }
|
853 | 858 |
|
854 |
| - QStringList rpath = oldRpath.split(":", QString::SkipEmptyParts); |
| 859 | + QStringList rpath = oldRpath.split(":", QSTRING_SPLIT_BEHAVIOR_NAMESPACE::SkipEmptyParts); |
855 | 860 | rpath.prepend(id);
|
856 | 861 | rpath.removeDuplicates();
|
857 | 862 | foreach(QString path, QStringList(rpath)) {
|
@@ -1064,7 +1069,11 @@ DeploymentInfo deployQtLibraries(QList<LibraryInfo> libraries,
|
1064 | 1069 | static QString captureOutput(const QString &command)
|
1065 | 1070 | {
|
1066 | 1071 | QProcess process;
|
| 1072 | +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
1067 | 1073 | process.start(command, QIODevice::ReadOnly);
|
| 1074 | +#else |
| 1075 | + process.startCommand(command, QIODevice::ReadOnly); |
| 1076 | +#endif |
1068 | 1077 | process.waitForFinished();
|
1069 | 1078 |
|
1070 | 1079 | if (process.exitStatus() != QProcess::NormalExit) {
|
@@ -1129,7 +1138,7 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a
|
1129 | 1138 | QString output = captureOutput(qmakePath + " -query");
|
1130 | 1139 | LogDebug() << "-query output from qmake:" << output;
|
1131 | 1140 |
|
1132 |
| - QStringList outputLines = output.split("\n", QString::SkipEmptyParts); |
| 1141 | + QStringList outputLines = output.split("\n", QSTRING_SPLIT_BEHAVIOR_NAMESPACE::SkipEmptyParts); |
1133 | 1142 | foreach (const QString &outputLine, outputLines) {
|
1134 | 1143 | int colonIndex = outputLine.indexOf(QLatin1Char(':'));
|
1135 | 1144 | if (colonIndex != -1) {
|
|
0 commit comments