Fix QChar range

This commit is contained in:
Nicolas Werner 2023-06-02 22:43:56 +02:00
parent 24f370d6c0
commit 19787d664c
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 3 additions and 2 deletions

View file

@ -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;
}

View file

@ -60,6 +60,8 @@ void
Dock::setUnreadCount(const int count)
{
unitySetNotificationCount(count);
// qGuiApp->setBadgeNumber(count);
}
void
Dock::unitySetNotificationCount(const int count)