aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-11-25 14:09:04 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2020-11-25 16:04:45 +0000
commit625e6b3256b66e995a7b2f073083e3f7395ce4ba (patch)
tree7346780e584b8ba1f85cc818307f39ebe8e176b6 /src/lib/corelib
parent21ff28bd5a0e0f3d16a09885df45e045a515b450 (diff)
Fix some Qt 6 build errors
Change-Id: I80dccfacb749ecfc8bfb8000bdc26c684f2afa52 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'src/lib/corelib')
-rw-r--r--src/lib/corelib/generators/generatordata.cpp2
-rw-r--r--src/lib/corelib/parser/qmljslexer.cpp2
-rw-r--r--src/lib/corelib/tools/clangclinfo.cpp7
-rw-r--r--src/lib/corelib/tools/launcherinterface.cpp14
-rw-r--r--src/lib/corelib/tools/persistence.h2
5 files changed, 20 insertions, 7 deletions
diff --git a/src/lib/corelib/generators/generatordata.cpp b/src/lib/corelib/generators/generatordata.cpp
index 7c6573484..25afae23d 100644
--- a/src/lib/corelib/generators/generatordata.cpp
+++ b/src/lib/corelib/generators/generatordata.cpp
@@ -133,7 +133,7 @@ QFileInfo GeneratableProject::filePath() const
filePath.insert(it.value().location().filePath());
}
Q_ASSERT(filePath.size() == 1);
- return *filePath.begin();
+ return QFileInfo(*filePath.begin());
}
bool GeneratableProject::hasMultipleConfigurations() const
diff --git a/src/lib/corelib/parser/qmljslexer.cpp b/src/lib/corelib/parser/qmljslexer.cpp
index 931704339..db3004fc8 100644
--- a/src/lib/corelib/parser/qmljslexer.cpp
+++ b/src/lib/corelib/parser/qmljslexer.cpp
@@ -82,7 +82,7 @@ static QChar convertHex(QChar c1, QChar c2)
static QChar convertUnicode(QChar c1, QChar c2, QChar c3, QChar c4)
{
- return {uchar((convertHex(c3.unicode()) << 4) + convertHex(c4.unicode())),
+ return QChar{uchar((convertHex(c3.unicode()) << 4) + convertHex(c4.unicode())),
uchar((convertHex(c1.unicode()) << 4) + convertHex(c2.unicode()))};
}
diff --git a/src/lib/corelib/tools/clangclinfo.cpp b/src/lib/corelib/tools/clangclinfo.cpp
index 4e1022c28..0090b8f2c 100644
--- a/src/lib/corelib/tools/clangclinfo.cpp
+++ b/src/lib/corelib/tools/clangclinfo.cpp
@@ -102,8 +102,7 @@ ClangClInfo ClangClInfo::fromCompilerFilePath(const QString &path, Logger &logge
return {};
}
- const auto toolchainInstallPath = getToolchainInstallPath(path);
- return {toolchainInstallPath, vcvarsallPath};
+ return {getToolchainInstallPath(QFileInfo(path)), vcvarsallPath};
}
std::vector<ClangClInfo> ClangClInfo::installedCompilers(
@@ -151,7 +150,7 @@ std::vector<ClangClInfo> ClangClInfo::installedCompilers(
result.reserve(compilerPaths.size() + msvcs.size());
for (const auto &path: compilerPaths)
- result.push_back({getToolchainInstallPath(path), vcvarsallPath});
+ result.push_back({getToolchainInstallPath(QFileInfo(path)), vcvarsallPath});
// If we didn't find custom LLVM installation, try to find if it's installed with Visual Studio
for (const auto &msvc : msvcs) {
@@ -165,7 +164,7 @@ std::vector<ClangClInfo> ClangClInfo::installedCompilers(
.arg(msvc.installDir);
}
- result.push_back({getToolchainInstallPath(compilerPath), vcvarsallPath});
+ result.push_back({getToolchainInstallPath(QFileInfo(compilerPath)), vcvarsallPath});
}
}
diff --git a/src/lib/corelib/tools/launcherinterface.cpp b/src/lib/corelib/tools/launcherinterface.cpp
index d2cdf44df..cd877c154 100644
--- a/src/lib/corelib/tools/launcherinterface.cpp
+++ b/src/lib/corelib/tools/launcherinterface.cpp
@@ -61,11 +61,23 @@ namespace Internal {
class LauncherProcess : public QProcess
{
public:
- LauncherProcess(QObject *parent) : QProcess(parent) { }
+ LauncherProcess(QObject *parent) : QProcess(parent)
+ {
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && defined(Q_OS_UNIX)
+ setChildProcessModifier([this] { setupChildProcess_impl(); });
+#endif
+ }
private:
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void setupChildProcess() override
{
+ setupChildProcess_impl();
+ }
+#endif
+
+ void setupChildProcess_impl()
+ {
#ifdef Q_OS_UNIX
const auto pid = static_cast<pid_t>(processId());
setpgid(pid, pid);
diff --git a/src/lib/corelib/tools/persistence.h b/src/lib/corelib/tools/persistence.h
index b0fed9f68..7e3f3a11f 100644
--- a/src/lib/corelib/tools/persistence.h
+++ b/src/lib/corelib/tools/persistence.h
@@ -50,6 +50,7 @@
#include <QtCore/qprocess.h>
#include <QtCore/qregularexpression.h>
#include <QtCore/qstring.h>
+#include <QtCore/qstringlist.h>
#include <QtCore/qvariant.h>
#include <memory>
@@ -467,6 +468,7 @@ template<typename T> struct PPHelper<QFlags<T>>
template<typename T> struct IsSimpleContainer : std::false_type { };
template<typename T> struct IsSimpleContainer<QList<T>> : std::true_type { };
+template<> struct IsSimpleContainer<QStringList> : std::false_type { };
template<typename T> struct IsSimpleContainer<std::vector<T>> : std::true_type { };
template<typename T> struct PPHelper<T, std::enable_if_t<IsSimpleContainer<T>::value>>