[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.3/kdelibs/kdecore/localization
From: Chusslove Illich <caslav.ilic () gmx ! net>
Date: 2009-07-04 11:19:56
Message-ID: 1246706396.754271.24135.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 991182 by ilic:
Performance: do not try to strip accelearator markers when loading from pmap. (bport: 991181)
M +6 -4 ktranscript.cpp
--- branches/KDE/4.3/kdelibs/kdecore/localization/ktranscript.cpp #991181:991182
@@ -287,7 +287,7 @@
// ----------------------------------------------------------------------
// Normalize string key for hash lookups,
-QByteArray normKeystr (const QString &raw)
+QByteArray normKeystr (const QString &raw, bool mayHaveAcc = true)
{
// NOTE: Regexes should not be used here for performance reasons.
// This function may potentially be called thousands of times
@@ -307,7 +307,9 @@
key = nkey;
// Strip accelerator marker.
- key = removeAcceleratorMarker(key);
+ if (mayHaveAcc) {
+ key = removeAcceleratorMarker(key);
+ }
// Convert to lower case.
key = key.toLower();
@@ -1466,14 +1468,14 @@
if (s[i] == key_sep) {
// This is a property key,
// record for when the value gets parsed.
- pkey = normKeystr(s.mid(ip, i - ip));
+ pkey = normKeystr(s.mid(ip, i - ip), false);
i += 1;
state = s_nextValue;
}
else { // if (s[i] == prop_sep) {
// This is an entry key, or end of entry.
- QByteArray ekey = normKeystr(s.mid(ip, i - ip));
+ QByteArray ekey = normKeystr(s.mid(ip, i - ip), false);
if (!ekey.isEmpty()) {
// An entry key.
ekeys.append(ekey);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic