From 51ef0020a78bd216cb357eaa574161299fa0b608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Ander=20Pe=C3=B1alba?= Date: Mon, 30 Aug 2010 00:05:47 +0200 Subject: Use the same FilterProxyModel for the bookmarks and history panels --- src/history/historymodels.h | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'src/history/historymodels.h') diff --git a/src/history/historymodels.h b/src/history/historymodels.h index b61e8969..d193cf86 100644 --- a/src/history/historymodels.h +++ b/src/history/historymodels.h @@ -95,16 +95,16 @@ public: inline bool historyContains(const QString &url) const { - load(); + load(); return m_historyHash.contains(url); } - + inline QList keys() const { load(); return m_historyHash.keys(); } - + int historyLocation(const QString &url) const; QModelIndex mapFromSource(const QModelIndex &sourceIndex) const; @@ -139,7 +139,7 @@ private: /** * Proxy model for the history model that converts the list * into a tree, one top level node per day. - * + * * Used in the HistoryDialog. * */ @@ -177,28 +177,4 @@ private: }; -// ----------------------------------------------------------------------------------------------------------------- - - -/** - * A modified QSortFilterProxyModel that always accepts - * the root nodes in the tree - * so filtering is only done on the children. - * - * Used in the HistoryDialog. - * - */ - -class TreeProxyModel : public QSortFilterProxyModel -{ - Q_OBJECT - -public: - TreeProxyModel(QObject *parent = 0); - -protected: - bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const; -}; - - #endif // HISTORYMODELS_H -- cgit v1.2.1