Diffstat (limited to 'kaddressbook/incsearchwidget.cpp') (more/less context) (ignore 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 | |||
@@ -31,4 +31,6 @@ | |||
31 | #include <klocale.h> | 31 | #include <klocale.h> |
32 | #include <kglobal.h> | 32 | #include <kglobal.h> |
33 | #include <kglobal.h> | ||
34 | #include "kabprefs.h" | ||
33 | 35 | ||
34 | #include "incsearchwidget.h" | 36 | #include "incsearchwidget.h" |
@@ -68,11 +70,11 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) | |||
68 | // #endif //KAB_EMBEDDED | 70 | // #endif //KAB_EMBEDDED |
69 | 71 | ||
70 | #ifdef DESKTOP_VERSION | 72 | |
71 | // for performance reasons, we do a search on the pda only after return is pressed | 73 | // for performance reasons, we do a search on the pda only after return is pressed |
72 | connect( mSearchText, SIGNAL( textChanged( const QString& ) ), | 74 | connect( mSearchText, SIGNAL( textChanged( const QString& ) ), |
73 | SLOT( announceDoSearch() ) ); | 75 | SLOT( announceDoSearch2() ) ); |
74 | connect( mFieldCombo, SIGNAL( activated( const QString& ) ), | 76 | connect( mFieldCombo, SIGNAL( activated( const QString& ) ), |
75 | SLOT( announceDoSearch() ) ); | 77 | SLOT( announceDoSearch2() ) ); |
76 | #endif | 78 | |
77 | connect( mSearchText, SIGNAL( returnPressed() ), | 79 | connect( mSearchText, SIGNAL( returnPressed() ), |
78 | SLOT( announceDoSearch() ) ); | 80 | SLOT( announceDoSearch() ) ); |
@@ -87,8 +89,17 @@ IncSearchWidget::~IncSearchWidget() | |||
87 | 89 | ||
88 | } | 90 | } |
91 | void IncSearchWidget::announceDoSearch2() | ||
92 | { | ||
93 | if ( KABPrefs::instance()->mSearchWithReturn ) | ||
94 | return; | ||
95 | emit doSearch( mSearchText->text() ); | ||
96 | //qDebug("emit dosreach "); | ||
97 | } | ||
89 | 98 | ||
90 | void IncSearchWidget::announceDoSearch() | 99 | void IncSearchWidget::announceDoSearch() |
91 | { | 100 | { |
101 | |||
92 | emit doSearch( mSearchText->text() ); | 102 | emit doSearch( mSearchText->text() ); |
103 | // qDebug("emit dosreach "); | ||
93 | } | 104 | } |
94 | 105 | ||