aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-04-22 11:04:37 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-04-25 18:45:26 +0200
commita3e882b06eda8f9a63cf3834a99640034775269b (patch)
tree3598dfbfdfcbd5e345eaa2c6ea86a8445d0feb5d /sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
parent3d8431182e97c9c87220e8d8ddfcd3abde22e31d (diff)
shiboken6: Remove deprecated QLatin1String
Introduce a compatibility header to provide the 6.4 API to 6.3 to reduce merge conflicts. Task-number: QTBUG-98434 Pick-to: 6.3 6.2 Change-Id: Iab3f9f894019b4135afa96b930325966348210d0 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
index 7d31f17e0..1c6b39228 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
@@ -31,6 +31,8 @@
#include <reporthandler.h>
+#include "qtcompat.h"
+
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QFile>
@@ -46,6 +48,8 @@
#include <algorithm>
#include <iterator>
+using namespace Qt::StringLiterals;
+
namespace clang {
QVersionNumber libClangVersion()
@@ -227,17 +231,17 @@ static QString findClangLibDir()
{
for (const char *envVar : {"LLVM_INSTALL_DIR", "CLANG_INSTALL_DIR"}) {
if (qEnvironmentVariableIsSet(envVar)) {
- const QString path = QFile::decodeName(qgetenv(envVar)) + QLatin1String("/lib");
+ const QString path = QFile::decodeName(qgetenv(envVar)) + u"/lib"_s;
if (QFileInfo::exists(path))
return path;
qWarning("%s: %s as pointed to by %s does not exist.", __FUNCTION__, qPrintable(path), envVar);
}
}
const QString llvmConfig =
- QStandardPaths::findExecutable(QLatin1String("llvm-config"));
+ QStandardPaths::findExecutable(u"llvm-config"_s);
if (!llvmConfig.isEmpty()) {
QByteArray stdOut;
- if (runProcess(llvmConfig, QStringList{QLatin1String("--libdir")}, &stdOut)) {
+ if (runProcess(llvmConfig, QStringList{u"--libdir"_s}, &stdOut)) {
const QString path = QFile::decodeName(stdOut.trimmed());
if (QFileInfo::exists(path))
return path;
@@ -254,7 +258,7 @@ static QString findClangBuiltInIncludesDir()
if (!clangPathLibDir.isEmpty()) {
QString candidate;
QVersionNumber lastVersionNumber(1, 0, 0);
- const QString clangDirName = clangPathLibDir + QLatin1String("/clang");
+ const QString clangDirName = clangPathLibDir + u"/clang"_s;
QDir clangDir(clangDirName);
const QFileInfoList versionDirs =
clangDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
@@ -319,7 +323,7 @@ QByteArrayList emulatedCompilerOptions()
appendClangBuiltinIncludes(&headerPaths);
break;
case Compiler::Clang:
- headerPaths.append(gppInternalIncludePaths(compilerFromCMake(u"clang++"_qs)));
+ headerPaths.append(gppInternalIncludePaths(compilerFromCMake(u"clang++"_s)));
result.append(noStandardIncludeOption());
break;
case Compiler::Gpp: