Mercurial > hg > octave-lojdl
changeset 13547:7d106550be8f
Connected filterinh via slots, which is significantly faster.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Wed, 27 Jul 2011 00:53:52 +0200 |
parents | 5ef33f99a078 |
children | 5c2ea445e100 |
files | gui/src/HistoryDockWidget.cpp gui/src/HistoryDockWidget.h |
diffstat | 2 files changed, 1 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/src/HistoryDockWidget.cpp +++ b/gui/src/HistoryDockWidget.cpp @@ -45,7 +45,7 @@ widget ()->setLayout (layout); - connect (m_filterLineEdit, SIGNAL (textEdited (QString)), this, SLOT (setFilter (QString))); + connect (m_filterLineEdit, SIGNAL (textEdited (QString)), &m_sortFilterProxyModel, SLOT (setFilterWildcard(QString))); connect (m_historyListView, SIGNAL (doubleClicked (QModelIndex)), this, SLOT (handleDoubleClick (QModelIndex))); } @@ -56,14 +56,6 @@ } void -HistoryDockWidget::setFilter (QString filter) -{ - m_historyListView->setEnabled (false); - m_sortFilterProxyModel.setFilterWildcard ( QString ("*%1*").arg (filter)); - m_historyListView->setEnabled (true); -} - -void HistoryDockWidget::handleDoubleClick (QModelIndex modelIndex) { emit commandDoubleClicked (modelIndex.data().toString());
--- a/gui/src/HistoryDockWidget.h +++ b/gui/src/HistoryDockWidget.h @@ -24,7 +24,6 @@ #include <QListView> #include <QSortFilterProxyModel> #include "OctaveLink.h" -#include <QThread> class HistoryDockWidget:public QDockWidget { @@ -36,7 +35,6 @@ public slots: /** Tells the widget to notice settings that are probably new. */ void noticeSettings (); - void setFilter (QString filter); signals: void information (QString message);