From 7a4eda0e3007156739068339cb20ba1a9ca1d2b1 Mon Sep 17 00:00:00 2001 From: Explooosion-code <61145047+Explooosion-code@users.noreply.github.com> Date: Sun, 4 Sep 2022 18:58:44 +0200 Subject: [PATCH] Filtering trailing/leading whitespace in username field in nicknames. (#3946) --- CHANGELOG.md | 1 + src/controllers/nicknames/NicknamesModel.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e6e6f9a1..f76e6e242 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ - Minor: Reduced image memory usage when running Chatterino for a long time. (#3915) - Minor: Add settings to toggle BTTV/FFZ global/channel emotes (#3935) - Minor: Add AutoMod message flag filter. (#3938) +- Minor: Added whitespace trim to username field in nicknames (#3946) - Bugfix: Fix crash that can occur when closing and quickly reopening a split, then running a command. (#3852) - Bugfix: Connection to Twitch PubSub now recovers more reliably. (#3643, #3716) - Bugfix: Fix crash that can occur when changing channels. (#3799) diff --git a/src/controllers/nicknames/NicknamesModel.cpp b/src/controllers/nicknames/NicknamesModel.cpp index 2748f49b6..2028fa3e2 100644 --- a/src/controllers/nicknames/NicknamesModel.cpp +++ b/src/controllers/nicknames/NicknamesModel.cpp @@ -16,7 +16,7 @@ NicknamesModel::NicknamesModel(QObject *parent) Nickname NicknamesModel::getItemFromRow(std::vector &row, const Nickname &original) { - return Nickname{row[0]->data(Qt::DisplayRole).toString(), + return Nickname{row[0]->data(Qt::DisplayRole).toString().trimmed(), row[1]->data(Qt::DisplayRole).toString(), row[2]->data(Qt::CheckStateRole).toBool(), row[3]->data(Qt::CheckStateRole).toBool()};