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 --- klinkstatus/src/ui/klshistorycombo.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'klinkstatus/src/ui/klshistorycombo.cpp') diff --git a/klinkstatus/src/ui/klshistorycombo.cpp b/klinkstatus/src/ui/klshistorycombo.cpp index 10fc7900..bcfef44c 100644 --- a/klinkstatus/src/ui/klshistorycombo.cpp +++ b/klinkstatus/src/ui/klshistorycombo.cpp @@ -24,8 +24,8 @@ bool KLSHistoryCombo::items_saved_ = false; -KLSHistoryCombo::KLSHistoryCombo(TQWidget *parent, const char *name) - : KHistoryCombo(parent, name) +KLSHistoryCombo::KLSHistoryCombo(TQWidget *tqparent, const char *name) + : KHistoryCombo(tqparent, name) { setMaxCount(KLSConfig::maxCountComboUrl()); @@ -76,15 +76,15 @@ void KLSHistoryCombo::loadItems() bool KLSHistoryCombo::eventFilter( TQObject *o, TQEvent *ev ) { - // Handle Ctrl+Del/Backspace etc better than the Qt widget, which always + // Handle Ctrl+Del/Backspace etc better than the TQt widget, which always // jumps to the next whitespace. TQLineEdit *edit = lineEdit(); - if ( o == edit ) + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(edit) ) { int type = ev->type(); if ( type == TQEvent::KeyPress ) { - TQKeyEvent *e = static_cast( ev ); + TQKeyEvent *e = TQT_TQKEYEVENT( ev ); if ( e->key() == Key_Return || e->key() == Key_Enter ) { @@ -116,7 +116,7 @@ bool KLSHistoryCombo::eventFilter( TQObject *o, TQEvent *ev ) } /* - Handle Ctrl+Cursor etc better than the Qt widget, which always + Handle Ctrl+Cursor etc better than the TQt widget, which always jumps to the next whitespace. This code additionally jumps to the next [/#?:], which makes more sense for URLs. The list of chars that will stop the cursor are '/', '.', '?', '#', ':'. @@ -143,7 +143,7 @@ void KLSHistoryCombo::selectWord(TQKeyEvent *e) if( allow_space_break && text[pos].isSpace() && count > 1 ) break; } - while( pos >= 0 && (chars.findIndex(text[pos]) == -1 || count <= 1) ); + while( pos >= 0 && (chars.tqfindIndex(text[pos]) == -1 || count <= 1) ); if( e->state() & ShiftButton ) { @@ -172,7 +172,7 @@ void KLSHistoryCombo::selectWord(TQKeyEvent *e) if( allow_space_break && text[pos].isSpace() ) break; } - while( pos < (int) text.length() && chars.findIndex(text[pos]) == -1 ); + while( pos < (int) text.length() && chars.tqfindIndex(text[pos]) == -1 ); if( e->state() & ShiftButton ) { -- cgit v1.2.1