Diffstat (limited to 'kaddressbook/incsearchwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/incsearchwidget.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index 94c37e7..2ffa357 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp @@ -54,38 +54,41 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) // if (KGlobal::getOrientation() == KGlobal::Portrait) // mSearchText->setMaximumWidth(30); // #endif //KAB_EMBEDDED mFieldCombo = new QComboBox( false, this ); layout->addWidget( mFieldCombo ); mFieldCombo->setMaximumHeight( 34 ); QToolTip::add( mFieldCombo, i18n( "Select Incremental Search Field" ) ); // #ifndef KAB_EMBEDDED // resize( QSize(420, 50).expandedTo( sizeHint() ) ); // #else //KAB_EMBEDDED // resize( QSize(30, 10).expandedTo( sizeHint() ) ); // #endif //KAB_EMBEDDED +#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() ) ); - connect( mSearchText, SIGNAL( returnPressed() ), - SLOT( announceDoSearch() ) ); connect( mFieldCombo, SIGNAL( activated( const QString& ) ), SLOT( announceDoSearch() ) ); +#endif + connect( mSearchText, SIGNAL( returnPressed() ), + SLOT( announceDoSearch() ) ); connect( mFieldCombo, SIGNAL( activated( const QString& ) ), SLOT( announceFieldChanged() ) ); setFocusProxy( mSearchText ); } IncSearchWidget::~IncSearchWidget() { } void IncSearchWidget::announceDoSearch() { emit doSearch( mSearchText->text() ); } |