summary refs log tree commit diff
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2019-07-04 00:32:38 +0200
committerGitHub <noreply@github.com>2019-07-04 00:32:38 +0200
commit5a0a9c96b2996d98645b33fea765315ab22b5d60 (patch)
tree96eb3aba7966d0a5adc4e87ef3c859de0eacef76 /src/Utils.cpp
parentMerge pull request #76 from xvitaly/0.7.0-dev (diff)
parentBump mtxclient requirement (diff)
downloadnheko-5a0a9c96b2996d98645b33fea765315ab22b5d60.tar.xz
Merge pull request #77 from deepbluev7/0.7.0-dev
Add .well-known support

fixes #9 
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp

index 690a9a9a..3d304e7d 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp
@@ -342,10 +342,10 @@ utils::linkColor() return QPalette().color(QPalette::Link).name(); } -int +uint32_t utils::hashQString(const QString &input) { - auto hash = 0; + uint32_t hash = 0; for (int i = 0; i < input.length(); i++) { hash = input.at(i).digitValue() + ((hash << 5) - hash); @@ -363,7 +363,7 @@ utils::generateContrastingHexColor(const QString &input, const QString &backgrou // Create a color for the input auto hash = hashQString(input); // create a hue value based on the hash of the input. - auto userHue = qAbs(hash % 360); + auto userHue = static_cast<int>(qAbs(hash % 360)); // start with moderate saturation and lightness values. auto sat = 220; auto lightness = 125;