summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorIvan Komissarov <ABBAPOH@gmail.com>2022-08-11 09:17:48 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2022-08-16 17:16:26 +0000
commit015deadb1be852973b5821ebdb799b01ca565866 (patch)
treec4705db4166531efbddfebec742babe809cf8fcf /src/app
parentcc5f5b9456d9a1bb4213dbc6f0ac9d742ced5295 (diff)
downloadqbs-015deadb1be852973b5821ebdb799b01ca565866.tar.gz
clang-tidy: fix 'performance-no-automatic-move' warning
Change-Id: I0fea777445be769080b5e5534eb8dd05cf4652be Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/qbs-setup-qt/setupqt.cpp2
-rw-r--r--src/app/qbs-setup-toolchains/clangclprobe.cpp2
-rw-r--r--src/app/qbs-setup-toolchains/dmcprobe.cpp3
-rw-r--r--src/app/qbs-setup-toolchains/sdccprobe.cpp3
-rw-r--r--src/app/qbs-setup-toolchains/watcomprobe.cpp4
-rw-r--r--src/app/qbs/sessionpacket.cpp2
6 files changed, 7 insertions, 9 deletions
diff --git a/src/app/qbs-setup-qt/setupqt.cpp b/src/app/qbs-setup-qt/setupqt.cpp
index 08caec657..bac766482 100644
--- a/src/app/qbs-setup-qt/setupqt.cpp
+++ b/src/app/qbs-setup-qt/setupqt.cpp
@@ -156,7 +156,7 @@ static QString archFromDirName(const QString &dir)
const std::string dirString = dir.toStdString();
if (!std::regex_match(dirString, match, regexp))
return {};
- const QString arch = QString::fromStdString(match[1]);
+ QString arch = QString::fromStdString(match[1]);
if (arch == QLatin1String("32"))
return QStringLiteral("x86");
if (arch == QLatin1String("64"))
diff --git a/src/app/qbs-setup-toolchains/clangclprobe.cpp b/src/app/qbs-setup-toolchains/clangclprobe.cpp
index c9c5a428c..094f8aa14 100644
--- a/src/app/qbs-setup-toolchains/clangclprobe.cpp
+++ b/src/app/qbs-setup-toolchains/clangclprobe.cpp
@@ -85,7 +85,7 @@ Profile createProfileHelper(
QString findClangCl()
{
const auto compilerName = HostOsInfo::appendExecutableSuffix(QStringLiteral("clang-cl"));
- const auto compilerFromPath = findExecutable(compilerName);
+ auto compilerFromPath = findExecutable(compilerName);
if (!compilerFromPath.isEmpty())
return compilerFromPath;
diff --git a/src/app/qbs-setup-toolchains/dmcprobe.cpp b/src/app/qbs-setup-toolchains/dmcprobe.cpp
index cbe113dfd..097b1caed 100644
--- a/src/app/qbs-setup-toolchains/dmcprobe.cpp
+++ b/src/app/qbs-setup-toolchains/dmcprobe.cpp
@@ -105,8 +105,7 @@ static QStringList dumpOutput(const QFileInfo &compiler, const QStringList &flag
p.waitForFinished(3000);
fakeIn.remove();
static QRegularExpression re(QLatin1String("\\r?\\n"));
- const QStringList lines = QString::fromUtf8(p.readAllStandardOutput()).split(re);
- return lines;
+ return QString::fromUtf8(p.readAllStandardOutput()).split(re);
}
static std::optional<Target> dumpDmcTarget(const QFileInfo &compiler, const QStringList &flags)
diff --git a/src/app/qbs-setup-toolchains/sdccprobe.cpp b/src/app/qbs-setup-toolchains/sdccprobe.cpp
index b53615218..25a3d9751 100644
--- a/src/app/qbs-setup-toolchains/sdccprobe.cpp
+++ b/src/app/qbs-setup-toolchains/sdccprobe.cpp
@@ -84,8 +84,7 @@ static QStringList dumpOutput(const QFileInfo &compiler, const QString &targetFl
}
static QRegularExpression re(QStringLiteral("\\r?\\n"));
- const QStringList lines = QString::fromUtf8(p.readAllStandardOutput()).split(re);
- return lines;
+ return QString::fromUtf8(p.readAllStandardOutput()).split(re);
}
static bool supportsSdccArchitecture(const QFileInfo &compiler, QStringView flag)
diff --git a/src/app/qbs-setup-toolchains/watcomprobe.cpp b/src/app/qbs-setup-toolchains/watcomprobe.cpp
index 13cb8d50c..cc9fee2b4 100644
--- a/src/app/qbs-setup-toolchains/watcomprobe.cpp
+++ b/src/app/qbs-setup-toolchains/watcomprobe.cpp
@@ -118,8 +118,8 @@ static QStringList dumpOutput(const QFileInfo &compiler, QStringView flag,
p.start(compiler.absoluteFilePath(), args);
p.waitForFinished(3000);
fakeIn.remove();
- const QStringList lines = QString::fromUtf8(p.readAllStandardOutput())
- .split(QRegularExpression(QLatin1String("\\r?\\n")));
+ QStringList lines = QString::fromUtf8(p.readAllStandardOutput())
+ .split(QRegularExpression(QLatin1String("\\r?\\n")));
return lines;
}
diff --git a/src/app/qbs/sessionpacket.cpp b/src/app/qbs/sessionpacket.cpp
index dd6d1726e..5af252179 100644
--- a/src/app/qbs/sessionpacket.cpp
+++ b/src/app/qbs/sessionpacket.cpp
@@ -82,7 +82,7 @@ SessionPacket::Status SessionPacket::parseInput(QByteArray &input)
QJsonObject SessionPacket::retrievePacket()
{
QBS_ASSERT(isComplete(), return QJsonObject());
- const auto packet = QJsonDocument::fromJson(QByteArray::fromBase64(m_payload)).object();
+ auto packet = QJsonDocument::fromJson(QByteArray::fromBase64(m_payload)).object();
m_payload.clear();
m_expectedPayloadLength = -1;
return packet;