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(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(m_part->scrollWidget()) ) { static_cast(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 m_pMimeInfo;