summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/lancelot/paintcommands.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-20 16:09:41 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-22 03:53:22 +0000
commitacdd4850a485a0cb8f8f0502cafd65a9f214b2a9 (patch)
treec03ce846cf87f4b8ec87ba6d34dc153a36418143 /tests/auto/other/lancelot/paintcommands.cpp
parentf32f75ae1b9b720a208a35fdc708ed9649c29a3a (diff)
tests/auto/other: Remove some placeholder formatting.
Use QByteArray/QString addition instead in loops and for test row names. Change-Id: Iae76d852a1657bfb6d88e84515f30bd2f1dece6b Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/other/lancelot/paintcommands.cpp')
-rw-r--r--tests/auto/other/lancelot/paintcommands.cpp19
1 files changed, 10 insertions, 9 deletions
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 <typename T> 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");