mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 04:28:49 +03:00
Fix QChar range
This commit is contained in:
parent
24f370d6c0
commit
19787d664c
2 changed files with 3 additions and 2 deletions
|
@ -4424,8 +4424,7 @@ Cache::displayName(const QString &room_id, const QString &user_id)
|
||||||
static bool
|
static bool
|
||||||
isDisplaynameSafe(const std::string &s)
|
isDisplaynameSafe(const std::string &s)
|
||||||
{
|
{
|
||||||
for (std::uint32_t cc : QString::fromStdString(s).toStdU32String()) {
|
for (QChar c : QString::fromStdString(s)) {
|
||||||
auto c = QChar(cc);
|
|
||||||
if (c.isPrint() && !c.isSpace())
|
if (c.isPrint() && !c.isSpace())
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,8 @@ void
|
||||||
Dock::setUnreadCount(const int count)
|
Dock::setUnreadCount(const int count)
|
||||||
{
|
{
|
||||||
unitySetNotificationCount(count);
|
unitySetNotificationCount(count);
|
||||||
|
|
||||||
|
// qGuiApp->setBadgeNumber(count);
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
Dock::unitySetNotificationCount(const int count)
|
Dock::unitySetNotificationCount(const int count)
|
||||||
|
|
Loading…
Reference in a new issue