Diffstat (limited to 'kaddressbook/incsearchwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/incsearchwidget.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index 2ffa357..3533427 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp @@ -32,2 +32,4 @@ #include <kglobal.h> +#include <kglobal.h> +#include "kabprefs.h" @@ -69,9 +71,9 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) -#ifdef DESKTOP_VERSION + // for performance reasons, we do a search on the pda only after return is pressed connect( mSearchText, SIGNAL( textChanged( const QString& ) ), - SLOT( announceDoSearch() ) ); + SLOT( announceDoSearch2() ) ); connect( mFieldCombo, SIGNAL( activated( const QString& ) ), - SLOT( announceDoSearch() ) ); -#endif + SLOT( announceDoSearch2() ) ); + connect( mSearchText, SIGNAL( returnPressed() ), @@ -88,2 +90,9 @@ IncSearchWidget::~IncSearchWidget() } +void IncSearchWidget::announceDoSearch2() +{ + if ( KABPrefs::instance()->mSearchWithReturn ) + return; + emit doSearch( mSearchText->text() ); + //qDebug("emit dosreach "); +} @@ -91,3 +100,5 @@ void IncSearchWidget::announceDoSearch() { + emit doSearch( mSearchText->text() ); + // qDebug("emit dosreach "); } |