Filtering trailing/leading whitespace in username field in nicknames. (#3946)

This commit is contained in:
Explooosion-code 2022-09-04 18:58:44 +02:00 committed by GitHub
parent 8ec032fc84
commit 7a4eda0e30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -31,6 +31,7 @@
- Minor: Reduced image memory usage when running Chatterino for a long time. (#3915) - 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 settings to toggle BTTV/FFZ global/channel emotes (#3935)
- Minor: Add AutoMod message flag filter. (#3938) - 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: 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: Connection to Twitch PubSub now recovers more reliably. (#3643, #3716)
- Bugfix: Fix crash that can occur when changing channels. (#3799) - Bugfix: Fix crash that can occur when changing channels. (#3799)

View file

@ -16,7 +16,7 @@ NicknamesModel::NicknamesModel(QObject *parent)
Nickname NicknamesModel::getItemFromRow(std::vector<QStandardItem *> &row, Nickname NicknamesModel::getItemFromRow(std::vector<QStandardItem *> &row,
const Nickname &original) 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[1]->data(Qt::DisplayRole).toString(),
row[2]->data(Qt::CheckStateRole).toBool(), row[2]->data(Qt::CheckStateRole).toBool(),
row[3]->data(Qt::CheckStateRole).toBool()}; row[3]->data(Qt::CheckStateRole).toBool()};