Commit 9988c471 authored by Robert Loehning's avatar Robert Loehning Committed by Friedemann Kleint

Replaced one-char-strings

Change-Id: I0bf982b508a237e5b1e6ba3279cb589bae1b1c1d
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
parent ab64c1ae
......@@ -1553,7 +1553,7 @@ void CdbEngine::selectThread(int index)
const int newThreadId = threadsHandler()->threads().at(index).id;
threadsHandler()->setCurrentThread(index);
const QByteArray cmd = "~" + QByteArray::number(newThreadId) + " s";
const QByteArray cmd = '~' + QByteArray::number(newThreadId) + " s";
postBuiltinCommand(cmd, 0, &CdbEngine::dummyHandler, CommandListStack);
}
......
......@@ -484,7 +484,7 @@ void GdbEngine::handleResponse(const QByteArray &buff)
const int pos1 = ba.indexOf(",original-location");
const int pos2 = ba.indexOf("\":", pos1 + 2);
const int pos3 = ba.indexOf('"', pos2 + 2);
ba.replace(pos1, pos3 - pos1 + 1, "");
ba.remove(pos1, pos3 - pos1 + 1);
result = GdbMi();
result.fromString(ba);
BreakHandler *handler = breakHandler();
......
......@@ -3323,7 +3323,7 @@ bool FakeVimHandler::Private::handleExSubstituteCommand(const ExCommand &cmd)
pattern = m_lastSubstitutePattern;
replacement = m_lastSubstituteReplacement;
count = cmd.args.section(QLatin1Char(' '), 1, 1).toInt();
} else if (cmd.cmd.startsWith("&")) {
} else if (cmd.cmd.startsWith(QLatin1Char('&'))) {
flags = cmd.cmd.mid(1);
if (flags.isEmpty())
flags = m_lastSubstituteFlags;
......
......@@ -817,7 +817,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
QFont f = painter->font();
f.setItalic(true);
painter->setFont(f);
lineText = "(" + QString::number(line) + ")";
lineText = QLatin1Char('(') + QString::number(line) + QLatin1Char(')');
} else if (movedLine != line) {
// The line was moved
QFont f = painter->font();
......
......@@ -364,7 +364,7 @@ QString DesignDocumentController::simplfiedDisplayName() const
return d->componentNode.id();
}
QStringList list = displayName().split("/");
QStringList list = displayName().split(QLatin1Char('/'));
return list.last();
}
......
......@@ -200,7 +200,7 @@ void DesignDocumentControllerView::fromText(QString text)
QPlainTextEdit textEdit;
QString imports;
foreach (const Import &import, model()->imports())
imports += import.toString(true, true) + "\n";
imports += import.toString(true, true) + QLatin1Char('\n');
textEdit.setPlainText(imports + text);
NotIndentingTextEditModifier modifier(&textEdit);
......
......@@ -114,12 +114,12 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
applicationPath = QCoreApplication::applicationDirPath() + QLatin1String("/../../../../../bin");
} else {
applicationPath = macOSBundlePath(applicationPath);
applicationPath += "/" + qmlPuppetApplicationName();
applicationPath += QLatin1Char('/') + qmlPuppetApplicationName();
if (!QFileInfo(applicationPath).exists()) { //No qmlpuppet in Qt
//We have to find out how to give not too intrusive feedback
applicationPath = QCoreApplication::applicationDirPath();
applicationPath = macOSBundlePath(applicationPath);
applicationPath += "/" + qmlPuppetApplicationName();
applicationPath += QLatin1Char('/') + qmlPuppetApplicationName();
}
}
......
......@@ -359,9 +359,9 @@ public:
QString fullTypeName;
for (UiQualifiedId *iter = astTypeNode; iter; iter = iter->next)
if (!iter->name.isEmpty())
fullTypeName += iter->name.toString() + ".";
fullTypeName += iter->name.toString() + QLatin1Char('.');
if (fullTypeName.endsWith("."))
if (fullTypeName.endsWith(QLatin1Char('.')))
fullTypeName.chop(1);
majorVersion = ComponentVersion::NoVersion;
......@@ -373,14 +373,14 @@ public:
QString name = importInfo.name();
majorVersion = importInfo.version().majorVersion();
minorVersion = importInfo.version().minorVersion();
typeName.prepend(name + ".");
typeName.prepend(name + QLatin1Char('.'));
} else if (importInfo.isValid() && importInfo.type() == ImportInfo::DirectoryImport) {
QString path = importInfo.path();
QDir dir(m_doc->path());
QString relativeDir = dir.relativeFilePath(path);
QString name = relativeDir.replace("/", ".");
QString name = relativeDir.replace(QLatin1Char('/'), QLatin1Char('.'));
if (!name.isEmpty())
typeName.prepend(name + ".");
typeName.prepend(name + QLatin1Char('.'));
}
}
}
......
......@@ -390,7 +390,7 @@ void StartGdbServerDialog::startGdbServerOnPort(int port, int pid)
connect(&d->runner, SIGNAL(processClosed(int)), SLOT(handleProcessClosed(int)));
QByteArray cmd = "/usr/bin/gdbserver --attach localhost:"
+ QByteArray::number(port) + " " + QByteArray::number(pid);
+ QByteArray::number(port) + ' ' + QByteArray::number(pid);
logMessage(tr("Running command: %1").arg(QString::fromLatin1(cmd)));
d->runner.run(cmd, device->sshParameters());
}
......
......@@ -297,9 +297,9 @@ QString HelpExtractor::resolveDocUrl(const QString &name)
QString fileName = info[name]["filename"];
if (category == "demos")
return helpRootUrl + "demos-" + fileName.replace("/", "-") + ".html";
return helpRootUrl + "demos-" + fileName.replace(QLatin1Char('/'), QLatin1Char('-')) + ".html";
else
return helpRootUrl + dirName.replace("/", "-") + "-" + fileName + ".html";
return helpRootUrl + dirName.replace(QLatin1Char('/'), QLatin1Char('-')) + QLatin1Char('-') + fileName + ".html";
}
......
......@@ -193,7 +193,7 @@ void QmlProfilerApplication::printCommands()
QString QmlProfilerApplication::traceFileName() const
{
QString fileName = m_tracePrefix + "_" +
QString fileName = m_tracePrefix + QLatin1Char('_') +
QDateTime::currentDateTime().toString(QLatin1String("yyMMdd_hhmmss")) + TraceFileExtension;
if (QFileInfo(fileName).exists()) {
QString baseName;
......
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