summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarksproxy.h
diff options
context:
space:
mode:
authorJon Ander Peñalba <jonan88@gmail.com>2010-08-16 11:43:57 +0200
committerJon Ander Peñalba <jonan88@gmail.com>2010-08-16 11:43:57 +0200
commitd14423159aa1b9873af4d6c0ec7d470ce8dc54c5 (patch)
tree912704ce10a8e00244ec8b72466a7f0faefc94d5 /src/bookmarks/bookmarksproxy.h
parentBug when closing the 'New Folder' dialog fixed. (diff)
downloadrekonq-d14423159aa1b9873af4d6c0ec7d470ce8dc54c5.tar.xz
Made the bookmark search case insensitive and added some comments to the BookmarksProxy class.
Diffstat (limited to 'src/bookmarks/bookmarksproxy.h')
-rw-r--r--src/bookmarks/bookmarksproxy.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bookmarks/bookmarksproxy.h b/src/bookmarks/bookmarksproxy.h
index e7b50d8e..b4554d2b 100644
--- a/src/bookmarks/bookmarksproxy.h
+++ b/src/bookmarks/bookmarksproxy.h
@@ -33,9 +33,13 @@
#include "rekonq_defines.h"
// Qt Includes
-#include <QSortFilterProxyModel>
-
+#include <QtGui/QSortFilterProxyModel>
+/**
+ * QSortFilterProxyModel hides all children which parent doesn't
+ * match the filter. This class is used to change this behavior.
+ * If a bookmark matches the filter it'll be shown, even if it's parent doesn't match it.
+ */
class REKONQ_TESTS_EXPORT BookmarksProxy : public QSortFilterProxyModel
{
Q_OBJECT
@@ -45,9 +49,9 @@ public:
BookmarksProxy(QObject *parent = 0);
protected:
- virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
+ virtual bool filterAcceptsRow(const int source_row, const QModelIndex &source_parent) const;
- // returns true if any child(or children-child...) matches filter
+ // returns true if index or any of his children match the filter
bool recursiveMatch(const QModelIndex &index) const;
};