aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/api/runenvironment.cpp
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2019-02-26 14:38:54 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2019-02-26 15:52:26 +0000
commit4fd17d627106fde01284075038e15cc0680611bc (patch)
tree25c5b7e8ec774d362ad97e86d0ecd1d8527fbac5 /src/lib/corelib/api/runenvironment.cpp
parent0b8f0b771080e51a59664782ced6b3a1cc5111ca (diff)
Return initializer list where it is possible
This fixes this clang-tidy warning: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] Change-Id: I421e1e47462fe0e97788672684d47943af7df850 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/api/runenvironment.cpp')
-rw-r--r--src/lib/corelib/api/runenvironment.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/corelib/api/runenvironment.cpp b/src/lib/corelib/api/runenvironment.cpp
index 3e0d045ec..989918207 100644
--- a/src/lib/corelib/api/runenvironment.cpp
+++ b/src/lib/corelib/api/runenvironment.cpp
@@ -149,7 +149,7 @@ const QProcessEnvironment RunEnvironment::runEnvironment(ErrorInfo *error) const
} catch (const ErrorInfo &e) {
if (error)
*error = e;
- return QProcessEnvironment();
+ return {};
}
}
@@ -160,7 +160,7 @@ const QProcessEnvironment RunEnvironment::buildEnvironment(ErrorInfo *error) con
} catch (const ErrorInfo &e) {
if (error)
*error = e;
- return QProcessEnvironment();
+ return {};
}
}
@@ -238,7 +238,7 @@ static QString findExecutable(const QStringList &fileNames)
return QDir::cleanPath(fullPath);
}
}
- return QString();
+ return {};
}
static std::string readAaptBadgingAttribute(const std::string &line)
@@ -247,7 +247,7 @@ static std::string readAaptBadgingAttribute(const std::string &line)
std::smatch match;
if (std::regex_match(line, match, re))
return match[1];
- return { };
+ return {};
}
static QString findMainIntent(const QString &aapt, const QString &apkFilePath)
@@ -270,7 +270,7 @@ static QString findMainIntent(const QString &aapt, const QString &apkFilePath)
if (!packageId.isEmpty() && !activity.isEmpty())
return packageId + QStringLiteral("/") + activity;
- return QString();
+ return {};
}
void RunEnvironment::printStartInfo(const QProcess &proc, bool dryRun)