summaryrefslogtreecommitdiffstats
path: root/libkdepim/addresseelineedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdepim/addresseelineedit.cpp')
-rw-r--r--libkdepim/addresseelineedit.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/libkdepim/addresseelineedit.cpp b/libkdepim/addresseelineedit.cpp
index 0d86fad44..9e42085b5 100644
--- a/libkdepim/addresseelineedit.cpp
+++ b/libkdepim/addresseelineedit.cpp
@@ -217,12 +217,12 @@ void AddresseeLineEdit::keyPressEvent( TQKeyEvent *e )
{
bool accept = false;
- if ( KStdAccel::shortcut( KStdAccel::SubstringCompletion ).tqcontains( KKey( e ) ) ) {
+ if ( KStdAccel::shortcut( KStdAccel::SubstringCompletion ).contains( KKey( e ) ) ) {
//TODO: add LDAP substring lookup, when it becomes available in KPIM::LDAPSearch
updateSearchString();
doCompletion( true );
accept = true;
- } else if ( KStdAccel::shortcut( KStdAccel::TextCompletion ).tqcontains( KKey( e ) ) ) {
+ } else if ( KStdAccel::shortcut( KStdAccel::TextCompletion ).contains( KKey( e ) ) ) {
int len = text().length();
if ( len == cursorPosition() ) { // at End?
@@ -344,9 +344,9 @@ void AddresseeLineEdit::mouseReleaseEvent( TQMouseEvent *e )
{
// reimplemented from TQLineEdit::mouseReleaseEvent()
if ( m_useCompletion
- && TQApplication::clipboard()->supportsSelection()
+ && TQApplication::tqclipboard()->supportsSelection()
&& !isReadOnly()
- && e->button() == MidButton ) {
+ && e->button() == Qt::MidButton ) {
m_smartPaste = true;
}
@@ -727,7 +727,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
bool bDone = false;
int i = -1;
- while( ( i = name.findRev(' ') ) > 1 && !bDone ) {
+ while( ( i = name.tqfindRev(' ') ) > 1 && !bDone ) {
TQString sLastName( name.mid( i+1 ) );
if( ! sLastName.isEmpty() &&
2 <= sLastName.length() && // last names must be at least 2 chars long
@@ -763,7 +763,7 @@ void AddresseeLineEdit::addCompletionItem( const TQString& string, int weight, i
weight = TQMAX( ( *it ).first, weight );
( *it ).first = weight;
} else {
- s_completionItemMap->insert( string, qMakePair( weight, completionItemSource ) );
+ s_completionItemMap->insert( string, tqMakePair( weight, completionItemSource ) );
}
if ( keyWords == 0 )
s_completion->addItem( string, weight );
@@ -798,7 +798,7 @@ void AddresseeLineEdit::startLoadingLDAPEntries()
TQString s( *s_LDAPText );
// TODO cache last?
TQString prevAddr;
- int n = s.findRev( ',' );
+ int n = s.tqfindRev( ',' );
if ( n >= 0 ) {
prevAddr = s.left( n + 1 ) + ' ';
s = s.mid( n + 1, 255 ).stripWhiteSpace();
@@ -872,13 +872,13 @@ void AddresseeLineEdit::setCompletedItems( const TQStringList& items, bool autoS
// item, if there is one
TQListBoxItem* item = 0;
if ( oldCurrentText.isEmpty()
- || ( item = completionBox->findItem( oldCurrentText ) ) == 0 ) {
+ || ( item = completionBox->tqfindItem( oldCurrentText ) ) == 0 ) {
item = completionBox->item( 1 );
}
if ( item )
{
if ( itemUnderMouse ) {
- TQListBoxItem *newItemUnderMouse = completionBox->findItem( oldTextUnderMouse );
+ TQListBoxItem *newItemUnderMouse = completionBox->tqfindItem( oldTextUnderMouse );
// if the mouse was over an item, before, but now that's elsewhere,
// move the cursor, so folks don't accidently click the wrong item
if ( newItemUnderMouse ) {
@@ -1026,7 +1026,7 @@ int KPIM::AddresseeLineEdit::addCompletionSource( const TQString &source, int we
else
(*s_completionSourceWeights)[source] = weight;
- int sourceIndex = s_completionSources->findIndex( source );
+ int sourceIndex = s_completionSources->tqfindIndex( source );
if ( sourceIndex == -1 ) {
s_completionSources->append( source );
return s_completionSources->size() - 1;
@@ -1037,12 +1037,12 @@ int KPIM::AddresseeLineEdit::addCompletionSource( const TQString &source, int we
bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
{
- if ( obj == completionBox() ) {
+ if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(completionBox()) ) {
if ( e->type() == TQEvent::MouseButtonPress ||
e->type() == TQEvent::MouseMove ||
e->type() == TQEvent::MouseButtonRelease ||
e->type() == TQEvent::MouseButtonDblClick ) {
- TQMouseEvent* me = static_cast<TQMouseEvent*>( e );
+ TQMouseEvent* me = TQT_TQMOUSEEVENT( e );
// find list box item at the event position
TQListBoxItem *item = completionBox()->itemAt( me->pos() );
if ( !item ) {
@@ -1054,8 +1054,8 @@ bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
// avoid selection of headers on button press, or move or release while
// a button is pressed
if ( e->type() == TQEvent::MouseButtonPress
- || me->state() & LeftButton || me->state() & MidButton
- || me->state() & RightButton ) {
+ || me->state() & Qt::LeftButton || me->state() & Qt::MidButton
+ || me->state() & Qt::RightButton ) {
if ( itemIsHeader(item) ) {
return true; // eat the event, we don't want anything to happen
} else {
@@ -1070,18 +1070,18 @@ bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
}
}
}
- if ( ( obj == this ) &&
+ if ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) ) &&
( e->type() == TQEvent::AccelOverride ) ) {
- TQKeyEvent *ke = static_cast<TQKeyEvent*>( e );
+ TQKeyEvent *ke = TQT_TQKEYEVENT( e );
if ( ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Tab ) {
ke->accept();
return true;
}
}
- if ( ( obj == this ) &&
+ if ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) ) &&
( e->type() == TQEvent::KeyPress || e->type() == TQEvent::KeyRelease ) &&
completionBox()->isVisible() ) {
- TQKeyEvent *ke = static_cast<TQKeyEvent*>( e );
+ TQKeyEvent *ke = TQT_TQKEYEVENT( e );
int currentIndex = completionBox()->currentItem();
if ( currentIndex < 0 ) {
return true;