summaryrefslogtreecommitdiffstats
path: root/konq-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins')
-rw-r--r--konq-plugins/dirfilter/dirfilterplugin.cpp11
-rw-r--r--konq-plugins/dirfilter/dirfilterplugin.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/konq-plugins/dirfilter/dirfilterplugin.cpp b/konq-plugins/dirfilter/dirfilterplugin.cpp
index 3e16bf4..dbf034f 100644
--- a/konq-plugins/dirfilter/dirfilterplugin.cpp
+++ b/konq-plugins/dirfilter/dirfilterplugin.cpp
@@ -145,7 +145,8 @@ DirFilterPlugin::DirFilterPlugin (QObject* parent, const char* name,
const QStringList&)
:KParts::Plugin (parent, name),
m_pFilterMenu(0),
- m_searchWidget(0)
+ m_searchWidget(0),
+ m_oldFilterString("")
{
m_part = ::qt_cast<KonqDirPart*>(parent);
@@ -473,6 +474,14 @@ void DirFilterPlugin::slotItemRemoved (const KFileItem* item)
void DirFilterPlugin::activateSearch()
{
+ if (!m_searchWidget)
+ return;
+
+ if (m_oldFilterString == m_searchWidget->text())
+ return;
+
+ m_oldFilterString = m_searchWidget->text();
+
if ( ::qt_cast<KListView*>(m_part->scrollWidget()) ) {
static_cast<KListViewSearchLine*>(m_searchWidget)->updateSearch();
}
diff --git a/konq-plugins/dirfilter/dirfilterplugin.h b/konq-plugins/dirfilter/dirfilterplugin.h
index 74ad8e2..963d731 100644
--- a/konq-plugins/dirfilter/dirfilterplugin.h
+++ b/konq-plugins/dirfilter/dirfilterplugin.h
@@ -127,6 +127,7 @@ private:
KonqDirPart* m_part;
QTimer *m_refreshTimer;
KActionMenu* m_pFilterMenu;
+ QString m_oldFilterString;
KLineEdit *m_searchWidget;
QMap<QString,MimeInfo> m_pMimeInfo;