summaryrefslogtreecommitdiffstats
path: root/tests/arthur/common/paintcommands.cpp
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2011-04-07 12:49:54 (GMT)
committeraavit <qt-info@nokia.com>2011-04-07 12:53:04 (GMT)
commit23b01158402cfed78959ba30217ce33172ff12ab (patch)
treee135f7954154625be7f3b8f702852bf1fcbf18bd /tests/arthur/common/paintcommands.cpp
parent6a1a3378d2eaf854e4f62f637bd0f3c4c1ad017b (diff)
downloadQt-23b01158402cfed78959ba30217ce33172ff12ab.zip
Qt-23b01158402cfed78959ba30217ce33172ff12ab.tar.gz
Qt-23b01158402cfed78959ba30217ce33172ff12ab.tar.bz2
Minor optimization to lance/elot
Diffstat (limited to 'tests/arthur/common/paintcommands.cpp')
-rw-r--r--tests/arthur/common/paintcommands.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/arthur/common/paintcommands.cpp b/tests/arthur/common/paintcommands.cpp
index 527f710..7a018e3 100644
--- a/tests/arthur/common/paintcommands.cpp
+++ b/tests/arthur/common/paintcommands.cpp
@@ -184,8 +184,9 @@ const char *PaintCommands::imageFormatTable[] = {
int PaintCommands::translateEnum(const char *table[], const QString &pattern, int limit)
{
+ QByteArray p = pattern.toLatin1().toLower();
for (int i=0; i<limit; ++i)
- if (pattern.toLower() == QString(QLatin1String(table[i])).toLower())
+ if (p == QByteArray::fromRawData(table[i], qstrlen(table[i])).toLower())
return i;
return -1;
}