From e985f7e545f4739493965aad69bbecb136dc9346 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 16 Jun 2011 19:02:47 +0000 Subject: TQt4 port kdewebdev This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kommander/editor/qcompletionedit.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'kommander/editor/qcompletionedit.cpp') diff --git a/kommander/editor/qcompletionedit.cpp b/kommander/editor/qcompletionedit.cpp index 4ba5e366..61d0407e 100644 --- a/kommander/editor/qcompletionedit.cpp +++ b/kommander/editor/qcompletionedit.cpp @@ -4,8 +4,8 @@ #include #include -QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name ) - : TQLineEdit( parent, name ), aAdd( false ), caseSensitive( false ) +QCompletionEdit::QCompletionEdit( TQWidget *tqparent, const char *name ) + : TQLineEdit( tqparent, name ), aAdd( false ), caseSensitive( false ) { popup = new TQVBox( 0, 0, WType_Popup ); popup->setFrameStyle( TQFrame::Box | TQFrame::Plain ); @@ -62,8 +62,8 @@ void QCompletionEdit::placeListBox() return; } - popup->resize( QMAX( listbox->sizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ), - listbox->sizeHint().height() + listbox->horizontalScrollBar()->height() + 4 ); + popup->resize( TQMAX( listbox->tqsizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ), + listbox->tqsizeHint().height() + listbox->horizontalScrollBar()->height() + 4 ); TQPoint p( mapToGlobal( TQPoint( 0, 0 ) ) ); if ( p.y() + height() + popup->height() <= TQApplication::desktop()->height() ) @@ -90,7 +90,7 @@ void QCompletionEdit::updateListBox() bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) { - if ( o == popup || o == listbox || o == listbox->viewport() ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popup) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox->viewport()) ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) { @@ -133,7 +133,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) emit chosen( text() ); return true; } - } else if ( o == this ) { + } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if ( ke->key() == Key_Up || @@ -154,7 +154,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) void QCompletionEdit::addCompletionEntry( const TQString &entry ) { - if ( compList.find( entry ) == compList.end() ) { + if ( compList.tqfind( entry ) == compList.end() ) { compList << entry; compList.sort(); } @@ -162,7 +162,7 @@ void QCompletionEdit::addCompletionEntry( const TQString &entry ) void QCompletionEdit::removeCompletionEntry( const TQString &entry ) { - TQStringList::Iterator it = compList.find( entry ); + TQStringList::Iterator it = compList.tqfind( entry ); if ( it != compList.end() ) compList.remove( it ); } -- cgit v1.2.1