From 9a3f0aacd44fb866833ebcb852df3cd31475cb33 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khotkeys/app/app.cpp | 2 +- khotkeys/kcontrol/condition_list_widget.cpp | 2 +- khotkeys/shared/actions.cpp | 8 ++++---- khotkeys/shared/gestures.cpp | 4 ++-- khotkeys/shared/input.cpp | 8 ++++---- khotkeys/shared/khotkeysglobal.cpp | 2 +- khotkeys/shared/settings.cpp | 2 +- khotkeys/shared/triggers.cpp | 8 ++++---- khotkeys/shared/voices.cpp | 4 ++-- khotkeys/shared/windows.cpp | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) (limited to 'khotkeys') diff --git a/khotkeys/app/app.cpp b/khotkeys/app/app.cpp index d56ff1eb2..3391ca1aa 100644 --- a/khotkeys/app/app.cpp +++ b/khotkeys/app/app.cpp @@ -112,7 +112,7 @@ int KDE_EXPORT kdemain( int argc, char** argv ) XCloseDisplay(dpy); dpy = 0; - if ((pos = displayname.tqfindRev('.')) != -1) + if ((pos = displayname.findRev('.')) != -1) displayname.remove(pos, 10); TQCString env; diff --git a/khotkeys/kcontrol/condition_list_widget.cpp b/khotkeys/kcontrol/condition_list_widget.cpp index d172f5277..b526d34ef 100644 --- a/khotkeys/kcontrol/condition_list_widget.cpp +++ b/khotkeys/kcontrol/condition_list_widget.cpp @@ -321,7 +321,7 @@ void Condition_list_widget::edit_listview_item( Condition_list_item* item_P ) { Condition* old_cond = item_P->condition(); item_P->set_condition( new_condition ); - int pos = conditions.tqfind( old_cond ); + int pos = conditions.find( old_cond ); if( pos >= 0 ) { conditions.remove( pos ); // we own it diff --git a/khotkeys/shared/actions.cpp b/khotkeys/shared/actions.cpp index a58b85c8c..e37ef395f 100644 --- a/khotkeys/shared/actions.cpp +++ b/khotkeys/shared/actions.cpp @@ -124,7 +124,7 @@ void Command_url_action::execute() kapp->propagateSessionManager(); sm_ready = true; } -// int space_pos = command_url().tqfind( ' ' ); +// int space_pos = command_url().find( ' ' ); // if( command_url()[ 0 ] != '\'' && command_url()[ 0 ] != '"' && space_pos > -1 // && command_url()[ space_pos - 1 ] != '\\' ) // cmd = command_url().left( space_pos ); // get first 'word' @@ -286,7 +286,7 @@ void Dcop_action::execute() // one word if( pos != 0 ) args_str = args_str.mid( pos ); - int nxt_pos = args_str.tqfind( ' ' ); + int nxt_pos = args_str.find( ' ' ); args_list.append( args_str.left( nxt_pos )); // should be ok if nxt_pos is -1 args_str = nxt_pos >= 0 ? args_str.mid( nxt_pos ) : ""; } @@ -372,7 +372,7 @@ void Keyboard_input_action::execute() w = InputFocus; } int last_index = -1, start = 0; - while(( last_index = input().tqfind( ':', last_index + 1 )) != -1 ) // find next ';' + while(( last_index = input().find( ':', last_index + 1 )) != -1 ) // find next ';' { TQString key = input().mid( start, last_index - start ).stripWhiteSpace(); if( key == "Enter" && KKey( key ).keyCodeQt() == 0 ) @@ -391,7 +391,7 @@ void Keyboard_input_action::execute() TQString Keyboard_input_action::description() const { TQString tmp = input(); - tmp.tqreplace( '\n', ' ' ); + tmp.replace( '\n', ' ' ); tmp.truncate( 30 ); return i18n( "Keyboard input : " ) + tmp; } diff --git a/khotkeys/shared/gestures.cpp b/khotkeys/shared/gestures.cpp index 620d8d2ed..60b1d93b4 100644 --- a/khotkeys/shared/gestures.cpp +++ b/khotkeys/shared/gestures.cpp @@ -105,7 +105,7 @@ void Gesture::active_window_changed( WId ) void Gesture::register_handler( TQObject* receiver_P, const char* slot_P ) { - if( handlers.tqcontains( receiver_P )) + if( handlers.contains( receiver_P )) return; handlers[ receiver_P ] = true; connect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )), @@ -116,7 +116,7 @@ void Gesture::register_handler( TQObject* receiver_P, const char* slot_P ) void Gesture::unregister_handler( TQObject* receiver_P, const char* slot_P ) { - if( !handlers.tqcontains( receiver_P )) + if( !handlers.contains( receiver_P )) return; handlers.remove( receiver_P ); disconnect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )), diff --git a/khotkeys/shared/input.cpp b/khotkeys/shared/input.cpp index 90e789282..190b5dd04 100644 --- a/khotkeys/shared/input.cpp +++ b/khotkeys/shared/input.cpp @@ -97,7 +97,7 @@ void Kbd::deactivate_receiver( Kbd_receiver* receiver_P ) void Kbd::grab_shortcut( const KShortcut& shortcut_P ) { - if( grabs.tqcontains( shortcut_P )) + if( grabs.contains( shortcut_P )) ++grabs[ shortcut_P ]; else { @@ -117,7 +117,7 @@ void Kbd::grab_shortcut( const KShortcut& shortcut_P ) void Kbd::ungrab_shortcut( const KShortcut& shortcut_P ) { - if( !grabs.tqcontains( shortcut_P )) + if( !grabs.contains( shortcut_P )) return; if( --grabs[ shortcut_P ] == 0 ) { @@ -142,12 +142,12 @@ void Kbd::key_slot( TQString key_P ) { kdDebug( 1217 ) << "Key pressed:" << key_P << endl; KShortcut shortcut( key_P ); - if( !grabs.tqcontains( shortcut )) + if( !grabs.contains( shortcut )) return; for( TQMap< Kbd_receiver*, Receiver_data >::ConstIterator it = tqreceivers.begin(); it != tqreceivers.end(); ++it ) - if( ( *it ).shortcuts.tqcontains( shortcut ) && ( *it ).active + if( ( *it ).shortcuts.contains( shortcut ) && ( *it ).active && it.key()->handle_key( shortcut )) return; } diff --git a/khotkeys/shared/khotkeysglobal.cpp b/khotkeys/shared/khotkeysglobal.cpp index 8eb159d3c..4c6b8360c 100644 --- a/khotkeys/shared/khotkeysglobal.cpp +++ b/khotkeys/shared/khotkeysglobal.cpp @@ -65,7 +65,7 @@ TQString get_menu_entry_from_path( const TQString& path_P ) for( TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it ) - if( path_P.tqfind( *it ) == 0 ) + if( path_P.find( *it ) == 0 ) { TQString ret = path_P; ret.remove( 0, (*it).length()); diff --git a/khotkeys/shared/settings.cpp b/khotkeys/shared/settings.cpp index a6434be06..fdab2be56 100644 --- a/khotkeys/shared/settings.cpp +++ b/khotkeys/shared/settings.cpp @@ -63,7 +63,7 @@ bool Settings::read_settings( KConfig& cfg_P, bool include_disabled_P, ImportTyp TQString import_id = cfg_P.readEntry( "ImportId" ); if( !import_id.isEmpty()) { - if( already_imported.tqcontains( import_id )) + if( already_imported.contains( import_id )) { if( import_P == ImportSilent || KMessageBox::warningContinueCancel( NULL, diff --git a/khotkeys/shared/triggers.cpp b/khotkeys/shared/triggers.cpp index b3042f00f..7cac2b98c 100644 --- a/khotkeys/shared/triggers.cpp +++ b/khotkeys/shared/triggers.cpp @@ -225,7 +225,7 @@ void Window_trigger::window_added( WId window_P ) void Window_trigger::window_removed( WId window_P ) { - if( existing_windows.tqcontains( window_P )) + if( existing_windows.contains( window_P )) { bool matches = existing_windows[ window_P ]; kdDebug( 1217 ) << "Window_trigger::w_removed() : " << matches << endl; @@ -244,7 +244,7 @@ void Window_trigger::window_removed( WId window_P ) void Window_trigger::active_window_changed( WId window_P ) { bool was_match = false; - if( existing_windows.tqcontains( last_active_window )) + if( existing_windows.contains( last_active_window )) was_match = existing_windows[ last_active_window ]; if( active && was_match && ( window_actions & WINDOW_DEACTIVATES )) { @@ -253,7 +253,7 @@ void Window_trigger::active_window_changed( WId window_P ) } /* bool matches = windows()->match( Window_data( window_P )); existing_windows[ window_P ] = matches;*/ - bool matches = existing_windows.tqcontains( window_P ) + bool matches = existing_windows.contains( window_P ) ? existing_windows[ window_P ] : false; if( active && matches && ( window_actions & WINDOW_ACTIVATES )) { @@ -272,7 +272,7 @@ void Window_trigger::window_changed( WId window_P, unsigned int dirty_P ) return; kdDebug( 1217 ) << "Window_trigger::w_changed()" << endl; bool was_match = false; - if( existing_windows.tqcontains( window_P )) + if( existing_windows.contains( window_P )) was_match = existing_windows[ window_P ]; bool matches = windows()->match( Window_data( window_P )); existing_windows[ window_P ] = matches; diff --git a/khotkeys/shared/voices.cpp b/khotkeys/shared/voices.cpp index e19f66eec..a6515fecf 100644 --- a/khotkeys/shared/voices.cpp +++ b/khotkeys/shared/voices.cpp @@ -79,7 +79,7 @@ void Voice::enable( bool enabled_P ) void Voice::register_handler( Voice_trigger *trigger_P ) { - if( !_references.tqcontains( trigger_P )) + if( !_references.contains( trigger_P )) _references.append(trigger_P); } @@ -179,7 +179,7 @@ void Voice::slot_sound_recorded(const Sound &sound_P) //kdDebug(1217) << k_funcinfo << keyNative.key().toString() << endl; - if(_shortcut.tqcontains(keyNative)) + if(_shortcut.contains(keyNative)) { if(pEvent->type == XKeyPress && !_recording ) { diff --git a/khotkeys/shared/windows.cpp b/khotkeys/shared/windows.cpp index a1394b731..b8e86f694 100644 --- a/khotkeys/shared/windows.cpp +++ b/khotkeys/shared/windows.cpp @@ -339,7 +339,7 @@ bool Windowdef_simple::is_substr_match( const TQString& str1_P, const TQString& case NOT_IMPORTANT : return true; case CONTAINS : - return str1_P.tqcontains( str2_P ) > 0; + return str1_P.contains( str2_P ) > 0; case IS : return str1_P == str2_P; case REGEXP : @@ -348,7 +348,7 @@ bool Windowdef_simple::is_substr_match( const TQString& str1_P, const TQString& return rg.search( str1_P ) >= 0; } case CONTAINS_NOT : - return str1_P.tqcontains( str2_P ) == 0; + return str1_P.contains( str2_P ) == 0; case IS_NOT : return str1_P != str2_P; case REGEXP_NOT : -- cgit v1.2.1