fix: showInMentions attribute is now serialized correctly (#2137)
This was an error introduced in ec94869. Instead of the
Qt::CheckStateRole, which stores the state represented in the table
view, the Qt::DisplayRole was used. As per [1], this always returns
`false` in our use case.
[1]: https://doc.qt.io/qt-5/qvariant.html#toBool
This commit is contained in:
@@ -25,7 +25,7 @@ HighlightPhrase HighlightModel::getItemFromRow(
|
||||
|
||||
return HighlightPhrase{
|
||||
row[Column::Pattern]->data(Qt::DisplayRole).toString(),
|
||||
row[Column::ShowInMentions]->data(Qt::DisplayRole).toBool(),
|
||||
row[Column::ShowInMentions]->data(Qt::CheckStateRole).toBool(),
|
||||
row[Column::FlashTaskbar]->data(Qt::CheckStateRole).toBool(),
|
||||
row[Column::PlaySound]->data(Qt::CheckStateRole).toBool(),
|
||||
row[Column::UseRegex]->data(Qt::CheckStateRole).toBool(),
|
||||
|
||||
Reference in New Issue
Block a user