From 40da838a9da0f281a08dae70b070ba41c9b979b2 Mon Sep 17 00:00:00 2001 From: Leon Richardt Date: Mon, 26 Oct 2020 10:06:09 +0100 Subject: [PATCH] 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 --- src/controllers/highlights/HighlightModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/highlights/HighlightModel.cpp b/src/controllers/highlights/HighlightModel.cpp index 31556ed9b..6b5448174 100644 --- a/src/controllers/highlights/HighlightModel.cpp +++ b/src/controllers/highlights/HighlightModel.cpp @@ -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(),