mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
History: Don't delete all items under dates when filtering
BUG: 466936 FIXED-IN: 23.04.0 Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
cdcdd3379e
commit
85f9990104
|
@ -561,3 +561,8 @@ bool HistoryFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sour
|
|||
return (index.data(HistoryModel::UrlStringRole).toString().contains(m_pattern, Qt::CaseInsensitive) ||
|
||||
index.data(HistoryModel::TitleRole).toString().contains(m_pattern, Qt::CaseInsensitive));
|
||||
}
|
||||
|
||||
bool HistoryFilterModel::isPatternEmpty() const
|
||||
{
|
||||
return m_pattern.isEmpty();
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ class FALKON_EXPORT HistoryFilterModel : public QSortFilterProxyModel
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit HistoryFilterModel(QAbstractItemModel* parent);
|
||||
bool isPatternEmpty() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void setFilterFixedString(const QString &pattern);
|
||||
|
|
|
@ -111,7 +111,7 @@ void HistoryTreeView::removeSelectedItems()
|
|||
continue;
|
||||
}
|
||||
|
||||
if (index.data(HistoryModel::IsTopLevelRole).toBool()) {
|
||||
if ((index.data(HistoryModel::IsTopLevelRole).toBool()) && (m_filter->isPatternEmpty())) {
|
||||
qint64 start = index.data(HistoryModel::TimestampStartRole).toLongLong();
|
||||
qint64 end = index.data(HistoryModel::TimestampEndRole).toLongLong();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user