diff options
author | aavit <qt-info@nokia.com> | 2011-04-07 12:49:54 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2011-04-07 12:53:04 (GMT) |
commit | 23b01158402cfed78959ba30217ce33172ff12ab (patch) | |
tree | e135f7954154625be7f3b8f702852bf1fcbf18bd /tests/arthur/common | |
parent | 6a1a3378d2eaf854e4f62f637bd0f3c4c1ad017b (diff) | |
download | Qt-23b01158402cfed78959ba30217ce33172ff12ab.zip Qt-23b01158402cfed78959ba30217ce33172ff12ab.tar.gz Qt-23b01158402cfed78959ba30217ce33172ff12ab.tar.bz2 |
Minor optimization to lance/elot
Diffstat (limited to 'tests/arthur/common')
-rw-r--r-- | tests/arthur/common/paintcommands.cpp | 3 |
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; } |