diff options
author | Jon Ander Peñalba <jonan88@gmail.com> | 2010-08-30 00:05:47 +0200 |
---|---|---|
committer | Jon Ander Peñalba <jonan88@gmail.com> | 2010-08-30 16:58:35 +0200 |
commit | 51ef0020a78bd216cb357eaa574161299fa0b608 (patch) | |
tree | 9c5f7ef427b79eaa3df14cf030a646e9508da043 /src/history/historypanel.cpp | |
parent | Merge branch 'master' of gitorious.org:rekonq/mainline (diff) | |
download | rekonq-51ef0020a78bd216cb357eaa574161299fa0b608.tar.xz |
Use the same FilterProxyModel for the bookmarks and history panels
Diffstat (limited to 'src/history/historypanel.cpp')
-rw-r--r-- | src/history/historypanel.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/history/historypanel.cpp b/src/history/historypanel.cpp index b9e7b10b..4c1dc732 100644 --- a/src/history/historypanel.cpp +++ b/src/history/historypanel.cpp @@ -27,13 +27,14 @@ // Self Includes #include "historypanel.h" -#include "historypanel.moc" // Auto Includes #include "rekonq.h" // Local Includes +#include "panels/urlfilterproxymodel.h" #include "application.h" +#include "paneltreeview.h" #include "historymodels.h" // Qt Includes @@ -58,9 +59,9 @@ HistoryPanel::HistoryPanel(const QString &title, QWidget *parent, Qt::WindowFlag { setObjectName("historyPanel"); setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); - + connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(showing(bool))); - + setShown(ReKonfig::showHistoryPanel()); } @@ -117,16 +118,16 @@ void HistoryPanel::setup() HistoryManager *historyManager = Application::historyManager(); QAbstractItemModel *model = historyManager->historyTreeModel(); - TreeProxyModel *treeProxyModel = new TreeProxyModel(this); - treeProxyModel->setSourceModel(model); - m_treeView->setModel(treeProxyModel); - m_treeView->setExpanded(treeProxyModel->index(0, 0), true); + UrlFilterProxyModel *proxy = new UrlFilterProxyModel(this); + proxy->setSourceModel(model); + m_treeView->setModel(proxy); + m_treeView->setExpanded(proxy->index(0, 0), true); m_treeView->header()->hideSection(1); QFontMetrics fm(font()); int header = fm.width( QL1C('m') ) * 40; m_treeView->header()->resizeSection(0, header); - connect(search, SIGNAL(textChanged(QString)), treeProxyModel, SLOT(setFilterFixedString(QString))); + connect(search, SIGNAL(textChanged(QString)), proxy, SLOT(setFilterFixedString(QString))); connect(m_treeView, SIGNAL(contextMenuItemRequested(const QPoint &)), this, SLOT(contextMenuItem(const QPoint &))); connect(m_treeView, SIGNAL(contextMenuGroupRequested(const QPoint &)), this, SLOT(contextMenuGroup(const QPoint &))); |