OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bbdc63
)
use the same hash for 8 bit strings as in QByteArray
author
Ivailo Monev
<xakepa10@laimg.moc>
Mon, 22 Aug 2016 21:02:29 +0000
(21:02 +0000)
committer
Ivailo Monev
<xakepa10@laimg.moc>
Mon, 22 Aug 2016 21:02:29 +0000
(21:02 +0000)
upstream actually uses QLatingString, but anyway
upstream commits:
https://github.com/qt/qtbase/commit/
8fca1e70e7a8b1dc21a0134b6786e84faff91823
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/tools/moc/symbols.h
patch
|
blob
|
history
diff --git
a/src/tools/moc/symbols.h
b/src/tools/moc/symbols.h
index
48538c4
..
a4fe8f1
100644
(file)
--- a/
src/tools/moc/symbols.h
+++ b/
src/tools/moc/symbols.h
@@
-72,18
+72,7
@@
struct SubArray
inline uint qHash(const SubArray &key)
{
- const uchar *p = reinterpret_cast<const uchar *>(key.array.data() + key.from);
- int n = key.len;
- uint h = 0;
- uint g;
-
- while (n--) {
- h = (h << 4) + *p++;
- if ((g = (h & 0xf0000000)) != 0)
- h ^= g >> 23;
- h &= ~g;
- }
- return h;
+ return qHash(QString::fromLatin1(key.array.constData() + key.from, key.len));
}