+bool AwayLogFilter::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
+{
+ Q_UNUSED(sourceParent)
+
+ QModelIndex source_index = sourceModel()->index(sourceRow, 0);
+
+ Message::Flags flags = (Message::Flags)sourceModel()->data(source_index, MessageModel::FlagsRole).toInt();
+ // Only show highlights from the backlog
+ if (!(flags & Message::Backlog && flags & Message::Highlight)) {
+ return false;
+ }
+
+ // do not use invalid buffers
+ BufferId bufferId = sourceModel()->data(source_index, MessageModel::BufferIdRole).value<BufferId>();
+ if (!bufferId.isValid()) {
+ return false;
+ }