From 937b2991d8e78166eea904c80ad04d34607017a4 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/kdenetwork@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- wifi/interface_wireless_wirelessextensions.cpp | 36 +++++++++++++------------- wifi/kcmwifi/vendorconfig.cpp | 12 ++++----- wifi/kcmwifi/wificonfig.cpp | 18 ++++++------- wifi/kwifimanager.cpp | 4 +-- 4 files changed, 35 insertions(+), 35 deletions(-) (limited to 'wifi') diff --git a/wifi/interface_wireless_wirelessextensions.cpp b/wifi/interface_wireless_wirelessextensions.cpp index 22fa96ae..aad56fa6 100644 --- a/wifi/interface_wireless_wirelessextensions.cpp +++ b/wifi/interface_wireless_wirelessextensions.cpp @@ -313,7 +313,7 @@ TQStringList Interface_wireless_wirelessextensions::available_wifi_devices() TQString device; while (!procnetdev.atEnd()) { procnetdev.readLine (device, 9999); - int pos = device.tqfind (':'); + int pos = device.find (':'); if (pos == -1) continue; device = device.left(pos).stripWhiteSpace(); @@ -353,7 +353,7 @@ bool Interface_wireless_wirelessextensions::autodetect_device() wireless_info info; int result = get_info (socket, device, info); if ((result != -ENODEV) && (result != -ENOTSUP) && - (!ignoreInterfaces || ignoreInterfaces->tqfindIndex(device)==-1)) + (!ignoreInterfaces || ignoreInterfaces->findIndex(device)==-1)) { setActiveDevice(device); } @@ -564,29 +564,29 @@ Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist ) while ( iwlist->readln ( data, true ) >= 0 ) { kdDebug ( ) << "iwlist: " << data << "\n"; - if ( data.tqcontains ( "does not support scanning" ) ) + if ( data.contains ( "does not support scanning" ) ) KMessageBox::sorry ( 0, i18n ( "Your card does not support scanning. The results window will not contain any results." ), i18n ( "Scanning not possible" ) ); - if ( data.tqcontains ( "Scan completed" ) ) + if ( data.contains ( "Scan completed" ) ) cellcount = 0; // at the very beginning of a scan - if ( data.tqcontains ( "Cell" ) ) { + if ( data.contains ( "Cell" ) ) { cellcount++; // new cell discovered networks->setNumRows ( networks->numRows() +1 ); ignoreRemainingBits = false; } - if ( data.tqcontains ( "ESSID:" ) ) + if ( data.contains ( "ESSID:" ) ) { - TQString ssid = data.mid ( data.tqfind ( "\"" ) + 1, data.length ( ) - data.tqfind ( "\"" ) - 2 ); + TQString ssid = data.mid ( data.find ( "\"" ) + 1, data.length ( ) - data.find ( "\"" ) - 2 ); if ((ssid=="") || (ssid==" ")) ssid = "(hidden cell)"; networks->setText ( cellcount - 1, 0, ssid ); } - if ( data.tqcontains ( "Mode:" ) ) + if ( data.contains ( "Mode:" ) ) { - if ( data.tqcontains ( "Master" ) ) + if ( data.contains ( "Master" ) ) networks->setText ( cellcount - 1, 1, TQString ( i18n ( "Managed" ) ) ); - if ( data.tqcontains ( "Ad-Hoc" ) ) + if ( data.contains ( "Ad-Hoc" ) ) networks->setText ( cellcount - 1, 1, TQString ( i18n ( "Ad-Hoc" ) ) ); // if could be that this cell belongs to an SSID already discovered, or that there are more than one // hidden cells, which doesn't give any new information. So, we first search for duplicates and delete @@ -605,31 +605,31 @@ Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist ) } } } - if ( !ignoreRemainingBits && data.tqcontains ( "Encryption key:" ) ) + if ( !ignoreRemainingBits && data.contains ( "Encryption key:" ) ) { - if ( data.tqcontains ( "off" ) ) + if ( data.contains ( "off" ) ) networks->setText ( cellcount - 1, 3, TQString ( "off" ) ); else networks->setText ( cellcount - 1, 3, TQString ( "on" ) ); } - if ( !ignoreRemainingBits && data.tqcontains ( "Quality:" ) ) + if ( !ignoreRemainingBits && data.contains ( "Quality:" ) ) { - TQString quality = data.mid ( data.tqfind ( ":" ) + 1, data.tqfind ( "/" ) - data.tqfind ( ":" ) - 1 ); + TQString quality = data.mid ( data.find ( ":" ) + 1, data.find ( "/" ) - data.find ( ":" ) - 1 ); networks->setText ( cellcount - 1, 2, quality ); } - if ( !ignoreRemainingBits && data.tqcontains ( "Quality=" ) ) + if ( !ignoreRemainingBits && data.contains ( "Quality=" ) ) { - TQString quality = data.mid ( data.tqfind ( "=" ) + 1, data.tqfind ( "/" ) - data.tqfind ( "=" ) - 1 ); + TQString quality = data.mid ( data.find ( "=" ) + 1, data.find ( "/" ) - data.find ( "=" ) - 1 ); networks->setText ( cellcount - 1, 2, quality ); } - if ( !ignoreRemainingBits && data.tqcontains ( "wpa_ie" ) ) + if ( !ignoreRemainingBits && data.contains ( "wpa_ie" ) ) { networks->setText ( cellcount - 1, 3, TQString ( "WPA" ) ); } - if ( !ignoreRemainingBits && data.tqcontains ( "rsn_ie" ) ) + if ( !ignoreRemainingBits && data.contains ( "rsn_ie" ) ) { networks->setText ( cellcount - 1, 3, TQString ( "WPA2" ) ); } diff --git a/wifi/kcmwifi/vendorconfig.cpp b/wifi/kcmwifi/vendorconfig.cpp index 01936667..395cbc58 100644 --- a/wifi/kcmwifi/vendorconfig.cpp +++ b/wifi/kcmwifi/vendorconfig.cpp @@ -89,7 +89,7 @@ VendorConfig::initSuSE_92plus ( ) TQString var = buffer.section ( '=', 0, 0 ); TQString value = buffer.section ( '=', 1, 1 ); value = value.mid ( 1, value.length ( ) - 3 ); - kdDebug ( ) << "Variable " << var << " tqcontains " << value << ".\n"; + kdDebug ( ) << "Variable " << var << " contains " << value << ".\n"; // evaluate the meaningful lines if ( var == "WIRELESS_ESSID" ) { @@ -182,7 +182,7 @@ is incremented _after_ successful setup of each given config. */ // lines look like wireless-defaultkey bla, so split it into wireless-defaultkey and bla TQString var = buffer.section ( ' ', 0, 0 ); TQString value = buffer.section ( ' ', 1, 1 ); - kdDebug ( ) << "Variable " << var << " tqcontains " << value << ".\n"; + kdDebug ( ) << "Variable " << var << " contains " << value << ".\n"; // evaluate the meaningful lines if ( var.tqstartsWith ( "wireless", false ) ) { @@ -191,7 +191,7 @@ is incremented _after_ successful setup of each given config. */ newtab->le_networkName->setText ( value ); } - else if ( var.endsWith ( "mode" ) && !var.tqcontains ( "key" ) ) + else if ( var.endsWith ( "mode" ) && !var.contains ( "key" ) ) { newtab->cmb_wifiMode->setCurrentItem ( IfConfig::convertToWifiModeFromString ( value ) ); @@ -203,15 +203,15 @@ is incremented _after_ successful setup of each given config. */ newtab->cmb_speed->setCurrentItem ( IfConfig::convertToSpeedFromString ( value ) ); } - else if ( var.tqcontains ( "key" ) ) + else if ( var.contains ( "key" ) ) { // Could be any of key, key1, key2, ..., or defaultkey - if ( var.tqcontains ( "default" ) ) + if ( var.contains ( "default" ) ) { crypto->cmb_activeKey->setCurrentItem ( value.toInt ( ) ); } - else if ( var.tqcontains ( "mode" ) ) + else if ( var.contains ( "mode" ) ) { if ( value == "shared" || value == "sharedkey" || value == "restricted" ) { diff --git a/wifi/kcmwifi/wificonfig.cpp b/wifi/kcmwifi/wificonfig.cpp index 1f3087ba..bce6afd9 100644 --- a/wifi/kcmwifi/wificonfig.cpp +++ b/wifi/kcmwifi/wificonfig.cpp @@ -246,9 +246,9 @@ TQString WifiConfig::autoDetectInterface() while ( !procFile.atEnd() ) { procFile.readLine( line, 9999 ); - if ( line.tqfind( ":" ) > 0 ) + if ( line.find( ":" ) > 0 ) { - line.truncate ( line.tqfind( ":" ) ); + line.truncate ( line.find( ":" ) ); list.append( line.stripWhiteSpace() ); } } @@ -264,7 +264,7 @@ TQString WifiConfig::autoDetectInterface() for ( TQStringList::Iterator it = list.begin (); it != list.end (); ++it ) { - if ( ((*it).tqcontains("wifi"))==0 ) { // if the name is wifiX, ignore + if ( ((*it).contains("wifi"))==0 ) { // if the name is wifiX, ignore KProcIO test; test << "iwconfig"; test << *it; @@ -288,9 +288,9 @@ void WifiConfig::slotTestInterface( KProcIO *proc ) { TQString output; proc->readln( output ); - if ( output.tqfind ( "no wireless extensions" ) == -1 ) + if ( output.find ( "no wireless extensions" ) == -1 ) { - output.truncate( output.tqfind ( " " ) ); + output.truncate( output.find ( " " ) ); m_detectedInterface = output.stripWhiteSpace(); printf("[kcontrol wificonfig] Wireless extensions not available on specified interface\n\r"); } @@ -328,7 +328,7 @@ Key IfConfig::activeKey() IfConfig::Speed IfConfig::convertToSpeedFromString( const TQString &s ) { - return ( IfConfig::Speed )speedList.tqfindIndex( s ); + return ( IfConfig::Speed )speedList.findIndex( s ); } void IfConfig::speedFromString( const TQString &s ) @@ -338,7 +338,7 @@ void IfConfig::speedFromString( const TQString &s ) IfConfig::WifiMode IfConfig::convertToWifiModeFromString( const TQString &s ) { - return ( IfConfig::WifiMode )wifiModeList.tqfindIndex( s ); + return ( IfConfig::WifiMode )wifiModeList.findIndex( s ); } void IfConfig::wifimodeFromString( const TQString &s ) @@ -348,7 +348,7 @@ void IfConfig::wifimodeFromString( const TQString &s ) IfConfig::CryptoMode IfConfig::convertToCryptoModeFromString( const TQString &s ) { - return ( IfConfig::CryptoMode )cryptoModeList.tqfindIndex( s ); + return ( IfConfig::CryptoMode )cryptoModeList.findIndex( s ); } void IfConfig::cryptomodeFromString( const TQString &s ) @@ -358,7 +358,7 @@ void IfConfig::cryptomodeFromString( const TQString &s ) IfConfig::PowerMode IfConfig::convertToPowerModeFromString( const TQString &s ) { - return ( IfConfig::PowerMode )powerModeList.tqfindIndex( s ); + return ( IfConfig::PowerMode )powerModeList.findIndex( s ); } void IfConfig::powermodeFromString( const TQString &s ) diff --git a/wifi/kwifimanager.cpp b/wifi/kwifimanager.cpp index 8cc88943..b7d49abb 100644 --- a/wifi/kwifimanager.cpp +++ b/wifi/kwifimanager.cpp @@ -163,9 +163,9 @@ KWiFiManagerApp::init_whois_db () while (datei.readLine (content, 255) != -1) { TQString temp (content); - content.truncate (content.tqfind (' ')); + content.truncate (content.find (' ')); content = content.upper (); - content2 = temp.right (temp.length () - temp.tqfind (' ') - 1); + content2 = temp.right (temp.length () - temp.find (' ') - 1); content2.truncate (content2.length () - 1); APs << content << content2; } -- cgit v1.2.3