From 19787d664c6112b8af8d885a5d1cdf705cba8152 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 2 Jun 2023 22:43:56 +0200 Subject: [PATCH] Fix QChar range --- src/Cache.cpp | 3 +-- src/dock/Dock.cpp | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Cache.cpp b/src/Cache.cpp index 1c29d530..b3981c64 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -4424,8 +4424,7 @@ Cache::displayName(const QString &room_id, const QString &user_id) static bool isDisplaynameSafe(const std::string &s) { - for (std::uint32_t cc : QString::fromStdString(s).toStdU32String()) { - auto c = QChar(cc); + for (QChar c : QString::fromStdString(s)) { if (c.isPrint() && !c.isSpace()) return false; } diff --git a/src/dock/Dock.cpp b/src/dock/Dock.cpp index 08e7adba..0b573c20 100644 --- a/src/dock/Dock.cpp +++ b/src/dock/Dock.cpp @@ -60,6 +60,8 @@ void Dock::setUnreadCount(const int count) { unitySetNotificationCount(count); + + // qGuiApp->setBadgeNumber(count); } void Dock::unitySetNotificationCount(const int count)