mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 18:45:17 -04:00
Code maintenance for Qt 5:
- Replaced Qt::WFlags with Qt::WindowFlags. - Removed path "QtCore/" and "QtGui/" from the includes. - Replaced "QString::toAscii()" with "QString::toLatin1()". git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6843 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
69862404d6
commit
135a5e579a
101 changed files with 127 additions and 127 deletions
|
@ -310,12 +310,12 @@ QString ChatStyle::formatMessage(enumFormatMessage type, const QString &name, co
|
|||
// Calculate color from the name
|
||||
// uint hash = 0x73ffe23a;
|
||||
// for (int i = 0; i < name.length(); ++i) {
|
||||
// hash = (hash ^ 0x28594888) + ((uint32_t) name[i].toAscii() << (i % 4));
|
||||
// hash = (hash ^ 0x28594888) + ((uint32_t) name[i].toLatin1() << (i % 4));
|
||||
// }
|
||||
|
||||
uint hash = 0;
|
||||
for (int i = 0; i < name.length(); ++i) {
|
||||
hash = (((hash << 1) + (hash >> 14)) ^ ((int) name[i].toAscii())) & 0x3fff;
|
||||
hash = (((hash << 1) + (hash >> 14)) ^ ((int) name[i].toLatin1())) & 0x3fff;
|
||||
}
|
||||
|
||||
color.setHsv(hash, 255, 150);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue