Use QLatin1String overload for QString::replace

GIT_SILENT
parent bdbc4d16
......@@ -222,7 +222,7 @@ Path KDevelop::proposedBuildFolder(const Path& sourceFolder)
{
Path proposedBuildFolder;
if (sourceFolder.path().contains(QLatin1String("/src/"))) {
const QString srcBuildPath = sourceFolder.path().replace(QStringLiteral("/src/"), QStringLiteral("/build/"));
const QString srcBuildPath = sourceFolder.path().replace(QLatin1String("/src/"), QLatin1String("/build/"));
Q_ASSERT(!srcBuildPath.isEmpty());
if (QDir(srcBuildPath).exists()) {
proposedBuildFolder = Path(srcBuildPath);
......
......@@ -127,8 +127,8 @@ bool KDevFormatFile::executeCommand(QString command)
{
qStdOut() << ", using command \"" << command << "\"\n";
command.replace(QStringLiteral("$ORIGFILE"), m_origFilePath);
command.replace(QStringLiteral("$TMPFILE"), m_tempFilePath);
command.replace(QLatin1String("$ORIGFILE"), m_origFilePath);
command.replace(QLatin1String("$TMPFILE"), m_tempFilePath);
#ifdef Q_OS_WIN
int execResult = QProcess::execute(QStringLiteral("cmd"), {QStringLiteral("/c"), command});
......
......@@ -52,7 +52,7 @@ QString verboseMessageToHtml(const QString& input)
{
QString output(QStringLiteral("<html>%1</html>").arg(input.toHtmlEscaped()));
output.replace(QStringLiteral("\\012"), QStringLiteral("\n"));
output.replace(QLatin1String("\\012"), QLatin1String("\n"));
if (output.count(QLatin1Char('\n')) >= 2) {
output.replace(output.indexOf(QLatin1Char('\n')), 1, QStringLiteral("<pre>"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment