From acdd4850a485a0cb8f8f0502cafd65a9f214b2a9 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 20 Oct 2015 16:09:41 +0200 Subject: tests/auto/other: Remove some placeholder formatting. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use QByteArray/QString addition instead in loops and for test row names. Change-Id: Iae76d852a1657bfb6d88e84515f30bd2f1dece6b Reviewed-by: Jędrzej Nowacki --- tests/auto/other/lancelot/paintcommands.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'tests/auto/other/lancelot/paintcommands.cpp') diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp index 4fc41fd649..15454b59d2 100644 --- a/tests/auto/other/lancelot/paintcommands.cpp +++ b/tests/auto/other/lancelot/paintcommands.cpp @@ -650,7 +650,7 @@ template T PaintCommands::image_load(const QString &filepath) QDir dir = fi.absoluteDir(); dir.cdUp(); dir.cd("images"); - QString fileName = QString("%1/%2").arg(dir.absolutePath()).arg(fi.fileName()); + QString fileName = dir.absolutePath() + QLatin1Char('/') + fi.fileName(); t = T(fileName); if (t.isNull() && !fileName.endsWith(".png")) { fileName.append(".png"); @@ -841,10 +841,11 @@ void PaintCommands::command_import(QRegExp re) qPrintable(fi.fileName())); QFileInfo fileinfo(*file); - m_commands[m_currentCommandIndex] = QString("# import file (%1) start").arg(fileinfo.fileName()); + m_commands[m_currentCommandIndex] = QLatin1String("# import file (") + fileinfo.fileName() + + QLatin1String(") start"); QString rawContent = QString::fromUtf8(file->readAll()); QStringList importedData = rawContent.split('\n', QString::SkipEmptyParts); - importedData.append(QString("# import file (%1) end ---").arg(fileinfo.fileName())); + importedData.append(QLatin1String("# import file (") + fileinfo.fileName() + QLatin1String(") end ---")); insertAt(m_currentCommandIndex, importedData); if (m_verboseMode) { @@ -862,13 +863,13 @@ void PaintCommands::command_begin_block(QRegExp re) if (m_verboseMode) printf(" -(lance) begin_block (%s)\n", qPrintable(blockName)); - m_commands[m_currentCommandIndex] = QString("# begin block (%1)").arg(blockName); + m_commands[m_currentCommandIndex] = QLatin1String("# begin block (") + blockName + QLatin1Char(')'); QStringList newBlock; int i = m_currentCommandIndex + 1; for (; i < m_commands.count(); ++i) { const QString &nextCmd = m_commands.at(i); if (nextCmd.startsWith("end_block")) { - m_commands[i] = QString("# end block (%1)").arg(blockName); + m_commands[i] = QLatin1String("# end block (") + blockName + QLatin1Char(')'); break; } newBlock += nextCmd; @@ -905,7 +906,7 @@ void PaintCommands::command_repeat_block(QRegExp re) return; } - m_commands[m_currentCommandIndex] = QString("# repeated block (%1)").arg(blockName); + m_commands[m_currentCommandIndex] = QLatin1String("# repeated block (") + blockName + QLatin1Char(')'); insertAt(m_currentCommandIndex, block); } @@ -946,7 +947,7 @@ void PaintCommands::command_drawPixmap(QRegExp re) QDir dir = fi.absoluteDir(); dir.cdUp(); dir.cd("images"); - QString fileName = QString("%1/%2").arg(dir.absolutePath()).arg(re.cap(1)); + QString fileName = dir.absolutePath() + QLatin1Char('/') + re.cap(1); pm = QPixmap(fileName); if (pm.isNull() && !fileName.endsWith(".png")) { fileName.append(".png"); @@ -995,7 +996,7 @@ void PaintCommands::command_drawImage(QRegExp re) QDir dir = fi.absoluteDir(); dir.cdUp(); dir.cd("images"); - QString fileName = QString("%1/%2").arg(dir.absolutePath()).arg(re.cap(1)); + QString fileName = dir.absolutePath() + QLatin1Char('/') + re.cap(1); im = QImage(fileName); if (im.isNull() && !fileName.endsWith(".png")) { fileName.append(".png"); @@ -1041,7 +1042,7 @@ void PaintCommands::command_drawTiledPixmap(QRegExp re) QDir dir = fi.absoluteDir(); dir.cdUp(); dir.cd("images"); - QString fileName = QString("%1/%2").arg(dir.absolutePath()).arg(re.cap(1)); + QString fileName = dir.absolutePath() + QLatin1Char('/') + re.cap(1); pm = QPixmap(fileName); if (pm.isNull() && !fileName.endsWith(".png")) { fileName.append(".png"); -- cgit v1.2.3