summaryrefslogtreecommitdiffstats
path: root/kommander/editor/qcompletionedit.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kommander/editor/qcompletionedit.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
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
Diffstat (limited to 'kommander/editor/qcompletionedit.cpp')
-rw-r--r--kommander/editor/qcompletionedit.cpp16
1 files changed, 8 insertions, 8 deletions
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 <tqapplication.h>
#include <tqvbox.h>
-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 );
}