diff options
Diffstat (limited to 'kdevdesigner/designer/qcompletionedit.cpp')
-rw-r--r-- | kdevdesigner/designer/qcompletionedit.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kdevdesigner/designer/qcompletionedit.cpp b/kdevdesigner/designer/qcompletionedit.cpp index 87a40ecf..25ba5f47 100644 --- a/kdevdesigner/designer/qcompletionedit.cpp +++ b/kdevdesigner/designer/qcompletionedit.cpp @@ -31,7 +31,7 @@ #include <tqvbox.h> QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name ) - : TQLineEdit( parent, name ), aAdd( FALSE ), caseSensitive( FALSE ) + : TQLineEdit( parent, name ), aAdd( false ), caseSensitive( false ) { popup = new TQVBox( 0, 0, WType_Popup ); popup->setFrameStyle( TQFrame::Box | TQFrame::Plain ); @@ -98,7 +98,7 @@ void QCompletionEdit::placeListBox() popup->move( p.x(), p.y() - listbox->height() ); popup->show(); listbox->setCurrentItem( 0 ); - listbox->setSelected( 0, TRUE ); + listbox->setSelected( 0, true ); setFocus(); } @@ -123,20 +123,20 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) if ( ke->key() == Key_Tab && listbox->count() > 1 && listbox->currentItem() < (int)listbox->count() - 1 ) { listbox->setCurrentItem( listbox->currentItem() + 1 ); - return TRUE; + return true; } popup->close(); setFocus(); - blockSignals( TRUE ); + blockSignals( true ); setText( listbox->currentText() ); - blockSignals( FALSE ); + blockSignals( false ); emit chosen( text() ); - return TRUE; + return true; } else if ( ke->key() == Key_Left || ke->key() == Key_Right || ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Home || ke->key() == Key_End || ke->key() == Key_Prior || ke->key() == Key_Next ) { - return FALSE; + return false; } else if ( ke->key() == Key_Escape ) { popup->close(); setFocus(); @@ -148,16 +148,16 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) setFocus(); } TQApplication::sendEvent( this, e ); - return TRUE; + return true; } } else if ( e->type() == TQEvent::MouseButtonDblClick ) { popup->close(); setFocus(); - blockSignals( TRUE ); + blockSignals( true ); setText( listbox->currentText() ); - blockSignals( FALSE ); + blockSignals( false ); emit chosen( text() ); - return TRUE; + return true; } } else if ( o == this ) { if ( e->type() == TQEvent::KeyPress ) { @@ -171,7 +171,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) ke->key() == Key_Tab || ke->key() == Key_Escape ) { TQApplication::sendEvent( listbox, e ); - return TRUE; + return true; } } } |