diff options
Diffstat (limited to 'kdecore')
56 files changed, 332 insertions, 332 deletions
diff --git a/kdecore/kaccel.cpp b/kdecore/kaccel.cpp index 81bdf6295..75cd7aecf 100644 --- a/kdecore/kaccel.cpp +++ b/kdecore/kaccel.cpp @@ -303,7 +303,7 @@ void KAccelPrivate::slotKeyPressed( int id ) { kdDebug(125) << "KAccelPrivate::slotKeyPressed( " << id << " )" << endl; - if( m_mapIDToKey.tqcontains( id ) ) { + if( m_mapIDToKey.contains( id ) ) { KKey key = m_mapIDToKey[id]; KKeySequence seq( key ); TQPopupMenu* pMenu = createPopupMenu( m_pWatch, seq ); @@ -357,7 +357,7 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) if( (*it) == keyCodeQt ) { int nID = it.key(); kdDebug(125) << "shortcut found!" << endl; - if( m_mapIDToAction.tqcontains( nID ) ) { + if( m_mapIDToAction.contains( nID ) ) { // TODO: reduce duplication between here and slotMenuActivated KAccelAction* pAction = m_mapIDToAction[nID]; if( !pAction->isEnabled() ) @@ -608,7 +608,7 @@ void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action if( !pAction || s.isEmpty() ) return; - int i = s.tqfind( '\t' ); + int i = s.find( '\t' ); TQString k = pAction->shortcut().seq(0).toString(); if( k.isEmpty() ) diff --git a/kdecore/kaccelbase.cpp b/kdecore/kaccelbase.cpp index 7f604b2b6..4ba4c9c3b 100644 --- a/kdecore/kaccelbase.cpp +++ b/kdecore/kaccelbase.cpp @@ -77,7 +77,7 @@ const KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) const KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key ) { - if( !m_mapKeyToAction.tqcontains( key ) ) + if( !m_mapKeyToAction.contains( key ) ) return 0; // Note: If more than one action is connected to a single key, nil will be returned. return m_mapKeyToAction[key].pAction; @@ -355,7 +355,7 @@ bool KAccelBase::updateConnections() if( bNonUnique ) { // Remove connection to single action if there is one - if( m_mapKeyToAction.tqcontains( key ) ) { + if( m_mapKeyToAction.contains( key ) ) { KAccelAction* pAction = m_mapKeyToAction[key].pAction; if( pAction ) { m_mapKeyToAction.remove( key ); @@ -378,7 +378,7 @@ bool KAccelBase::updateConnections() const KKeyServer::Key& key = it.key(); KAccelAction* pAction = (*it).pAction; // If this key is longer used or it points to a different action now, - if( !mapKeyToAction.tqcontains( key ) || mapKeyToAction[key].pAction != pAction ) { + if( !mapKeyToAction.contains( key ) || mapKeyToAction[key].pAction != pAction ) { if( pAction ) { disconnectKey( *pAction, key ); pAction->decConnections(); @@ -393,7 +393,7 @@ bool KAccelBase::updateConnections() for( KKeyToActionMap::iterator it = mapKeyToAction.begin(); it != mapKeyToAction.end(); ++it ) { const KKeyServer::Key& key = it.key(); KAccelAction* pAction = (*it).pAction; - if( !m_mapKeyToAction.tqcontains( key ) || m_mapKeyToAction[key].pAction != pAction ) { + if( !m_mapKeyToAction.contains( key ) || m_mapKeyToAction[key].pAction != pAction ) { // TODO: Decide what to do if connect fails. // Probably should remove this item from map. if( pAction ) { @@ -470,7 +470,7 @@ bool KAccelBase::insertConnection( KAccelAction* pAction ) //if( !key.isNull() ) { if( key.sym() ) { - if( !m_mapKeyToAction.tqcontains( key ) ) { + if( !m_mapKeyToAction.contains( key ) ) { // If this is a single-key shortcut, if( pAction->shortcut().seq(iSeq).count() == 1 ) { m_mapKeyToAction[key] = ActionInfo( pAction, iSeq, iVari ); @@ -481,7 +481,7 @@ bool KAccelBase::insertConnection( KAccelAction* pAction ) else { m_mapKeyToAction[key] = ActionInfo( 0, 0, 0 ); // Insert into non-unique list if it's not already there. - if( m_rgActionsNonUnique.tqfindIndex( pAction ) == -1 ) + if( m_rgActionsNonUnique.findIndex( pAction ) == -1 ) m_rgActionsNonUnique.append( pAction ); if( connectKey( key ) ) pAction->incConnections(); @@ -523,7 +523,7 @@ bool KAccelBase::removeConnection( KAccelAction* pAction ) //for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) // kdDebug(125) << "\tKey: " << it.key().toString() << " => '" << (*it)->m_sName << "'" << " " << *it << endl; - if( m_rgActionsNonUnique.tqfindIndex( pAction ) >= 0 ) { + if( m_rgActionsNonUnique.findIndex( pAction ) >= 0 ) { mtemp_pActionRemoving = pAction; bool b = updateConnections(); mtemp_pActionRemoving = 0; @@ -591,7 +591,7 @@ TQPopupMenu* KAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& // If an action has already been inserted into the menu // and we have a label instead of an action here, // then indicate that we should insert a separator before the next menu entry. - if( bActionInserted && !pAction->isConfigurable() && pAction->name().tqcontains( ':' ) ) + if( bActionInserted && !pAction->isConfigurable() && pAction->name().contains( ':' ) ) bInsertSeparator = true; for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) { diff --git a/kdecore/kaccelmanager.cpp b/kdecore/kaccelmanager.cpp index 40e3710c8..7dc49ce78 100644 --- a/kdecore/kaccelmanager.cpp +++ b/kdecore/kaccelmanager.cpp @@ -145,7 +145,7 @@ bool KAcceleratorManagerPrivate::standardName(const TQString &str) { if (!kaccmp_sns) kaccmp_sns_d.setObject(kaccmp_sns, new TQStringList(KStdAction::internal_stdNames())); - return kaccmp_sns->tqcontains(str); + return kaccmp_sns->contains(str); } KAcceleratorManagerPrivate::Item::~Item() @@ -224,7 +224,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use { if (it->m_index >= 0) { - TQMenuItem *mitem = menuBar->tqfindItem(menuBar->idAt(it->m_index)); + TQMenuItem *mitem = menuBar->findItem(menuBar->idAt(it->m_index)); if (mitem) { checkChange(contents[cnt]); @@ -240,12 +240,12 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use if ( dynamic_cast<TQLabel*>( it->m_widget ) && it->m_widget->inherits("KURLLabel") ) continue; - int tprop = it->m_widget->tqmetaObject()->tqfindProperty("text", true); + int tprop = it->m_widget->tqmetaObject()->findProperty("text", true); if (tprop != -1) { if (checkChange(contents[cnt])) it->m_widget->setProperty("text", contents[cnt].accelerated()); } else { - tprop = it->m_widget->tqmetaObject()->tqfindProperty("title", true); + tprop = it->m_widget->tqmetaObject()->findProperty("title", true); if (tprop != -1 && checkChange(contents[cnt])) it->m_widget->setProperty("title", contents[cnt].accelerated()); } @@ -271,7 +271,7 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item) if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast<TQPopupMenu*>(w) == NULL ) ) continue; - if ( KAcceleratorManagerPrivate::ignored_widgets.tqfind( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() ) + if ( KAcceleratorManagerPrivate::ignored_widgets.find( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() ) continue; manageWidget(w, item); @@ -341,7 +341,7 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) { TQString content; TQVariant variant; - int tprop = w->tqmetaObject()->tqfindProperty("text", true); + int tprop = w->tqmetaObject()->findProperty("text", true); if (tprop != -1) { const TQMetaProperty* p = w->tqmetaObject()->property( tprop, true ); if ( p && p->isValid() ) @@ -351,7 +351,7 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) } if (tprop == -1) { - tprop = w->tqmetaObject()->tqfindProperty("title", true); + tprop = w->tqmetaObject()->findProperty("title", true); if (tprop != -1) { const TQMetaProperty* p = w->tqmetaObject()->property( tprop, true ); if ( p && p->isValid() ) @@ -410,7 +410,7 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item) for (uint i=0; i<mbar->count(); ++i) { - mitem = mbar->tqfindItem(mbar->idAt(i)); + mitem = mbar->findItem(mbar->idAt(i)); if (!mitem) continue; @@ -479,18 +479,18 @@ void KAcceleratorManager::last_manage(TQString &added, TQString &changed, TQStr KAccelString::KAccelString(const TQString &input, int initialWeight) : m_pureText(input), m_weight() { - m_orig_accel = m_pureText.tqfind("(!)&"); + m_orig_accel = m_pureText.find("(!)&"); if (m_orig_accel != -1) m_pureText.remove(m_orig_accel, 4); - m_orig_accel = m_pureText.tqfind("(&&)"); + m_orig_accel = m_pureText.find("(&&)"); if (m_orig_accel != -1) m_pureText.replace(m_orig_accel, 4, "&"); m_origText = m_pureText; if (m_pureText.contains('\t')) - m_pureText = m_pureText.left(m_pureText.tqfind('\t')); + m_pureText = m_pureText.left(m_pureText.find('\t')); m_orig_accel = m_accel = stripAccelerator(m_pureText); @@ -599,7 +599,7 @@ int KAccelString::stripAccelerator(TQString &text) while (p >= 0) { - p = text.tqfind('&', p)+1; + p = text.find('&', p)+1; if (p <= 0 || p >= (int)text.length()) return -1; @@ -627,7 +627,7 @@ int KAccelString::maxWeight(int &index, const TQString &used) index = -1; for (uint pos=0; pos<m_pureText.length(); ++pos) - if (used.tqfind(m_pureText[pos], 0, FALSE) == -1 && m_pureText[pos].latin1() != 0) + if (used.find(m_pureText[pos], 0, FALSE) == -1 && m_pureText[pos].latin1() != 0) if (m_weight[pos] > max) { max = m_weight[pos]; @@ -786,7 +786,7 @@ void KPopupAccelManager::findMenuEntries(KAccelStringList &list) // read out the menu entries for (uint i=0; i<m_popup->count(); i++) { - mitem = m_popup->tqfindItem(m_popup->idAt(i)); + mitem = m_popup->findItem(m_popup->idAt(i)); if (mitem->isSeparator()) continue; @@ -813,7 +813,7 @@ void KPopupAccelManager::setMenuEntries(const KAccelStringList &list) uint cnt = 0; for (uint i=0; i<m_popup->count(); i++) { - mitem = m_popup->tqfindItem(m_popup->idAt(i)); + mitem = m_popup->findItem(m_popup->idAt(i)); if (mitem->isSeparator()) continue; diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp index a1df33463..292105835 100644 --- a/kdecore/kapplication.cpp +++ b/kdecore/kapplication.cpp @@ -1185,9 +1185,9 @@ void KApplication::propagateSessionManager() TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver")); TQCString display = ::getenv(DISPLAY); // strip the screen number from the display - display.tqreplace(TQRegExp("\\.[0-9]+$"), ""); + display.replace(TQRegExp("\\.[0-9]+$"), ""); int i; - while( (i = display.tqfind(':')) >= 0) + while( (i = display.find(':')) >= 0) display[i] = '_'; fName += "_"+display; @@ -1244,7 +1244,7 @@ void KApplication::commitData( TQSessionManager& sm ) } else { w = list->next(); } - while ( w && done.tqcontainsRef( w ) ) + while ( w && done.containsRef( w ) ) w = list->next(); } delete list; @@ -1909,7 +1909,7 @@ void KApplication::invokeEditSlot( const char *slot ) TQMetaObject *meta = object->tqmetaObject(); - int idx = meta->tqfindSlot( slot + 1, true ); + int idx = meta->findSlot( slot + 1, true ); if( idx < 0 ) return; @@ -2846,7 +2846,7 @@ TQString KApplication::tempSaveName( const TQString& pFilename ) const } } - aFilename.tqreplace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); + aFilename.replace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); return aFilename; } @@ -2875,7 +2875,7 @@ TQString KApplication::checkRecoverFile( const TQString& pFilename, } } - aFilename.tqreplace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); + aFilename.replace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); if( TQFile( aFilename ).exists() ) { @@ -2908,7 +2908,7 @@ bool checkAccess(const TQString& pathname, int mode) //strip the filename (everything until '/' from the end TQString dirName(pathname); - int pos = dirName.tqfindRev('/'); + int pos = dirName.findRev('/'); if ( pos == -1 ) return false; // No path in argument. This is evil, we won't allow this else if ( pos == 0 ) // don't turn e.g. /root into an empty string @@ -3123,18 +3123,18 @@ void KApplication::initUrlActionRestrictions() bool bEnabled = (strEnabled == "true"); if (refPath.startsWith("$HOME")) - refPath.tqreplace(0, 5, TQDir::homeDirPath()); + refPath.replace(0, 5, TQDir::homeDirPath()); else if (refPath.startsWith("~")) - refPath.tqreplace(0, 1, TQDir::homeDirPath()); + refPath.replace(0, 1, TQDir::homeDirPath()); if (urlPath.startsWith("$HOME")) - urlPath.tqreplace(0, 5, TQDir::homeDirPath()); + urlPath.replace(0, 5, TQDir::homeDirPath()); else if (urlPath.startsWith("~")) - urlPath.tqreplace(0, 1, TQDir::homeDirPath()); + urlPath.replace(0, 1, TQDir::homeDirPath()); if (refPath.startsWith("$TMP")) - refPath.tqreplace(0, 4, KGlobal::dirs()->saveLocation("tmp")); + refPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp")); if (urlPath.startsWith("$TMP")) - urlPath.tqreplace(0, 4, KGlobal::dirs()->saveLocation("tmp")); + urlPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp")); d->urlActionRestrictions.append(new KApplicationPrivate::URLActionRule ( action, refProt, refHost, refPath, urlProt, urlHost, urlPath, bEnabled)); diff --git a/kdecore/kcharsets.cpp b/kdecore/kcharsets.cpp index 027dba367..b78345276 100644 --- a/kdecore/kcharsets.cpp +++ b/kdecore/kcharsets.cpp @@ -491,14 +491,14 @@ TQString KCharsets::languageForEncoding( const TQString &encoding ) TQString KCharsets::encodingForName( const TQString &descriptiveName ) { - const int left = descriptiveName.tqfindRev( '(' ); + const int left = descriptiveName.findRev( '(' ); if (left<0) // No parenthesis, so assume it is a normal encoding name return descriptiveName.stripWhiteSpace(); TQString name(descriptiveName.mid(left+1)); - const int right = name.tqfindRev( ')' ); + const int right = name.findRev( ')' ); if (right<0) return name; @@ -536,7 +536,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const if (n.isEmpty()) { codec = KGlobal::locale()->codecForEncoding(); - d->codecForNameDict.tqreplace("->locale<-", codec); + d->codecForNameDict.replace("->locale<-", codec); return codec; } @@ -553,7 +553,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const codec = TQTextCodec::codecForName(name); if(codec) { - d->codecForNameDict.tqreplace(key, codec); + d->codecForNameDict.replace(key, codec); return codec; } @@ -566,7 +566,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const if(codec) { - d->codecForNameDict.tqreplace(key, codec); + d->codecForNameDict.replace(key, codec); return codec; } @@ -642,7 +642,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const } if(codec) { - d->codecForNameDict.tqreplace(key, codec); + d->codecForNameDict.replace(key, codec); return codec; } @@ -654,7 +654,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const codec = TQTextCodec::codecForName(cname); if(codec) { - d->codecForNameDict.tqreplace(key, codec); + d->codecForNameDict.replace(key, codec); return codec; } diff --git a/kdecore/kclipboard.cpp b/kdecore/kclipboard.cpp index 03a4f916f..86250ea4f 100644 --- a/kdecore/kclipboard.cpp +++ b/kdecore/kclipboard.cpp @@ -72,11 +72,11 @@ public: return 0L; } virtual bool provides( const char *mimeType ) const { - return ( m_formats.tqfind( mimeType ) > -1 ); + return ( m_formats.find( mimeType ) > -1 ); } virtual TQByteArray tqencodedData( const char *format ) const { - int index = m_formats.tqfind( format ); + int index = m_formats.find( format ); if ( index > -1 ) return *(m_data.tqat( index )); diff --git a/kdecore/kcmdlineargs.cpp b/kdecore/kcmdlineargs.cpp index 93da1470b..10793b739 100644 --- a/kdecore/kcmdlineargs.cpp +++ b/kdecore/kcmdlineargs.cpp @@ -393,7 +393,7 @@ findOption(const KCmdLineOptions *options, TQCString &opt, if (!options->name) return result+0; TQCString nextOption = options->name; - int p = nextOption.tqfind(' '); + int p = nextOption.find(' '); if (p > 0) nextOption = nextOption.left(p); if (nextOption[0] == '!') @@ -432,7 +432,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, const char *opt_name; const char *def; TQCString argument; - int j = opt.tqfind('='); + int j = opt.find('='); if (j != -1) { argument = opt.mid(j+1); @@ -1081,9 +1081,9 @@ KCmdLineArgs::setOption(const TQCString &opt, bool enabled) } if (enabled) - parsedOptionList->tqreplace( opt, new TQCString("t") ); + parsedOptionList->replace( opt, new TQCString("t") ); else - parsedOptionList->tqreplace( opt, new TQCString("f") ); + parsedOptionList->replace( opt, new TQCString("f") ); } void @@ -1119,7 +1119,7 @@ KCmdLineArgs::getOption(const char *_opt) const TQCString *value = 0; if (parsedOptionList) { - value = parsedOptionList->tqfind(_opt); + value = parsedOptionList->find(_opt); } if (value) @@ -1199,7 +1199,7 @@ KCmdLineArgs::isSet(const char *_opt) const TQCString *value = 0; if (parsedOptionList) { - value = parsedOptionList->tqfind(opt); + value = parsedOptionList->find(opt); } if (value) diff --git a/kdecore/kcompletion.cpp b/kdecore/kcompletion.cpp index ce2f3c3b5..813b56027 100644 --- a/kdecore/kcompletion.cpp +++ b/kdecore/kcompletion.cpp @@ -150,7 +150,7 @@ void KCompletion::addWeightedItem( const TQString& item ) uint weight = 0; // find out the weighting of this item (appended to the string as ":num") - int index = item.tqfindRev(':'); + int index = item.findRev(':'); if ( index > 0 ) { bool ok; weight = item.mid( index + 1 ).toUInt( &ok ); @@ -274,7 +274,7 @@ TQStringList KCompletion::substringCompletion( const TQString& string ) const for( ; it != list.end(); ++it ) { TQString item = *it; - if ( item.tqfind( string, 0, false ) != -1 ) { // always case insensitive + if ( item.find( string, 0, false ) != -1 ) { // always case insensitive matches.append( item ); } } diff --git a/kdecore/kcompletionbase.cpp b/kdecore/kcompletionbase.cpp index 019f4ec6b..9e7f6d746 100644 --- a/kdecore/kcompletionbase.cpp +++ b/kdecore/kcompletionbase.cpp @@ -123,7 +123,7 @@ bool KCompletionBase::setKeyBinding( KeyBindingType item, const KShortcut& cut ) for( KeyBindingMap::Iterator it = m_keyMap.begin(); it != m_keyMap.end(); ++it ) if( it.data() == cut ) return false; } - m_keyMap.tqreplace( item, cut ); + m_keyMap.replace( item, cut ); return true; } diff --git a/kdecore/kconfig.cpp b/kdecore/kconfig.cpp index e40f23a19..2531034ee 100644 --- a/kdecore/kconfig.cpp +++ b/kdecore/kconfig.cpp @@ -144,7 +144,7 @@ TQMap<TQString, TQString> KConfig::entryMap(const TQString &pGroup) const KEntryKey groupKey( pGroup_utf, 0 ); TQMap<TQString, TQString> tmpMap; - KEntryMapConstIterator aIt = aEntryMap.tqfind(groupKey); + KEntryMapConstIterator aIt = aEntryMap.find(groupKey); if (aIt == aEntryMap.end()) return tmpMap; ++aIt; // advance past special group entry marker @@ -183,7 +183,7 @@ KEntryMap KConfig::internalEntryMap(const TQString &pGroup) const KEntryKey aKey(pGroup_utf, 0); KEntryMap tmpEntryMap; - aIt = aEntryMap.tqfind(aKey); + aIt = aEntryMap.find(aKey); if (aIt == aEntryMap.end()) { // the special group key is not in the map, // so it must be an invalid group. Return @@ -237,7 +237,7 @@ void KConfig::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGro KEntry KConfig::lookupData(const KEntryKey &_key) const { - KEntryMapConstIterator aIt = aEntryMap.tqfind(_key); + KEntryMapConstIterator aIt = aEntryMap.find(_key); if (aIt != aEntryMap.end()) { const KEntry &entry = *aIt; @@ -255,7 +255,7 @@ bool KConfig::internalHasGroup(const TQCString &group) const { KEntryKey groupKey( group, 0); - KEntryMapConstIterator aIt = aEntryMap.tqfind(groupKey); + KEntryMapConstIterator aIt = aEntryMap.find(groupKey); KEntryMapConstIterator aEnd = aEntryMap.end(); if (aIt == aEnd) @@ -290,7 +290,7 @@ void KConfig::checkUpdate(const TQString &id, const TQString &updateFile) setGroup("$Version"); TQString cfg_id = updateFile+":"+id; TQStringList ids = readListEntry("update_info"); - if (!ids.tqcontains(cfg_id)) + if (!ids.contains(cfg_id)) { TQStringList args; args << "--check" << updateFile; diff --git a/kdecore/kconfig_compiler/kconfig_compiler.cpp b/kdecore/kconfig_compiler/kconfig_compiler.cpp index fd2cbc405..10c91834c 100644 --- a/kdecore/kconfig_compiler/kconfig_compiler.cpp +++ b/kdecore/kconfig_compiler/kconfig_compiler.cpp @@ -284,7 +284,7 @@ static TQString dumpNode(const TQDomNode &node) static TQString filenameOnly(TQString path) { - int i = path.tqfindRev('/'); + int i = path.findRev('/'); if (i >= 0) return path.mid(i+1); return path; @@ -480,13 +480,13 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element ) if ( nameIsEmpty ) { name = key; - name.tqreplace( " ", TQString() ); - } else if ( name.tqcontains( ' ' ) ) { + name.replace( " ", TQString() ); + } else if ( name.contains( ' ' ) ) { kdWarning()<<"Entry '"<<name<<"' contains spaces! <name> elements can't contain speces!"<<endl; name.remove( ' ' ); } - if (name.tqcontains("$(")) + if (name.contains("$(")) { if (param.isEmpty()) { @@ -513,7 +513,7 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element ) { // Adjust name paramName = name; - name.tqreplace("$("+param+")", TQString()); + name.replace("$("+param+")", TQString()); // Lookup defaults for indexed entries for(int i = 0; i <= paramMax; i++) { @@ -534,7 +534,7 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element ) int i = index.toInt(&ok); if (!ok) { - i = paramValues.tqfindIndex(index); + i = paramValues.findIndex(index); if (i == -1) { kdError() << "Index '" << index << "' for default value is unknown." << endl; @@ -568,7 +568,7 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element ) return 0; } - if (allNames.tqcontains(name)) + if (allNames.contains(name)) { if (nameIsEmpty) kdError() << "The key '" << key << "' can not be used as name for the entry because " @@ -771,7 +771,7 @@ TQString paramString(const TQString &s, const CfgEntry *e, int i) { TQString result = s; TQString needle = "$("+e->param()+")"; - if (result.tqcontains(needle)) + if (result.contains(needle)) { TQString tmp; if (e->paramType() == "Enum") @@ -796,7 +796,7 @@ TQString paramString(const TQString &group, const TQValueList<Param> ¶meters for (TQValueList<Param>::ConstIterator it = parameters.begin(); it != parameters.end(); ++it) { - if (paramString.tqcontains("$("+(*it).name+")")) + if (paramString.contains("$("+(*it).name+")")) { TQString tmp; tmp.sprintf("%%%d", i++); @@ -1249,7 +1249,7 @@ int main( int argc, char **argv ) TQString t = e->type(); // Manipulator - if (allMutators || mutators.tqcontains(n)) + if (allMutators || mutators.contains(n)) { h << " /**" << endl; h << " Set " << e->label() << endl; @@ -1642,7 +1642,7 @@ int main( int argc, char **argv ) TQString t = e->type(); // Manipulator - if (allMutators || mutators.tqcontains(n)) + if (allMutators || mutators.contains(n)) { cpp << "void " << setFunction(n, className) << "( "; if (!e->param().isEmpty()) diff --git a/kdecore/kconfigbackend.cpp b/kdecore/kconfigbackend.cpp index 4fc63ebe6..633458d41 100644 --- a/kdecore/kconfigbackend.cpp +++ b/kdecore/kconfigbackend.cpp @@ -999,7 +999,7 @@ bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal, const KEntry ¤tEntry = *aIt; if(aIt.key().bDefault) { - aTempMap.tqreplace(aIt.key(), currentEntry); + aTempMap.replace(aIt.key(), currentEntry); continue; } @@ -1017,7 +1017,7 @@ bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal, // put this entry from the config object into the // temporary map, possibly replacing an existing entry - KEntryMapIterator aIt2 = aTempMap.tqfind(aIt.key()); + KEntryMapIterator aIt2 = aTempMap.find(aIt.key()); if (aIt2 != aTempMap.end() && (*aIt2).bImmutable) continue; // Bail out if the on-disk entry is immutable diff --git a/kdecore/kconfigbase.cpp b/kdecore/kconfigbase.cpp index 0b35f91e0..20d3f023c 100644 --- a/kdecore/kconfigbase.cpp +++ b/kdecore/kconfigbase.cpp @@ -272,7 +272,7 @@ TQString KConfigBase::readEntry( const char *pKey, if( expand || bExpand ) { // check for environment variables and make necessary translations - int nDollarPos = aValue.tqfind( '$' ); + int nDollarPos = aValue.find( '$' ); while( nDollarPos != -1 && nDollarPos+1 < static_cast<int>(aValue.length())) { // there is at least one $ @@ -328,7 +328,7 @@ TQString KConfigBase::readEntry( const char *pKey, aValue.remove( nDollarPos, 1 ); nDollarPos++; } - nDollarPos = aValue.tqfind( '$', nDollarPos ); + nDollarPos = aValue.find( '$', nDollarPos ); } } @@ -793,7 +793,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co TQString aValue = readEntry( pKey ); if( !aValue.isNull() ) { - if ( aValue.tqcontains( ',' ) > 5 ) { + if ( aValue.contains( ',' ) > 5 ) { // KDE3 and upwards entry if ( !aRetFont.fromString( aValue ) && pDefault ) aRetFont = *pDefault; @@ -802,7 +802,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co // backward compatibility with older font formats // ### remove KDE 3.1 ? // find first part (font family) - int nIndex = aValue.tqfind( ',' ); + int nIndex = aValue.find( ',' ); if( nIndex == -1 ){ if( pDefault ) aRetFont = *pDefault; @@ -812,7 +812,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co // find second part (point size) int nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex+1 ); + nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ if( pDefault ) aRetFont = *pDefault; @@ -824,7 +824,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co // find third part (style hint) nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex+1 ); + nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ if( pDefault ) @@ -836,7 +836,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co // find fourth part (char set) nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex+1 ); + nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ if( pDefault ) @@ -848,7 +848,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co nIndex-nOldIndex-1 ); // find fifth part (weight) nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex+1 ); + nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ if( pDefault ) @@ -979,7 +979,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey, bool bOK; // find first part (red) - int nIndex = aValue.tqfind( ',' ); + int nIndex = aValue.find( ',' ); if( nIndex == -1 ){ // return a sensible default -- Bernd @@ -992,7 +992,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey, // find second part (green) int nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex+1 ); + nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ // return a sensible default -- Bernd diff --git a/kdecore/kconfigdialogmanager.cpp b/kdecore/kconfigdialogmanager.cpp index 8db988709..97e741f65 100644 --- a/kdecore/kconfigdialogmanager.cpp +++ b/kdecore/kconfigdialogmanager.cpp @@ -131,13 +131,13 @@ void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *it TQVariant minValue = item->minValue(); if (minValue.isValid()) { - if (widget->tqmetaObject()->tqfindProperty("minValue", true) != -1) + if (widget->tqmetaObject()->findProperty("minValue", true) != -1) widget->setProperty("minValue", minValue); } TQVariant maxValue = item->maxValue(); if (maxValue.isValid()) { - if (widget->tqmetaObject()->tqfindProperty("maxValue", true) != -1) + if (widget->tqmetaObject()->findProperty("maxValue", true) != -1) widget->setProperty("maxValue", maxValue); } if (TQWhatsThis::textFor( widget ).isEmpty()) @@ -181,7 +181,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang setupWidget(childWidget, item); - TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.tqfind(childWidget->className()); + TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.find(childWidget->className()); if (changedIt == changedMap.end()) { @@ -189,7 +189,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang // it again using the super class name. This fixes a problem with using QtRuby/Korundum // widgets with KConfigXT where 'Qt::Widget' wasn't being seen a the real deal, even // though it was a 'QWidget'. - changedIt = changedMap.tqfind(childWidget->tqmetaObject()->tqsuperClassName()); + changedIt = changedMap.find(childWidget->tqmetaObject()->tqsuperClassName()); } if (changedIt == changedMap.end()) @@ -235,7 +235,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang #ifndef NDEBUG else if (widgetName) { - TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.tqfind(childWidget->className()); + TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.find(childWidget->className()); if (changedIt != changedMap.end()) { if ((!d->insideGroupBox || !childWidget->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING)) && @@ -283,7 +283,7 @@ void KConfigDialogManager::updateWidgets() if (item->isImmutable()) { widget->setEnabled(false); - TQWidget *buddy = d->buddyWidget.tqfind(it.currentKey()); + TQWidget *buddy = d->buddyWidget.find(it.currentKey()); if (buddy) buddy->setEnabled(false); } diff --git a/kdecore/kconfigskeleton.cpp b/kdecore/kconfigskeleton.cpp index 58b889018..b464f64d2 100644 --- a/kdecore/kconfigskeleton.cpp +++ b/kdecore/kconfigskeleton.cpp @@ -1203,5 +1203,5 @@ bool KConfigSkeleton::isImmutable(const TQString &name) KConfigSkeletonItem *KConfigSkeleton::findItem(const TQString &name) { - return mItemDict.tqfind(name); + return mItemDict.find(name); } diff --git a/kdecore/kdcoppropertyproxy.cpp b/kdecore/kdcoppropertyproxy.cpp index 22390a4c4..3742c509c 100644 --- a/kdecore/kdcoppropertyproxy.cpp +++ b/kdecore/kdcoppropertyproxy.cpp @@ -99,7 +99,7 @@ TQValueList<TQCString> KDCOPPropertyProxy::functions( TQObject *object ) TQStrListIterator it( properties ); for (; it.current(); ++it ) { - const TQMetaProperty *metaProp = metaObj->property( metaObj->tqfindProperty( it.current(), true ), true ); + const TQMetaProperty *metaProp = metaObj->property( metaObj->findProperty( it.current(), true ), true ); assert( metaProp ); @@ -314,7 +314,7 @@ bool KDCOPPropertyProxy::decodePropertyRequestInternal( const TQCString &fun, TQ propName.detach(); set = true; propName = propName.mid( 3 ); - int p1 = propName.tqfind( '(' ); + int p1 = propName.find( '(' ); uint len = propName.length(); @@ -328,7 +328,7 @@ bool KDCOPPropertyProxy::decodePropertyRequestInternal( const TQCString &fun, TQ else propName.truncate( propName.length() - 2 ); - if ( !object->tqmetaObject()->propertyNames( true ).tqcontains( propName ) ) + if ( !object->tqmetaObject()->propertyNames( true ).contains( propName ) ) return false; return true; diff --git a/kdecore/kde-config.cpp.cmake b/kdecore/kde-config.cpp.cmake index cd8cb3ae4..867e43789 100644 --- a/kdecore/kde-config.cpp.cmake +++ b/kdecore/kde-config.cpp.cmake @@ -37,64 +37,64 @@ TQString expandvars(const char *_input) return result; bool changed = false; - int index = result.tqfind("${prefix}"); + int index = result.find("${prefix}"); if (index >= 0) { - result = result.tqreplace(index, 9, "@CMAKE_INSTALL_PREFIX@"); + result = result.replace(index, 9, "@CMAKE_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("$(prefix)"); + index = result.find("$(prefix)"); if (index >= 0) { - result = result.tqreplace(index, 9, "@CMAKE_INSTALL_PREFIX@"); + result = result.replace(index, 9, "@CMAKE_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("${datadir}"); + index = result.find("${datadir}"); if (index >= 0) { - result = result.tqreplace(index, 10, "@SHARE_INSTALL_PREFIX@"); + result = result.replace(index, 10, "@SHARE_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("$(datadir)"); + index = result.find("$(datadir)"); if (index >= 0) { - result = result.tqreplace(index, 10, "@SHARE_INSTALL_PREFIX@"); + result = result.replace(index, 10, "@SHARE_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("${exec_prefix}"); + index = result.find("${exec_prefix}"); if (index >= 0) { - result = result.tqreplace(index, 14, "@EXEC_INSTALL_PREFIX@"); + result = result.replace(index, 14, "@EXEC_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("$(exec_prefix)"); + index = result.find("$(exec_prefix)"); if (index >= 0) { - result = result.tqreplace(index, 14, "@EXEC_INSTALL_PREFIX@"); + result = result.replace(index, 14, "@EXEC_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("${libdir}"); + index = result.find("${libdir}"); if (index >= 0) { - result = result.tqreplace(index, 9, "@LIB_INSTALL_DIR@"); + result = result.replace(index, 9, "@LIB_INSTALL_DIR@"); changed = true; } - index = result.tqfind("$(libdir)"); + index = result.find("$(libdir)"); if (index >= 0) { - result = result.tqreplace(index, 9, "@LIB_INSTALL_DIR@"); + result = result.replace(index, 9, "@LIB_INSTALL_DIR@"); changed = true; } - index = result.tqfind("${includedir}"); + index = result.find("${includedir}"); if (index >= 0) { - result = result.tqreplace(index, 20, "@INCLUDE_INSTALL_DIR@"); + result = result.replace(index, 20, "@INCLUDE_INSTALL_DIR@"); changed = true; } - index = result.tqfind("$(includedir)"); + index = result.find("$(includedir)"); if (index >= 0) { - result = result.tqreplace(index, 20, "@INCLUDE_INSTALL_DIR@"); + result = result.replace(index, 20, "@INCLUDE_INSTALL_DIR@"); changed = true; } - index = result.tqfind("${sysconfdir}"); + index = result.find("${sysconfdir}"); if (index >= 0) { - result = result.tqreplace(index, 13, "@SYSCONF_INSTALL_DIR@"); + result = result.replace(index, 13, "@SYSCONF_INSTALL_DIR@"); changed = true; } - index = result.tqfind("$(sysconfdir)"); + index = result.find("$(sysconfdir)"); if (index >= 0) { - result = result.tqreplace(index, 13, "@SYSCONF_INSTALL_DIR@"); + result = result.replace(index, 13, "@SYSCONF_INSTALL_DIR@"); changed = true; } if (changed) diff --git a/kdecore/kde-config.cpp.in b/kdecore/kde-config.cpp.in index eac5f43cf..ec9f24133 100644 --- a/kdecore/kde-config.cpp.in +++ b/kdecore/kde-config.cpp.in @@ -37,62 +37,62 @@ TQString expandvars(const char *_input) return result; bool changed = false; - int index = result.tqfind("${prefix}"); + int index = result.find("${prefix}"); if (index >= 0) { result = result.replace(index, 9, "@prefix@"); changed = true; } - index = result.tqfind("$(prefix)"); + index = result.find("$(prefix)"); if (index >= 0) { result = result.replace(index, 9, "@prefix@"); changed = true; } - index = result.tqfind("${datadir}"); + index = result.find("${datadir}"); if (index >= 0) { result = result.replace(index, 10, "@datadir@"); changed = true; } - index = result.tqfind("$(datadir)"); + index = result.find("$(datadir)"); if (index >= 0) { result = result.replace(index, 10, "@datadir@"); changed = true; } - index = result.tqfind("${exec_prefix}"); + index = result.find("${exec_prefix}"); if (index >= 0) { result = result.replace(index, 14, "@exec_prefix@"); changed = true; } - index = result.tqfind("$(exec_prefix)"); + index = result.find("$(exec_prefix)"); if (index >= 0) { result = result.replace(index, 14, "@exec_prefix@"); changed = true; } - index = result.tqfind("${libdir}"); + index = result.find("${libdir}"); if (index >= 0) { result = result.replace(index, 9, "@libdir@"); changed = true; } - index = result.tqfind("$(libdir)"); + index = result.find("$(libdir)"); if (index >= 0) { result = result.replace(index, 9, "@libdir@"); changed = true; } - index = result.tqfind("${includedir}"); + index = result.find("${includedir}"); if (index >= 0) { result = result.replace(index, 20, "@includedir@"); changed = true; } - index = result.tqfind("$(includedir)"); + index = result.find("$(includedir)"); if (index >= 0) { result = result.replace(index, 20, "@includedir@"); changed = true; } - index = result.tqfind("${sysconfdir}"); + index = result.find("${sysconfdir}"); if (index >= 0) { result = result.replace(index, 13, "@sysconfdir@"); changed = true; } - index = result.tqfind("$(sysconfdir)"); + index = result.find("$(sysconfdir)"); if (index >= 0) { result = result.replace(index, 13, "@sysconfdir@"); changed = true; diff --git a/kdecore/kdebug.cpp b/kdecore/kdebug.cpp index 75f2864f9..8b7b4d88d 100644 --- a/kdecore/kdebug.cpp +++ b/kdecore/kdebug.cpp @@ -86,7 +86,7 @@ static TQCString getDescrFromNum(unsigned int _num) KDebugCache->setAutoDelete(true); } - KDebugEntry *ent = KDebugCache->tqfind( _num ); + KDebugEntry *ent = KDebugCache->find( _num ); if ( ent ) return ent->descr; @@ -139,7 +139,7 @@ static TQCString getDescrFromNum(unsigned int _num) } file.close(); - ent = KDebugCache->tqfind( _num ); + ent = KDebugCache->find( _num ); if ( ent ) return ent->descr; diff --git a/kdecore/kdesktopfile.cpp b/kdecore/kdesktopfile.cpp index 3a2acb169..431a65578 100644 --- a/kdecore/kdesktopfile.cpp +++ b/kdecore/kdesktopfile.cpp @@ -83,7 +83,7 @@ TQString KDesktopFile::locateLocal(const TQString &path) { // Hm, that didn't work... // What now? Use filename only and hope for the best. - local = path.mid(path.tqfindRev('/')+1); + local = path.mid(path.findRev('/')+1); } local = ::locateLocal("xdgdata-dirs", local); } @@ -102,7 +102,7 @@ TQString KDesktopFile::locateLocal(const TQString &path) if (!TQDir::isRelativePath(local)) { // What now? Use filename only and hope for the best. - local = path.mid(path.tqfindRev('/')+1); + local = path.mid(path.findRev('/')+1); } local = ::locateLocal("xdgdata-apps", local); } @@ -155,7 +155,7 @@ TQString KDesktopFile::translatedEntry(const char* key) const if (hasKey(key)) { TQString value = readEntryUntranslated(key); TQString fName = fileName(); - fName = fName.mid(fName.tqfindRev('/')+1); + fName = fName.mid(fName.findRev('/')+1); TQString po_lookup_key = TQString::tqfromLatin1(key) + "(" + fName + "): " + value; TQString po_value = KGlobal::locale()->translate(po_lookup_key.utf8().data()); diff --git a/kdecore/kglobal.cpp b/kdecore/kglobal.cpp index 347e8d31c..d64974be4 100644 --- a/kdecore/kglobal.cpp +++ b/kdecore/kglobal.cpp @@ -150,7 +150,7 @@ KGlobal::staticQString(const TQString &str) _stringDict->setAutoDelete( true ); kglobal_init(); } - TQString *result = _stringDict->tqfind(str); + TQString *result = _stringDict->find(str); if (!result) { result = new TQString(str); @@ -170,7 +170,7 @@ KGlobal::registerStaticDeleter(KStaticDeleterBase *obj) { if (!_staticDeleters) kglobal_init(); - if (_staticDeleters->tqfind(obj) == -1) + if (_staticDeleters->find(obj) == -1) _staticDeleters->append(obj); } diff --git a/kdecore/kglobalaccel_x11.cpp b/kdecore/kglobalaccel_x11.cpp index ea3f88189..c2f7a3829 100644 --- a/kdecore/kglobalaccel_x11.cpp +++ b/kdecore/kglobalaccel_x11.cpp @@ -282,7 +282,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { .arg( codemod.code, 0, 16 ).arg( keyCode, 0, 16 ).arg( codemod.mod, 0, 16 )) << endl; // Search for which accelerator activated this event: - if( !m_rgCodeModToAction.tqcontains( codemod ) ) { + if( !m_rgCodeModToAction.contains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { KAccelAction* pAction = *it; @@ -360,7 +360,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) .arg( codemod.code, 0, 16 ).arg( pEvent->xkey.state, 0, 16 ).arg( codemod.mod, 0, 16 )) << endl; // Search for which accelerator activated this event: - if( !m_rgCodeModToAction.tqcontains( codemod ) ) { + if( !m_rgCodeModToAction.contains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { KAccelAction* pAction = *it; @@ -407,14 +407,14 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s if( rexPassIndex.search( pAction->methodSlotPtr() ) >= 0 && rexIndex.search( pAction->name() ) >= 0 ) { int n = rexIndex.cap(1).toInt(); kdDebug(125) << "Calling " << pAction->methodSlotPtr() << " int = " << n << endl; - int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { TQUObject o[2]; static_TQUType_int.set(o+1,n); const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) { - int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { TQUObject o[4]; static_TQUType_TQString.set(o+1,pAction->name()); @@ -423,7 +423,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else { - int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 ); } diff --git a/kdecore/kiconloader.cpp b/kdecore/kiconloader.cpp index f19b56402..bd1ad3a91 100644 --- a/kdecore/kiconloader.cpp +++ b/kdecore/kiconloader.cpp @@ -328,7 +328,7 @@ void KIconLoader::addBaseThemes(KIconThemeNode *node, const TQString &appname) for (it=lst.begin(); it!=lst.end(); ++it) { - if( d->mThemesInTree.tqcontains(*it) && (*it) != "hicolor") + if( d->mThemesInTree.contains(*it) && (*it) != "hicolor") continue; KIconTheme *theme = new KIconTheme(*it,appname); if (!theme->isValid()) { @@ -370,7 +370,7 @@ void KIconLoader::addExtraDesktopThemes() TQDir dir2( buf ); TQString themeName=dir2.dirName(); - if (!list.tqcontains(themeName)) + if (!list.contains(themeName)) list.append(themeName); } } @@ -378,7 +378,7 @@ void KIconLoader::addExtraDesktopThemes() for (it=list.begin(); it!=list.end(); ++it) { - if ( d->mThemesInTree.tqcontains(*it) ) + if ( d->mThemesInTree.contains(*it) ) continue; if ( *it == TQString("default.kde") ) continue; @@ -601,7 +601,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si key = "$kicou_"; key += TQString::number(size); key += '_'; key += name; - bool inCache = TQPixmapCache::tqfind(key, pix); + bool inCache = TQPixmapCache::find(key, pix); if (inCache && (path_store == 0L)) return pix; @@ -691,7 +691,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si key += overlayStr; // Is the icon in the cache? - bool inCache = TQPixmapCache::tqfind(key, pix); + bool inCache = TQPixmapCache::find(key, pix); if (inCache && (path_store == 0L)) return pix; @@ -866,7 +866,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si TQImage *KIconLoader::loadOverlay(const TQString &name, int size) const { TQString key = name + '_' + TQString::number(size); - TQImage *image = d->imgDict.tqfind(key); + TQImage *image = d->imgDict.find(key); if (image != 0L) return image; @@ -892,7 +892,7 @@ TQMovie KIconLoader::loadMovie(const TQString& name, KIcon::Group group, int siz TQString file = moviePath( name, group, size ); if (file.isEmpty()) return TQMovie(); - int dirLen = file.tqfindRev('/'); + int dirLen = file.findRev('/'); TQString icon = iconPath(name, size ? -size : group, true); if (!icon.isEmpty() && file.left(dirLen) != icon.left(dirLen)) return TQMovie(); @@ -1048,13 +1048,13 @@ TQStringList KIconLoader::queryIconsByContext(int group_or_size, TQStringList::ConstIterator it; for (it=result.begin(); it!=result.end(); ++it) { - int n = (*it).tqfindRev('/'); + int n = (*it).findRev('/'); if (n == -1) name = *it; else name = (*it).mid(n+1); name = removeIconExtension(name); - if (!entries.tqcontains(name)) + if (!entries.contains(name)) { entries += name; res2 += *it; @@ -1088,13 +1088,13 @@ TQStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context) TQStringList::ConstIterator it; for (it=result.begin(); it!=result.end(); ++it) { - int n = (*it).tqfindRev('/'); + int n = (*it).findRev('/'); if (n == -1) name = *it; else name = (*it).mid(n+1); name = removeIconExtension(name); - if (!entries.tqcontains(name)) + if (!entries.contains(name)) { entries += name; res2 += *it; @@ -1383,7 +1383,7 @@ int IconSize(KIcon::Group group, KInstance *instance) TQPixmap KIconLoader::unknown() { TQPixmap pix; - if ( TQPixmapCache::tqfind("unknown", pix) ) + if ( TQPixmapCache::find("unknown", pix) ) return pix; TQString path = KGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true); diff --git a/kdecore/kicontheme.cpp b/kdecore/kicontheme.cpp index fb25cac21..ea91ab418 100644 --- a/kdecore/kicontheme.cpp +++ b/kdecore/kicontheme.cpp @@ -185,7 +185,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName) TQMap<int,TQValueList<int> > scIcons; for (KIconThemeDir *dir=mDirs.first(); dir!=0L; dir=mDirs.next()) { - if ((dir->type() == KIcon::Scalable) && !scIcons.tqcontains(dir->size())) + if ((dir->type() == KIcon::Scalable) && !scIcons.contains(dir->size())) { TQValueList<int> lst; for (i=dir->minSize(); i<=dir->maxSize(); i++) @@ -209,7 +209,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName) TQValueList<int>::ConstIterator it2; for (it2=lst.begin(); it2!=lst.end(); ++it2) { - if (scIcons.tqcontains(*it2)) + if (scIcons.contains(*it2)) exp += scIcons[*it2]; else exp += *it2; @@ -492,7 +492,7 @@ TQStringList KIconTheme::list() KIconTheme oink(*it2); if (!oink.isValid()) continue; - if (!_theme_list->tqcontains(*it2)) + if (!_theme_list->contains(*it2)) _theme_list->append(*it2); } } diff --git a/kdecore/kinstance.cpp b/kdecore/kinstance.cpp index a03d6e891..2a579de0a 100644 --- a/kdecore/kinstance.cpp +++ b/kdecore/kinstance.cpp @@ -40,7 +40,7 @@ static TQPtrDict<TQCString> *allOldInstances = 0; #define DEBUG_ADD do { if (!allInstances) { allInstances = new TQPtrList<KInstance>(); allOldInstances = new TQPtrDict<TQCString>(); } allInstances->append(this); allOldInstances->insert( this, new TQCString( _name)); } while (false); #define DEBUG_REMOVE do { allInstances->removeRef(this); } while (false); - #define DEBUG_CHECK_ALIVE do { if (!allInstances->tqcontains((KInstance*)this)) { TQCString *old = allOldInstances->tqfind((KInstance*)this); qWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false); + #define DEBUG_CHECK_ALIVE do { if (!allInstances->contains((KInstance*)this)) { TQCString *old = allOldInstances->find((KInstance*)this); qWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false); #else #define DEBUG_ADD #define DEBUG_REMOVE diff --git a/kdecore/klibloader.cpp b/kdecore/klibloader.cpp index 3af226886..1a90881df 100644 --- a/kdecore/klibloader.cpp +++ b/kdecore/klibloader.cpp @@ -209,7 +209,7 @@ void KLibrary::slotObjectCreated( TQObject *obj ) if ( m_timer && m_timer->isActive() ) m_timer->stop(); - if ( m_objs.tqcontainsRef( obj ) ) + if ( m_objs.containsRef( obj ) ) return; // we know this object already connect( obj, TQT_SIGNAL( destroyed() ), @@ -337,10 +337,10 @@ static inline TQCString makeLibName( const char* name ) // only append ".la" if there is no extension // this allows to load non-libtool libraries as well // (mhk, 20000228) - int pos = libname.tqfindRev('/'); + int pos = libname.findRev('/'); if (pos < 0) pos = 0; - if (libname.tqfind('.', pos) < 0) + if (libname.find('.', pos) < 0) libname += ".la"; return libname; } @@ -500,7 +500,7 @@ void KLibLoader::slotLibraryDestroyed() void KLibLoader::close_pending(KLibWrapPrivate *wrap) { - if (wrap && !d->pending_close.tqcontainsRef( wrap )) + if (wrap && !d->pending_close.containsRef( wrap )) d->pending_close.append( wrap ); /* First delete all KLibrary objects in pending_close, but _don't_ unload @@ -534,7 +534,7 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap) /* Now ensure, that the libs are only unloaded in the reverse direction they were loaded. */ - if (!d->pending_close.tqcontainsRef( wrap )) { + if (!d->pending_close.containsRef( wrap )) { if (!deleted_one) /* Only diagnose, if we really haven't deleted anything. */ // kdDebug(150) << "try to dlclose " << wrap->name << ": not yet" << endl; diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp index f9de79b52..1fae4fbab 100644 --- a/kdecore/klocale.cpp +++ b/kdecore/klocale.cpp @@ -121,7 +121,7 @@ void KLocale::initMainCatalogues(const TQString & catalog) TQString mainCatalogue = catalog; // don't use main catalogue if we're looking up .desktop translations - if (mainCatalogue.tqcontains("desktop") == 0 || mainCatalogue.tqcontains("kdesktop") == 1) { + if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) { if (maincatalogue) { mainCatalogue = TQString::tqfromLatin1(maincatalogue); } @@ -135,7 +135,7 @@ void KLocale::initMainCatalogues(const TQString & catalog) else { // do not use insertCatalogue here, that would already trigger updateCatalogs d->catalogNames.append( mainCatalogue ); // application catalog - if (mainCatalogue.tqcontains("desktop") == 0 || mainCatalogue.tqcontains("kdesktop") == 1) { //don't bother if we're looking up desktop translations + if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) { //don't bother if we're looking up desktop translations d->catalogNames.append( SYSTEM_MESSAGES ); // always include kdelibs.mo d->catalogNames.append( "kio" ); // always include kio.mo d->catalogNames.append( "xdg-user-dirs" ); @@ -331,7 +331,7 @@ void KLocale::initFormat() readConfigEntry("DecimalSymbol", ".", m_decimalSymbol); readConfigEntry("ThousandsSeparator", ",", m_thousandsSeparator); - m_thousandsSeparator.tqreplace( TQString::tqfromLatin1("$0"), TQString() ); + m_thousandsSeparator.replace( TQString::tqfromLatin1("$0"), TQString() ); //kdDebug(173) << "m_thousandsSeparator=" << m_thousandsSeparator << endl; readConfigEntry("PositiveSign", "", m_positiveSign); @@ -342,7 +342,7 @@ void KLocale::initFormat() readConfigEntry("MonetaryDecimalSymbol", ".", m_monetaryDecimalSymbol); readConfigEntry("MonetaryThousandsSeparator", ",", m_monetaryThousandsSeparator); - m_monetaryThousandsSeparator.tqreplace(TQString::tqfromLatin1("$0"), TQString()); + m_monetaryThousandsSeparator.replace(TQString::tqfromLatin1("$0"), TQString()); readConfigNumEntry("FracDigits", 2, m_fracDigits, int); readConfigBoolEntry("PositivePrefixCurrencySymbol", true, @@ -417,7 +417,7 @@ TQString KLocale::catalogueFileName(const TQString & language, bool KLocale::setLanguage(const TQString & language) { - if ( d->languageList.tqcontains( language ) ) { + if ( d->languageList.contains( language ) ) { d->languageList.remove( language ); } d->languageList.prepend( language ); // let us consider this language to be the most important one @@ -451,7 +451,7 @@ bool KLocale::setLanguage(const TQStringList & languages) { // kdDebug() << "checking " << (*it) << endl; bool bIsTranslated = isApplicationTranslatedInto( *it ); - if ( languageList.tqcontains(*it) > 1 || (*it).isEmpty() || (!bIsTranslated) ) { + if ( languageList.contains(*it) > 1 || (*it).isEmpty() || (!bIsTranslated) ) { // kdDebug() << "removing " << (*it) << endl; it = languageList.remove( it ); } @@ -526,7 +526,7 @@ void KLocale::splitLocale(const TQString & aStr, TQString str = aStr; // just in case, there is another language appended - int f = str.tqfind(':'); + int f = str.find(':'); if (f >= 0) str.truncate(f); @@ -534,14 +534,14 @@ void KLocale::splitLocale(const TQString & aStr, chrset = TQString::null; language = TQString::null; - f = str.tqfind('.'); + f = str.find('.'); if (f >= 0) { chrset = str.mid(f + 1); str.truncate(f); } - f = str.tqfind('_'); + f = str.find('_'); if (f >= 0) { country = str.mid(f + 1); @@ -644,7 +644,7 @@ TQString KLocale::weekDayName (int i, bool shortName) const void KLocale::insertCatalogue( const TQString & catalog ) { - if ( !d->catalogNames.tqcontains( catalog) ) { + if ( !d->catalogNames.contains( catalog) ) { d->catalogNames.append( catalog ); } updateCatalogues( ); // evaluate the changed list and generate the neccessary KCatalog objects @@ -693,7 +693,7 @@ void KLocale::updateCatalogues( ) void KLocale::removeCatalogue(const TQString &catalog) { - if ( d->catalogNames.tqcontains( catalog )) { + if ( d->catalogNames.contains( catalog )) { d->catalogNames.remove( catalog ); if (KGlobal::_instance) updateCatalogues(); // walk through the KCatalogue instances and weed out everything we no longer need @@ -702,7 +702,7 @@ void KLocale::removeCatalogue(const TQString &catalog) void KLocale::setActiveCatalogue(const TQString &catalog) { - if ( d->catalogNames.tqcontains( catalog ) ) { + if ( d->catalogNames.contains( catalog ) ) { d->catalogNames.remove( catalog ); d->catalogNames.prepend( catalog ); updateCatalogues(); // walk through the KCatalogue instances and adapt to the new order @@ -795,10 +795,10 @@ TQString KLocale::translate( const char *index, const char *fallback) const static TQString put_n_in(const TQString &orig, unsigned long n) { TQString ret = orig; - int index = ret.tqfind("%n"); + int index = ret.find("%n"); if (index == -1) return ret; - ret.tqreplace(index, 2, TQString::number(n)); + ret.replace(index, 2, TQString::number(n)); return ret; } @@ -830,7 +830,7 @@ TQString KLocale::translate( const char *singular, const char *plural, } else { TQString tmp = TQString::fromUtf8( plural ); #ifndef NDEBUG - if (tmp.tqfind("%n") == -1) { + if (tmp.find("%n") == -1) { kdDebug() << "the message for i18n should contain a '%n'! " << plural << endl; } #endif @@ -1142,7 +1142,7 @@ TQString KLocale::formatMoney(double num, TQString res = TQString::number(neg?-num:num, 'f', precision); // Replace dot with locale decimal separator - res.tqreplace(TQChar('.'), monetaryDecimalSymbol()); + res.replace(TQChar('.'), monetaryDecimalSymbol()); // Insert the thousand separators _insertSeparator(res, monetaryThousandsSeparator(), monetaryDecimalSymbol()); @@ -1259,7 +1259,7 @@ static void _inc_by_one(TQString &str, int position) // Cut off if more digits in fractional part than 'precision' static void _round(TQString &str, int precision) { - int decimalSymbolPos = str.tqfind('.'); + int decimalSymbolPos = str.find('.'); if (decimalSymbolPos == -1) if (precision == 0) return; @@ -1294,7 +1294,7 @@ static void _round(TQString &str, int precision) break; } - decimalSymbolPos = str.tqfind('.'); + decimalSymbolPos = str.find('.'); str.truncate(decimalSymbolPos + precision + 1); // if precision == 0 delete also '.' @@ -1324,7 +1324,7 @@ TQString KLocale::formatNumber(const TQString &numStr, bool round, if (round) _round(mantString, precision); // Replace dot with locale decimal separator - mantString.tqreplace(TQChar('.'), decimalSymbol()); + mantString.replace(TQChar('.'), decimalSymbol()); // Insert the thousand separators _insertSeparator(mantString, thousandsSeparator(), decimalSymbol()); @@ -1418,7 +1418,7 @@ void KLocale::setMainCatalogue(const char *catalog) double KLocale::readNumber(const TQString &_str, bool * ok) const { TQString str = _str.stripWhiteSpace(); - bool neg = str.tqfind(negativeSign()) == 0; + bool neg = str.find(negativeSign()) == 0; if (neg) str.remove( 0, negativeSign().length() ); @@ -1428,7 +1428,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const TQString exponentialPart; int EPos; - EPos = str.tqfind('E', 0, false); + EPos = str.find('E', 0, false); if (EPos != -1) { @@ -1436,7 +1436,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const str = str.left(EPos); } - int pos = str.tqfind(decimalSymbol()); + int pos = str.find(decimalSymbol()); TQString major; TQString minor; if ( pos == -1 ) @@ -1450,7 +1450,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const // Remove thousand separators int thlen = thousandsSeparator().length(); int lastpos = 0; - while ( ( pos = major.tqfind( thousandsSeparator() ) ) > 0 ) + while ( ( pos = major.find( thousandsSeparator() ) ) > 0 ) { // e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N int fromEnd = major.length() - pos; @@ -1487,7 +1487,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const bool currencyFound = false; TQString symbol = currencySymbol(); // First try removing currency symbol from either end - int pos = str.tqfind(symbol); + int pos = str.find(symbol); if ( pos == 0 || pos == (int) str.length()-symbol.length() ) { str.remove(pos,symbol.length()); @@ -1512,7 +1512,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const } else { - int i1 = str.tqfind(negativeSign()); + int i1 = str.find(negativeSign()); if ( i1 == 0 || i1 == (int) str.length()-1 ) { neg = true; @@ -1525,7 +1525,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const // it already (because of the negative sign being in the way). if ( !currencyFound ) { - pos = str.tqfind(symbol); + pos = str.find(symbol); if ( pos == 0 || pos == (int) str.length()-symbol.length() ) { str.remove(pos,symbol.length()); @@ -1534,7 +1534,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const } // And parse the rest as a number - pos = str.tqfind(monetaryDecimalSymbol()); + pos = str.find(monetaryDecimalSymbol()); TQString major; TQString minior; if (pos == -1) @@ -1548,7 +1548,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const // Remove thousand separators int thlen = monetaryThousandsSeparator().length(); int lastpos = 0; - while ( ( pos = major.tqfind( monetaryThousandsSeparator() ) ) > 0 ) + while ( ( pos = major.find( monetaryThousandsSeparator() ) ) > 0 ) { // e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N int fromEnd = major.length() - pos; @@ -1948,8 +1948,8 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat bool KLocale::use12Clock() const { - if ((timeFormat().tqcontains(TQString::tqfromLatin1("%I")) > 0) || - (timeFormat().tqcontains(TQString::tqfromLatin1("%l")) > 0)) + if ((timeFormat().contains(TQString::tqfromLatin1("%I")) > 0) || + (timeFormat().contains(TQString::tqfromLatin1("%l")) > 0)) return true; else return false; @@ -2338,7 +2338,7 @@ TQStringList KLocale::languagesTwoAlpha() const langLst = config.readListEntry( lang ); else { - int i = lang.tqfind('_'); + int i = lang.find('_'); if (i >= 0) lang.truncate(i); langLst << lang; @@ -2348,7 +2348,7 @@ TQStringList KLocale::languagesTwoAlpha() const langIt != langLst.end(); ++langIt ) { - if ( !(*langIt).isEmpty() && !result.tqcontains( *langIt ) ) + if ( !(*langIt).isEmpty() && !result.contains( *langIt ) ) result += *langIt; } } @@ -2370,8 +2370,8 @@ TQString KLocale::twoAlphaToLanguageName(const TQString &code) const d->languages = new KConfig("all_languages", true, false, "locale"); TQString groupName = code; - const int i = groupName.tqfind('_'); - groupName.tqreplace(0, i, groupName.left(i).lower()); + const int i = groupName.find('_'); + groupName.replace(0, i, groupName.left(i).lower()); d->languages->setGroup(groupName); return d->languages->readEntry("Name"); diff --git a/kdecore/kmacroexpander.cpp b/kdecore/kmacroexpander.cpp index 89eb5c72f..c7717029c 100644 --- a/kdecore/kmacroexpander.cpp +++ b/kdecore/kmacroexpander.cpp @@ -339,7 +339,7 @@ template<class VT> int KMacroMapExpander<TQChar,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) { - TQMapConstIterator<TQChar,VT> it = macromap.tqfind(str[pos]); + TQMapConstIterator<TQChar,VT> it = macromap.find(str[pos]); if (it != macromap.end()) { ret += it.data(); return 1; @@ -355,7 +355,7 @@ KMacroMapExpander<TQChar,VT>::expandEscapedMacro( const TQString &str, uint pos, ret += TQString( escapeChar() ); return 2; } - TQMapConstIterator<TQChar,VT> it = macromap.tqfind(str[pos+1]); + TQMapConstIterator<TQChar,VT> it = macromap.find(str[pos+1]); if (it != macromap.end()) { ret += it.data(); return 2; @@ -390,7 +390,7 @@ KMacroMapExpander<TQString,VT>::expandPlainMacro( const TQString &str, uint pos, if (!sl) return 0; TQMapConstIterator<TQString,VT> it = - macromap.tqfind( TQConstString( str.tqunicode() + pos, sl ).string() ); + macromap.find( TQConstString( str.tqunicode() + pos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return sl; @@ -421,7 +421,7 @@ KMacroMapExpander<TQString,VT>::expandEscapedMacro( const TQString &str, uint po if (!sl) return 0; TQMapConstIterator<TQString,VT> it = - macromap.tqfind( TQConstString( str.tqunicode() + rpos, sl ).string() ); + macromap.find( TQConstString( str.tqunicode() + rpos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return rsl; diff --git a/kdecore/kmimesourcefactory.cpp b/kdecore/kmimesourcefactory.cpp index 0123f3465..37745d398 100644 --- a/kdecore/kmimesourcefactory.cpp +++ b/kdecore/kmimesourcefactory.cpp @@ -60,7 +60,7 @@ TQString KMimeSourceFactory::makeAbsolute (const TQString& absOrRelName, const T TQString myName; TQString myContext; - const int pos = absOrRelName.tqfind ('|'); + const int pos = absOrRelName.find ('|'); if (pos > -1) { myContext = absOrRelName.left (pos); diff --git a/kdecore/kpalette.cpp b/kdecore/kpalette.cpp index f07ac4228..9cc7b5635 100644 --- a/kdecore/kpalette.cpp +++ b/kdecore/kpalette.cpp @@ -66,7 +66,7 @@ KPalette::KPalette(const TQString &name) // Read first line // Expected "GIMP Palette" if (paletteFile.readLine(line, maxLength) == -1) return; - if (line.tqfind(" Palette") == -1) return; + if (line.find(" Palette") == -1) return; while( paletteFile.readLine(line, maxLength) != -1) { diff --git a/kdecore/kprocio.cpp b/kdecore/kprocio.cpp index 91c28024f..9159edab5 100644 --- a/kdecore/kprocio.cpp +++ b/kdecore/kprocio.cpp @@ -231,7 +231,7 @@ int KProcIO::readln (TQString &line, bool autoAck, bool *partial) //need to reduce the size of recvbuffer at some point... - len=recvbuffer.tqfind ('\n',rbi)-rbi; + len=recvbuffer.find ('\n',rbi)-rbi; //kdDebug(174) << "KPIO::readln" << endl; diff --git a/kdecore/kprotocolinfofactory.cpp b/kdecore/kprotocolinfofactory.cpp index 6d61c2d8c..e47cbb881 100644 --- a/kdecore/kprotocolinfofactory.cpp +++ b/kdecore/kprotocolinfofactory.cpp @@ -86,7 +86,7 @@ KProtocolInfoFactory::findProtocol(const TQString &protocol) { if (!m_sycocaDict) return 0; // Error! - TQMap<TQString,KProtocolInfo::Ptr>::iterator it = m_cache.tqfind(protocol); + TQMap<TQString,KProtocolInfo::Ptr>::iterator it = m_cache.find(protocol); if (it != m_cache.end()) return (*it); diff --git a/kdecore/krfcdate.cpp b/kdecore/krfcdate.cpp index 9d7c0b7ab..dabdc7afa 100644 --- a/kdecore/krfcdate.cpp +++ b/kdecore/krfcdate.cpp @@ -363,12 +363,12 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) TQString input = input_; // First find the 'T' separator, if any. - int tPos = input.tqfind('T'); + int tPos = input.find('T'); // If there is no time, no month or no day specified, fill those missing // fields so that 'input' matches YYYY-MM-DDTHH:MM:SS if (-1 == tPos) { - const int dashes = input.tqcontains('-'); + const int dashes = input.contains('-'); if (0 == dashes) { input += "-01-01"; } else if (1 == dashes) { @@ -400,7 +400,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) // +zone or -zone suffix (offset from UTC). - int plusPos = timeString.tqfindRev('+'); + int plusPos = timeString.findRev('+'); if (-1 != plusPos) { TQString offsetString = timeString.mid(plusPos + 1); @@ -409,7 +409,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) timeString = timeString.left(plusPos); } else { - int minusPos = timeString.tqfindRev('-'); + int minusPos = timeString.findRev('-'); if (-1 != minusPos) { TQString offsetString = timeString.mid(minusPos + 1); @@ -421,7 +421,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) } // secfrac suffix. - int dotPos = timeString.tqfindRev('.'); + int dotPos = timeString.findRev('.'); if (-1 != dotPos) { timeString = timeString.left(dotPos); diff --git a/kdecore/krootprop.cpp b/kdecore/krootprop.cpp index 88f82b7d3..031e27abf 100644 --- a/kdecore/krootprop.cpp +++ b/kdecore/krootprop.cpp @@ -118,7 +118,7 @@ void KRootProp::setProp( const TQString& rProp ) { // parse the string for first key-value pair separator '\n' - i = s.tqfind("\n"); + i = s.find("\n"); if(i == -1) i = s.length(); @@ -131,7 +131,7 @@ void KRootProp::setProp( const TQString& rProp ) keypair.simplifyWhiteSpace(); - i = keypair.tqfind( "=" ); + i = keypair.find( "=" ); if( i != -1 ) { key = keypair.left( i ); @@ -160,7 +160,7 @@ void KRootProp::destroy() TQString KRootProp::readEntry( const TQString& rKey, const TQString& pDefault ) const { - if( propDict.tqcontains( rKey ) ) + if( propDict.contains( rKey ) ) return propDict[ rKey ]; else return pDefault; @@ -217,18 +217,18 @@ TQColor KRootProp::readColorEntry( const TQString& rKey, // Support #ffffff style color naming. // Help ease transistion from legacy KDE setups - if( aValue.tqfind("#") == 0 ) { + if( aValue.find("#") == 0 ) { aRetColor.setNamedColor( aValue ); return aRetColor; } // Parse "red,green,blue" // find first comma - int nIndex1 = aValue.tqfind( ',' ); + int nIndex1 = aValue.find( ',' ); if( nIndex1 == -1 ) return aRetColor; // find second comma - int nIndex2 = aValue.tqfind( ',', nIndex1+1 ); + int nIndex2 = aValue.find( ',', nIndex1+1 ); if( nIndex2 == -1 ) return aRetColor; @@ -246,9 +246,9 @@ TQColor KRootProp::readColorEntry( const TQString& rKey, TQString KRootProp::writeEntry( const TQString& rKey, const TQString& rValue ) { dirty = true; - if ( propDict.tqcontains( rKey ) ) { + if ( propDict.contains( rKey ) ) { TQString aValue = propDict[ rKey ]; - propDict.tqreplace( rKey, rValue ); + propDict.replace( rKey, rValue ); return aValue; } else { @@ -280,7 +280,7 @@ TQString KRootProp::writeEntry( const TQString& rKey, const TQColor& rColor ) TQString KRootProp::removeEntry(const TQString& rKey) { - if (propDict.tqcontains(rKey)) { + if (propDict.contains(rKey)) { dirty = true; TQString aValue = propDict[rKey]; propDict.remove(rKey); diff --git a/kdecore/ksavefile.cpp b/kdecore/ksavefile.cpp index 1f1f28d23..72625a9ca 100644 --- a/kdecore/ksavefile.cpp +++ b/kdecore/ksavefile.cpp @@ -165,7 +165,7 @@ bool KSaveFile::backupFile( const TQString& qFilename, const TQString& backupDir else { TQCString nameOnly; - int slash = cFilename.tqfindRev('/'); + int slash = cFilename.findRev('/'); if (slash < 0) nameOnly = cFilename; else diff --git a/kdecore/kshell.cpp b/kdecore/kshell.cpp index 9ca5dc9b7..9a9aacfbe 100644 --- a/kdecore/kshell.cpp +++ b/kdecore/kshell.cpp @@ -355,7 +355,7 @@ TQString KShell::joinArgsDQ( const TQStringList &args ) TQString KShell::tildeExpand( const TQString &fname ) { if (fname[0] == (QChar)'~') { - int pos = fname.tqfind( '/' ); + int pos = fname.find( '/' ); if (pos < 0) return homeDir( TQConstString( fname.tqunicode() + 1, fname.length() - 1 ).string() ); TQString ret = homeDir( TQConstString( fname.tqunicode() + 1, pos - 1 ).string() ); diff --git a/kdecore/kshortcutmenu.cpp b/kdecore/kshortcutmenu.cpp index 930095c84..3df389f07 100644 --- a/kdecore/kshortcutmenu.cpp +++ b/kdecore/kshortcutmenu.cpp @@ -123,7 +123,7 @@ int KShortcutMenu::searchForKey( KKey key ) uint iKey = m_seq.count(); for( uint iItem = 1; iItem < count(); iItem++ ) { - if( m_seqs.tqcontains( iItem ) ) { + if( m_seqs.contains( iItem ) ) { KKey keyItem = m_seqs[iItem].key( iKey ); //kdDebug(125) << "iItem = " << iItem << " key = " << key.toStringInternal() << " keyItem = " << keyItem.toStringInternal() << endl; if( key == keyItem ) { @@ -146,7 +146,7 @@ void KShortcutMenu::keepItemsMatching( KKey key ) m_seq.setKey( iKey, key ); for( uint iItem = 1; iItem < count(); iItem++ ) { - if( m_seqs.tqcontains( iItem ) ) { + if( m_seqs.contains( iItem ) ) { KKey keyItem = m_seqs[iItem].key( iKey ); if( key != keyItem ) { m_seqs.remove( iItem ); diff --git a/kdecore/ksockaddr.cpp b/kdecore/ksockaddr.cpp index bc9c03059..6ce802716 100644 --- a/kdecore/ksockaddr.cpp +++ b/kdecore/ksockaddr.cpp @@ -421,7 +421,7 @@ bool KInetSocketAddress::setHost(const TQString& addr, int family) #ifdef AF_INET6 // IPv6 addresses MUST contain colons (:) and IPv4 addresses must not - if (addr.tqfind(':') != -1) + if (addr.find(':') != -1) family = AF_INET6; else family = AF_INET; diff --git a/kdecore/kstandarddirs.cpp b/kdecore/kstandarddirs.cpp index a80b33e25..8d990dc7d 100644 --- a/kdecore/kstandarddirs.cpp +++ b/kdecore/kstandarddirs.cpp @@ -144,7 +144,7 @@ bool KStandardDirs::isRestrictedResource(const char *type, const TQString& relPa void KStandardDirs::applyDataRestrictions(const TQString &relPath) const { TQString key; - int i = relPath.tqfind(QChar('/')); + int i = relPath.find(QChar('/')); if (i != -1) key = "data_"+relPath.left(i); else @@ -192,7 +192,7 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority ) if (dir.tqat(dir.length() - 1) != QChar('/')) dir += QChar('/'); - if (!prefixes.tqcontains(dir)) { + if (!prefixes.contains(dir)) { priorityAdd(prefixes, dir, priority); dircache.clear(); } @@ -212,7 +212,7 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority ) if (dir.tqat(dir.length() - 1) != QChar('/')) dir += QChar('/'); - if (!d->xdgconf_prefixes.tqcontains(dir)) { + if (!d->xdgconf_prefixes.contains(dir)) { priorityAdd(d->xdgconf_prefixes, dir, priority); dircache.clear(); } @@ -232,7 +232,7 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority ) if (dir.tqat(dir.length() - 1) != QChar('/')) dir += QChar('/'); - if (!d->xdgdata_prefixes.tqcontains(dir)) { + if (!d->xdgdata_prefixes.contains(dir)) { priorityAdd(d->xdgdata_prefixes, dir, priority); dircache.clear(); } @@ -265,7 +265,7 @@ bool KStandardDirs::addResourceType( const char *type, if (relativename.isEmpty()) return false; - TQStringList *rels = relatives.tqfind(type); + TQStringList *rels = relatives.find(type); if (!rels) { rels = new TQStringList(); relatives.insert(type, rels); @@ -273,7 +273,7 @@ bool KStandardDirs::addResourceType( const char *type, TQString copy = relativename; if (copy.tqat(copy.length() - 1) != QChar('/')) copy += QChar('/'); - if (!rels->tqcontains(copy)) { + if (!rels->contains(copy)) { if (priority) rels->prepend(copy); else @@ -295,7 +295,7 @@ bool KStandardDirs::addResourceDir( const char *type, const TQString& absdir, bool priority) { - TQStringList *paths = absolutes.tqfind(type); + TQStringList *paths = absolutes.find(type); if (!paths) { paths = new TQStringList(); absolutes.insert(type, paths); @@ -304,7 +304,7 @@ bool KStandardDirs::addResourceDir( const char *type, if (copy.tqat(copy.length() - 1) != QChar('/')) copy += QChar('/'); - if (!paths->tqcontains(copy)) { + if (!paths->contains(copy)) { if (priority) paths->prepend(copy); else @@ -512,7 +512,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, } if ( S_ISREG( buff.st_mode)) { - if (!unique || !relList.tqcontains(relPart + fn)) + if (!unique || !relList.contains(relPart + fn)) { list.append( pathfn ); relList.append( relPart + fn ); @@ -531,7 +531,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, return; // File not found if ( S_ISREG( buff.st_mode)) { - if (!unique || !relList.tqcontains(relPart + fn)) + if (!unique || !relList.contains(relPart + fn)) { list.append( pathfn ); relList.append( relPart + fn ); @@ -557,7 +557,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath, if (relpath.length()) { - int slash = relpath.tqfind(QChar('/')); + int slash = relpath.find(QChar('/')); if (slash < 0) rest = relpath.left(relpath.length() - 1); else { @@ -629,7 +629,7 @@ KStandardDirs::findAllResources( const char *type, if (filter.length()) { - int slash = filter.tqfindRev('/'); + int slash = filter.findRev('/'); if (slash < 0) filterFile = filter; else { @@ -785,7 +785,7 @@ void KStandardDirs::createSpecialResource(const char *type) TQStringList KStandardDirs::resourceDirs(const char *type) const { - TQStringList *candidates = dircache.tqfind(type); + TQStringList *candidates = dircache.find(type); if (!candidates) { // filling cache if (strcmp(type, "socket") == 0) @@ -812,7 +812,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const d->dataRestrictionActive = false; // Reset } - dirs = relatives.tqfind(type); + dirs = relatives.find(type); if (dirs) { bool local = true; @@ -834,7 +834,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const testdir.setPath(path); if (local && restrictionActive) continue; - if ((local || testdir.exists()) && !candidates->tqcontains(path)) + if ((local || testdir.exists()) && !candidates->contains(path)) candidates->append(path); } // UGLY HACK - Chris CHeney @@ -844,7 +844,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const local = false; } } - dirs = absolutes.tqfind(type); + dirs = absolutes.find(type); if (dirs) for (TQStringList::ConstIterator it = dirs->begin(); it != dirs->end(); ++it) @@ -853,7 +853,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const if (testdir.exists()) { TQString filename = realPath(*it); - if (!candidates->tqcontains(filename)) + if (!candidates->contains(filename)) candidates->append(filename); } } @@ -897,7 +897,7 @@ TQStringList KStandardDirs::systemPaths( const TQString& pstr ) if ( p[ 0 ] == QChar('~') ) { - int len = p.tqfind( QChar('/') ); + int len = p.find( QChar('/') ); if ( len == -1 ) len = p.length(); if ( len == 1 ) @@ -931,7 +931,7 @@ TQString KStandardDirs::findExe( const TQString& appname, TQFileInfo info; // absolute or relative path given - if (real_appname.tqfind(TQDir::separator()) >= 0) + if (real_appname.find(TQDir::separator()) >= 0) { info.setFile( real_appname ); if( info.exists() && ( ignore || info.isExecutable() ) @@ -1006,7 +1006,7 @@ static int tokenize( TQStringList& tokens, const TQString& str, for( int index = 0; index < len; index++) { - if ( delim.tqfind( str[ index ] ) >= 0 ) + if ( delim.find( str[ index ] ) >= 0 ) { tokens.append( token ); token = ""; @@ -1093,17 +1093,17 @@ TQString KStandardDirs::saveLocation(const char *type, { checkConfig(); - TQString *pPath = savelocations.tqfind(type); + TQString *pPath = savelocations.find(type); if (!pPath) { - TQStringList *dirs = relatives.tqfind(type); + TQStringList *dirs = relatives.find(type); if (!dirs && ( (strcmp(type, "socket") == 0) || (strcmp(type, "tmp") == 0) || (strcmp(type, "cache") == 0) )) { (void) resourceDirs(type); // Generate socket|tmp|cache resource. - dirs = relatives.tqfind(type); // Search again. + dirs = relatives.find(type); // Search again. } if (dirs) { @@ -1116,7 +1116,7 @@ TQString KStandardDirs::saveLocation(const char *type, pPath = new TQString(realPath(localkdedir() + dirs->last())); } else { - dirs = absolutes.tqfind(type); + dirs = absolutes.find(type); if (!dirs) qFatal("KStandardDirs: The resource type %s is not registered", type); pPath = new TQString(realPath(dirs->last())); @@ -1147,7 +1147,7 @@ TQString KStandardDirs::saveLocation(const char *type, TQString KStandardDirs::relativeLocation(const char *type, const TQString &absPath) { TQString fullPath = absPath; - int i = absPath.tqfindRev('/'); + int i = absPath.findRev('/'); if (i != -1) { fullPath = realPath(absPath.left(i+1))+absPath.mid(i+1); // Normalize @@ -1185,7 +1185,7 @@ bool KStandardDirs::makeDir(const TQString& dir, int mode) while( i < len ) { KDE_struct_stat st; - int pos = target.tqfind(QChar('/'), i); + int pos = target.find(QChar('/'), i); base += target.mid(i - 1, pos - i + 1); TQCString baseEncoded = TQFile::encodeName(base); // bail out if we encountered a problem @@ -1236,10 +1236,10 @@ static TQString executablePrefix() if(path.isEmpty()) return TQString::null; - int pos = path.tqfindRev('/'); // Skip filename + int pos = path.findRev('/'); // Skip filename if(pos <= 0) return TQString::null; - pos = path.tqfindRev(TQChar('/'), pos - 1); // Skip last directory + pos = path.findRev(TQChar('/'), pos - 1); // Skip last directory if(pos <= 0) return TQString::null; @@ -1549,7 +1549,7 @@ bool KStandardDirs::addCustomized(KConfig *config) TQString kioskAdmin = config->readEntry("kioskAdmin"); if (!kioskAdmin.isEmpty() && !kde_kiosk_admin) { - int i = kioskAdmin.tqfind(':'); + int i = kioskAdmin.find(':'); TQString user = kioskAdmin.left(i); TQString host = kioskAdmin.mid(i+1); @@ -1694,7 +1694,7 @@ TQString locateLocal( const char *type, { // try to find slashes. If there are some, we have to // create the subdir first - int slash = filename.tqfindRev('/')+1; + int slash = filename.findRev('/')+1; if (!slash) // only one filename return inst->dirs()->saveLocation(type, TQString::null, createDir) + filename; diff --git a/kdecore/kstartupinfo.cpp b/kdecore/kstartupinfo.cpp index 19ba9797f..98195e8e5 100644 --- a/kdecore/kstartupinfo.cpp +++ b/kdecore/kstartupinfo.cpp @@ -234,7 +234,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P, return; if( id_P.none()) return; - if( d->startups.tqcontains( id_P )) + if( d->startups.contains( id_P )) { // already reported, update d->startups[ id_P ].update( data_P ); d->startups[ id_P ].age = 0; // CHECKME @@ -250,7 +250,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P, emit gotStartupChange( id_P, d->startups[ id_P ] ); return; } - if( d->silent_startups.tqcontains( id_P )) + if( d->silent_startups.contains( id_P )) { // already reported, update d->silent_startups[ id_P ].update( data_P ); d->silent_startups[ id_P ].age = 0; // CHECKME @@ -265,7 +265,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P, emit gotStartupChange( id_P, d->silent_startups[ id_P ] ); return; } - if( d->uninited_startups.tqcontains( id_P )) + if( d->uninited_startups.contains( id_P )) { d->uninited_startups[ id_P ].update( data_P ); kdDebug( 172 ) << "updating uninited" << endl; @@ -317,18 +317,18 @@ void KStartupInfo::remove_startup_info_internal( const KStartupInfoId& id_P ) { if( d == NULL ) return; - if( d->startups.tqcontains( id_P )) + if( d->startups.contains( id_P )) { kdDebug( 172 ) << "removing" << endl; emit gotRemoveStartup( id_P, d->startups[ id_P ]); d->startups.remove( id_P ); } - else if( d->silent_startups.tqcontains( id_P )) + else if( d->silent_startups.contains( id_P )) { kdDebug( 172 ) << "removing silent" << endl; d->silent_startups.remove( id_P ); } - else if( d->uninited_startups.tqcontains( id_P )) + else if( d->uninited_startups.contains( id_P )) { kdDebug( 172 ) << "removing uninited" << endl; d->uninited_startups.remove( id_P ); @@ -360,11 +360,11 @@ void KStartupInfo::remove_startup_pids( const KStartupInfoId& id_P, return; kdFatal( data_P.pids().count() == 0, 172 ); Data* data = NULL; - if( d->startups.tqcontains( id_P )) + if( d->startups.contains( id_P )) data = &d->startups[ id_P ]; - else if( d->silent_startups.tqcontains( id_P )) + else if( d->silent_startups.contains( id_P )) data = &d->silent_startups[ id_P ]; - else if( d->uninited_startups.tqcontains( id_P )) + else if( d->uninited_startups.contains( id_P )) data = &d->uninited_startups[ id_P ]; else return; @@ -669,7 +669,7 @@ bool KStartupInfo::find_id( const TQCString& id_P, KStartupInfoId* id_O, kdDebug( 172 ) << "find_id:" << id_P << endl; KStartupInfoId id; id.initId( id_P ); - if( d->startups.tqcontains( id )) + if( d->startups.contains( id )) { if( id_O != NULL ) *id_O = id; @@ -1069,7 +1069,7 @@ unsigned long KStartupInfoId::timestamp() const { if( none()) return 0; - int pos = d->id.tqfindRev( "_TIME" ); + int pos = d->id.findRev( "_TIME" ); if( pos >= 0 ) { bool ok; @@ -1083,10 +1083,10 @@ unsigned long KStartupInfoId::timestamp() const // snprintf (s, len, "%s/%s/%lu/%d-%d-%s", // canonicalized_launcher, canonicalized_launchee, (unsigned long) timestamp, // (int) getpid (), (int) sequence_number, hostbuf); - int pos1 = d->id.tqfindRev( '/' ); + int pos1 = d->id.findRev( '/' ); if( pos1 > 0 ) { - int pos2 = d->id.tqfindRev( '/', pos1 - 1 ); + int pos2 = d->id.findRev( '/', pos1 - 1 ); if( pos2 >= 0 ) { bool ok; @@ -1374,7 +1374,7 @@ const TQCString& KStartupInfoData::hostname() const void KStartupInfoData::addPid( pid_t pid_P ) { - if( !d->pids.tqcontains( pid_P )) + if( !d->pids.contains( pid_P )) d->pids.append( pid_P ); } @@ -1390,7 +1390,7 @@ const TQValueList< pid_t >& KStartupInfoData::pids() const bool KStartupInfoData::is_pid( pid_t pid_P ) const { - return d->pids.tqcontains( pid_P ); + return d->pids.contains( pid_P ); } void KStartupInfoData::setSilent( TriState state_P ) @@ -1446,24 +1446,24 @@ WId KStartupInfoData::launchedBy() const static long get_num( const TQString& item_P ) { - unsigned int pos = item_P.tqfind( '=' ); + unsigned int pos = item_P.find( '=' ); return item_P.mid( pos + 1 ).toLong(); } static unsigned long get_unum( const TQString& item_P ) { - unsigned int pos = item_P.tqfind( '=' ); + unsigned int pos = item_P.find( '=' ); return item_P.mid( pos + 1 ).toULong(); } static TQString get_str( const TQString& item_P ) { - unsigned int pos = item_P.tqfind( '=' ); + unsigned int pos = item_P.find( '=' ); if( item_P.length() > pos + 2 && item_P[ pos + 1 ] == (QChar)'\"' ) { - int pos2 = item_P.left( pos + 2 ).tqfind( '\"' ); + int pos2 = item_P.left( pos + 2 ).find( '\"' ); if( pos2 < 0 ) return TQString::null; // 01234 return item_P.mid( pos + 2, pos2 - 2 - pos ); // A="C" diff --git a/kdecore/kstringhandler.cpp b/kdecore/kstringhandler.cpp index e309ea6f0..dfabb49ea 100644 --- a/kdecore/kstringhandler.cpp +++ b/kdecore/kstringhandler.cpp @@ -22,7 +22,7 @@ static void parsePythonRange( const TQCString &range, uint &start, uint &end ) { - const int colon = range.tqfind( ':' ); + const int colon = range.find( ':' ); if ( colon == -1 ) { start = range.toUInt(); end = start; @@ -178,7 +178,7 @@ TQString KStringHandler::remword( const TQString &text , const TQString &word ) // Split words and add into list TQStringList list = TQStringList::split( " ", text, true ); - TQStringList::Iterator it = list.tqfind(word); + TQStringList::Iterator it = list.find(word); if (it != list.end()) list.remove( it ); @@ -422,7 +422,7 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa if ( pattern[ pattern_len - 1 ] == (QChar)'*' && len + 1 >= pattern_len ) { if ( pattern[ 0 ] == (QChar)'*' ) { - return filename.tqfind(pattern.mid(1, pattern_len - 2)) != -1; + return filename.find(pattern.mid(1, pattern_len - 2)) != -1; } const TQChar *c1 = pattern.tqunicode(); @@ -457,7 +457,7 @@ KStringHandler::perlSplit(const TQString & sep, const TQString & s, uint max) int searchStart = 0; - int tokenStart = s.tqfind(sep, searchStart); + int tokenStart = s.find(sep, searchStart); while (-1 != tokenStart && (ignoreMax || l.count() < max - 1)) { @@ -465,7 +465,7 @@ KStringHandler::perlSplit(const TQString & sep, const TQString & s, uint max) l << s.mid(searchStart, tokenStart - searchStart); searchStart = tokenStart + sep.length(); - tokenStart = s.tqfind(sep, searchStart); + tokenStart = s.find(sep, searchStart); } if (!s.mid(searchStart, s.length() - searchStart).isEmpty()) @@ -483,7 +483,7 @@ KStringHandler::perlSplit(const TQChar & sep, const TQString & s, uint max) int searchStart = 0; - int tokenStart = s.tqfind(sep, searchStart); + int tokenStart = s.find(sep, searchStart); while (-1 != tokenStart && (ignoreMax || l.count() < max - 1)) { @@ -491,7 +491,7 @@ KStringHandler::perlSplit(const TQChar & sep, const TQString & s, uint max) l << s.mid(searchStart, tokenStart - searchStart); searchStart = tokenStart + 1; - tokenStart = s.tqfind(sep, searchStart); + tokenStart = s.find(sep, searchStart); } if (!s.mid(searchStart, s.length() - searchStart).isEmpty()) diff --git a/kdecore/ksycoca.cpp b/kdecore/ksycoca.cpp index 0846c5c95..2df7ae772 100644 --- a/kdecore/ksycoca.cpp +++ b/kdecore/ksycoca.cpp @@ -266,7 +266,7 @@ void KSycoca::addFactory( KSycocaFactory *factory ) bool KSycoca::isChanged(const char *type) { - return self()->d->changeList.tqcontains(type); + return self()->d->changeList.contains(type); } void KSycoca::notifyDatabaseChanged(const TQStringList &changeList) @@ -428,7 +428,7 @@ TQString KSycoca::determineRelativePath( const TQString & _fullpath, const char TQStringList::ConstIterator dirsit = dirs.begin(); for ( ; dirsit != dirs.end() && sRelativeFilePath.isEmpty(); ++dirsit ) { // might need canonicalPath() ... - if ( _fullpath.tqfind( *dirsit ) == 0 ) // path is dirs + relativePath + if ( _fullpath.find( *dirsit ) == 0 ) // path is dirs + relativePath sRelativeFilePath = _fullpath.mid( (*dirsit).length() ); // skip appsdirs } if ( sRelativeFilePath.isEmpty() ) diff --git a/kdecore/kurl.cpp b/kdecore/kurl.cpp index cc7c3fddb..52c8a807a 100644 --- a/kdecore/kurl.cpp +++ b/kdecore/kurl.cpp @@ -338,7 +338,7 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de #else TQString encodedDot("%2e"); #endif - if (path.tqfind(encodedDot, 0, false) != -1) + if (path.find(encodedDot, 0, false) != -1) { #ifndef KDE_QT_ONLY static const TQString &encodedDOT = KGlobal::staticQString("%2E"); // Uppercase! @@ -365,7 +365,7 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de cdUp = 0; pos = orig_pos = len; - while ( pos && (pos = path.tqfindRev('/',--pos)) != -1 ) + while ( pos && (pos = path.findRev('/',--pos)) != -1 ) { len = orig_pos - pos - 1; if ( len == 2 && path[pos+1] == '.' && path[pos+2] == '.' ) @@ -542,11 +542,11 @@ KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint ) TQString rUrl = _rel_url; int len = _u.m_strProtocol.length(); if ( !_u.m_strHost.isEmpty() && !rUrl.isEmpty() && - rUrl.tqfind( _u.m_strProtocol, 0, false ) == 0 && + rUrl.find( _u.m_strProtocol, 0, false ) == 0 && rUrl[len] == ':' && (rUrl[len+1] != '/' || (rUrl[len+1] == '/' && rUrl[len+2] != '/')) ) { - rUrl.remove( 0, rUrl.tqfind( ':' ) + 1 ); + rUrl.remove( 0, rUrl.find( ':' ) + 1 ); } if ( rUrl.isEmpty() ) @@ -579,13 +579,13 @@ KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint ) } else if ( rUrl[0] != '?' ) { - int pos = m_strPath.tqfindRev( '/' ); + int pos = m_strPath.findRev( '/' ); if (pos >= 0) m_strPath.truncate(pos); m_strPath += '/'; if (!m_strPath_encoded.isEmpty()) { - pos = m_strPath_encoded.tqfindRev( '/' ); + pos = m_strPath_encoded.findRev( '/' ); if (pos >= 0) m_strPath_encoded.truncate(pos); m_strPath_encoded += '/'; @@ -1231,7 +1231,7 @@ void KURL::setFileName( const TQString& _txt ) path = "/"; else { - int lastSlash = path.tqfindRev( '/' ); + int lastSlash = path.findRev( '/' ); if ( lastSlash == -1) { // The first character is not a '/' ??? @@ -1347,7 +1347,7 @@ void KURL::setEncodedPath( const TQString& _txt, int encoding_hint ) void KURL::setEncodedPathAndQuery( const TQString& _txt, int encoding_hint ) { - int pos = _txt.tqfind( '?' ); + int pos = _txt.find( '?' ); if ( pos == -1 ) { setEncodedPath(_txt, encoding_hint); @@ -1490,7 +1490,7 @@ TQString KURL::url( int _trailing, int encoding_hint ) const } if ( m_iUriMode == URL ) { - bool IPv6 = (m_strHost.tqfind(':') != -1); + bool IPv6 = (m_strHost.find(':') != -1); if (IPv6) u += '[' + m_strHost + ']'; else @@ -1546,7 +1546,7 @@ TQString KURL::prettyURL( int _trailing ) const } if ( m_iUriMode == URL ) { - bool IPv6 = (m_strHost.tqfind(':') != -1); + bool IPv6 = (m_strHost.find(':') != -1); if (IPv6) { u += '[' + m_strHost + ']'; @@ -1704,13 +1704,13 @@ TQString KURL::fileName( bool _strip_trailing_slash ) const // This is hairy, we need the last unencoded slash. // Count in the encoded string how many encoded slashes follow the last // unencoded one. - int i = m_strPath_encoded.tqfindRev( TQChar('/'), len - 1 ); + int i = m_strPath_encoded.findRev( TQChar('/'), len - 1 ); TQString fileName_encoded = m_strPath_encoded.mid(i+1); - n += fileName_encoded.tqcontains("%2f", false); + n += fileName_encoded.contains("%2f", false); } int i = len; do { - i = path.tqfindRev( TQChar('/'), i - 1 ); + i = path.findRev( TQChar('/'), i - 1 ); } while (--n && (i > 0)); @@ -1773,7 +1773,7 @@ TQString KURL::directory( bool _strip_trailing_slash_from_result, if ( result.isEmpty() || result == "/" ) return result; - int i = result.tqfindRev( "/" ); + int i = result.findRev( "/" ); // If ( i == -1 ) => the first character is not a '/' // So it's some URL like file:blah.tgz, with no path if ( i == -1 ) @@ -2143,7 +2143,7 @@ TQMap< TQString, TQString > KURL::queryItems( int options, int encoding_hint ) c TQMap< TQString, TQString > result; TQStringList items = TQStringList::split( '&', m_strQuery_encoded ); for ( TQStringList::const_iterator it = items.begin() ; it != items.end() ; ++it ) { - int equal_pos = (*it).tqfind( '=' ); + int equal_pos = (*it).find( '=' ); if ( equal_pos > 0 ) { // = is not the first char... TQString name = (*it).left( equal_pos ); if ( options & CaseInsensitiveKeys ) diff --git a/kdecore/kurldrag.cpp b/kdecore/kurldrag.cpp index 089d2fadb..e0a7be227 100644 --- a/kdecore/kurldrag.cpp +++ b/kdecore/kurldrag.cpp @@ -140,7 +140,7 @@ bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris, TQMap<TQString,T if ( readingKey ) key = *it; else - metaData.tqreplace( key, *it ); + metaData.replace( key, *it ); readingKey = !readingKey; } Q_ASSERT( readingKey ); // an odd number of items would be, well, odd ;-) diff --git a/kdecore/kuser.cpp b/kdecore/kuser.cpp index ca74700fe..3fffddf4f 100644 --- a/kdecore/kuser.cpp +++ b/kdecore/kuser.cpp @@ -219,7 +219,7 @@ TQValueList<KUserGroup> KUser::groups() const { TQValueList<KUserGroup>::const_iterator it; for ( it = allGroups.begin(); it != allGroups.end(); ++it ) { TQValueList<KUser> users = (*it).users(); - if ( users.tqfind( *this ) != users.end()) { + if ( users.find( *this ) != users.end()) { result.append(*it); } } @@ -232,7 +232,7 @@ TQStringList KUser::groupNames() const { TQValueList<KUserGroup>::const_iterator it; for ( it = allGroups.begin(); it != allGroups.end(); ++it ) { TQValueList<KUser> users = (*it).users(); - if ( users.tqfind( *this ) != users.end()) { + if ( users.find( *this ) != users.end()) { result.append((*it).name()); } } diff --git a/kdecore/kvmallocator.cpp b/kdecore/kvmallocator.cpp index 031dd4304..996d55791 100644 --- a/kdecore/kvmallocator.cpp +++ b/kdecore/kvmallocator.cpp @@ -106,7 +106,7 @@ KVMAllocator::allocate(size_t _size) free_block.start += block.size; if (!free_block.size) d->free_blocks.remove(it); - it = d->used_blocks.tqreplace(block.start, block); + it = d->used_blocks.replace(block.start, block); return &(it.data()); } ++it; @@ -120,7 +120,7 @@ KVMAllocator::allocate(size_t _size) block.size = (_size + KVM_ALIGN) & ~KVM_ALIGN; block.mmap = 0; kdDebug(180)<<"VM alloc: using new block "<<(long)block.start<<" size ="<<(long)block.size<<" request = "<<_size<< endl; - it = d->used_blocks.tqreplace(block.start, block); + it = d->used_blocks.replace(block.start, block); d->max_length += block.size; return &(it.data()); } @@ -138,14 +138,14 @@ KVMAllocator::free(Block *block_p) return; } TQMap<off_t,KVMAllocator::Block>::iterator it; - it = d->used_blocks.tqfind(block.start); + it = d->used_blocks.find(block.start); if (it == d->used_blocks.end()) { kdDebug(180)<<"VM free: Block "<<(long)block.start<<" is not allocated."<<endl; return; } d->used_blocks.remove(it); - it = d->free_blocks.tqreplace(block.start, block); + it = d->free_blocks.replace(block.start, block); TQMap<off_t,KVMAllocator::Block>::iterator before = it; --before; if (before != d->free_blocks.end()) diff --git a/kdecore/kwinmodule.cpp b/kdecore/kwinmodule.cpp index 5e7b77333..f113570db 100644 --- a/kdecore/kwinmodule.cpp +++ b/kdecore/kwinmodule.cpp @@ -172,7 +172,7 @@ const TQValueList<WId>& KWinModule::stackingOrder() const bool KWinModule::hasWId(WId w) const { - return d->windows.tqfindIndex( w ) != -1; + return d->windows.findIndex( w ) != -1; } const TQValueList<WId>& KWinModule::systemTrayWindows() const @@ -243,7 +243,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev ) for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) emit (*mit)->showingDesktopChanged( showingDesktop()); } - } else if ( windows.tqfindIndex( ev->xany.window ) != -1 ){ + } else if ( windows.findIndex( ev->xany.window ) != -1 ){ NETWinInfo ni( qt_xdisplay(), ev->xany.window, qt_xrootwin(), 0 ); unsigned long dirty[ 2 ]; ni.event( ev, dirty, 2 ); @@ -257,7 +257,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev ) } if ( (dirty[ NETWinInfo::PROTOCOLS ] & NET::WMStrut) != 0 ) { removeStrutWindow( ev->xany.window ); - if ( possibleStrutWindows.tqfindIndex( ev->xany.window ) == -1 ) + if ( possibleStrutWindows.findIndex( ev->xany.window ) == -1 ) possibleStrutWindows.append( ev->xany.window ); } if ( dirty[ NETWinInfo::PROTOCOLS ] || dirty[ NETWinInfo::PROTOCOLS2 ] ) { @@ -318,7 +318,7 @@ void KWinModulePrivate::addClient(Window w) void KWinModulePrivate::removeClient(Window w) { bool emit_strutChanged = removeStrutWindow( w ); - if( strutSignalConnected && possibleStrutWindows.tqfindIndex( w ) != -1 && modules.count() > 0 ) { + if( strutSignalConnected && possibleStrutWindows.findIndex( w ) != -1 && modules.count() > 0 ) { NETWinInfo info( qt_xdisplay(), w, qt_xrootwin(), NET::WMStrut ); NETStrut strut = info.strut(); if ( strut.left || strut.top || strut.right || strut.bottom ) { @@ -400,7 +400,7 @@ TQRect KWinModule::workArea( const TQValueList<WId>& exclude, int desktop ) cons TQValueList<WId>::ConstIterator it1; for( it1 = d->windows.begin(); it1 != d->windows.end(); ++it1 ) { - if(exclude.tqfindIndex(*it1) != -1) continue; + if(exclude.findIndex(*it1) != -1) continue; // Kicker (very) extensively calls this function, causing hundreds of roundtrips just // to repeatedly find out struts of all windows. Therefore strut values for strut @@ -416,7 +416,7 @@ TQRect KWinModule::workArea( const TQValueList<WId>& exclude, int desktop ) cons if(!((*it2).desktop == desktop || (*it2).desktop == NETWinInfo::OnAllDesktops )) continue; strut = (*it2).strut; - } else if( d->possibleStrutWindows.tqfindIndex( *it1 ) != -1 ) { + } else if( d->possibleStrutWindows.findIndex( *it1 ) != -1 ) { NETWinInfo info( qt_xdisplay(), (*it1), qt_xrootwin(), NET::WMStrut | NET::WMDesktop); strut = info.strut(); d->possibleStrutWindows.remove( *it1 ); diff --git a/kdecore/kxmessages.cpp b/kdecore/kxmessages.cpp index 02af07b0f..6b6f971a2 100644 --- a/kdecore/kxmessages.cpp +++ b/kdecore/kxmessages.cpp @@ -189,7 +189,7 @@ bool KXMessages::x11Event( XEvent* ev_P ) ++i ) buf[ i ] = ev_P->xclient.data.b[ i ]; buf[ i ] = '\0'; - if( incoming_messages.tqcontains( ev_P->xclient.window )) + if( incoming_messages.contains( ev_P->xclient.window )) { if( ev_P->xclient.message_type == accept_atom1 && accept_atom1 != accept_atom2 ) // two different messages on the same window at the same time shouldn't happen anyway diff --git a/kdecore/network/khttpproxysocketdevice.cpp b/kdecore/network/khttpproxysocketdevice.cpp index 0d72b4b3d..648f4e571 100644 --- a/kdecore/network/khttpproxysocketdevice.cpp +++ b/kdecore/network/khttpproxysocketdevice.cpp @@ -222,7 +222,7 @@ bool KHttpProxySocketDevice::parseServerReply() TQCString fullHeaders = d->reply + buf.data(); // search for the end of the headers - index = fullHeaders.tqfind("\r\n\r\n"); + index = fullHeaders.find("\r\n\r\n"); if (index == -1) { // no, headers not yet finished... @@ -265,9 +265,9 @@ bool KHttpProxySocketDevice::parseServerReply() // now really parse the reply qDebug("KHttpProxySocketDevice: get reply: %s\n", - d->reply.left(d->reply.tqfind('\r')).data()); + d->reply.left(d->reply.find('\r')).data()); if (d->reply.left(7) != "HTTP/1." || - (index = d->reply.tqfind(' ')) == -1 || + (index = d->reply.find(' ')) == -1 || d->reply[index + 1] != '2') { setError(IO_ConnectError, NetFailure); diff --git a/kdecore/network/kresolver.cpp b/kdecore/network/kresolver.cpp index d58d02cb0..93c029b8e 100644 --- a/kdecore/network/kresolver.cpp +++ b/kdecore/network/kresolver.cpp @@ -917,7 +917,7 @@ TQString KResolver::localHostName() if (name.isEmpty()) return TQString::tqfromLatin1("localhost"); - if (name.tqfind('.') == -1) + if (name.find('.') == -1) { // not fully qualified // must resolve @@ -961,7 +961,7 @@ TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) TQStringList input = splitLabels(tqunicodeDomain); // Do we allow IDN names for this TLD? - if (input.count() && !idnDomains->tqcontains(input[input.count()-1].lower())) + if (input.count() && !idnDomains->contains(input[input.count()-1].lower())) return input.join(".").lower().latin1(); // No IDN allowed for this TLD // 3) decide whether to enforce the STD3 rules for chars < 0x7F @@ -1009,7 +1009,7 @@ TQString KResolver::domainToUnicode(const TQString& asciiDomain) TQStringList input = splitLabels(asciiDomain); // Do we allow IDN names for this TLD? - if (input.count() && !idnDomains->tqcontains(input[input.count()-1].lower())) + if (input.count() && !idnDomains->contains(input[input.count()-1].lower())) return asciiDomain.lower(); // No TLDs allowed // 3) decide whether to enforce the STD3 rules for chars < 0x7F diff --git a/kdecore/network/kresolverstandardworkers.cpp b/kdecore/network/kresolverstandardworkers.cpp index 185879841..6236cc15d 100644 --- a/kdecore/network/kresolverstandardworkers.cpp +++ b/kdecore/network/kresolverstandardworkers.cpp @@ -547,8 +547,8 @@ bool KStandardWorker::sanityCheck() if (!nodeName().isEmpty()) { TQString node = nodeName(); - if (node.tqfind('%') != -1) - node.truncate(node.tqfind('%')); + if (node.find('%') != -1) + node.truncate(node.find('%')); if (node.isEmpty() || node == TQString::tqfromLatin1("*") || node == TQString::tqfromLatin1("localhost")) @@ -584,7 +584,7 @@ bool KStandardWorker::resolveScopeId() { // we must test the original name, not the encoded one scopeid = 0; - int pos = nodeName().tqfindRev('%'); + int pos = nodeName().findRev('%'); if (pos == -1) return true; diff --git a/kdecore/network/ksocketaddress.cpp b/kdecore/network/ksocketaddress.cpp index a6fd14cf5..feaabfab5 100644 --- a/kdecore/network/ksocketaddress.cpp +++ b/kdecore/network/ksocketaddress.cpp @@ -131,7 +131,7 @@ bool KIpAddress::setAddress(const TQString& address) m_version = 0; // try to guess the address version - if (address.tqfind(':') != -1) + if (address.find(':') != -1) { #ifdef AF_INET6 // guessing IPv6 diff --git a/kdecore/network/ksocketbuffer.cpp b/kdecore/network/ksocketbuffer.cpp index ad4864be7..aacffde45 100644 --- a/kdecore/network/ksocketbuffer.cpp +++ b/kdecore/network/ksocketbuffer.cpp @@ -75,9 +75,9 @@ bool KSocketBuffer::canReadLine() const // walk the buffer for ( ; it != end; ++it) { - if ((*it).tqfind('\n', offset) != -1) + if ((*it).find('\n', offset) != -1) return true; - if ((*it).tqfind('\r', offset) != -1) + if ((*it).find('\r', offset) != -1) return true; offset = 0; } @@ -101,7 +101,7 @@ TQCString KSocketBuffer::readLine() // walk the buffer for ( ; it != end; ++it) { - int posnl = (*it).tqfind('\n', offset); + int posnl = (*it).find('\n', offset); if (posnl == -1) { // not found in this one diff --git a/kdecore/network/ksocketdevice.cpp b/kdecore/network/ksocketdevice.cpp index 36e0a5c7b..68651b8e2 100644 --- a/kdecore/network/ksocketdevice.cpp +++ b/kdecore/network/ksocketdevice.cpp @@ -884,7 +884,7 @@ KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory) void KSocketDevice::addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities) { TQMutexLocker locker(&defaultImplFactoryMutex); - if (factories.tqcontains(capabilities)) + if (factories.contains(capabilities)) delete factories[capabilities]; factories.insert(capabilities, factory); } diff --git a/kdecore/network/ksrvresolverworker.cpp b/kdecore/network/ksrvresolverworker.cpp index e217507f3..2ec5bb4bf 100644 --- a/kdecore/network/ksrvresolverworker.cpp +++ b/kdecore/network/ksrvresolverworker.cpp @@ -51,8 +51,8 @@ bool KSrvResolverWorker::preprocess() return false; TQString node = nodeName(); - if (node.tqfind('%') != -1) - node.truncate(node.tqfind('%')); + if (node.find('%') != -1) + node.truncate(node.find('%')); if (node.isEmpty() || node == TQString::tqfromLatin1("*") || node == TQString::tqfromLatin1("localhost")) diff --git a/kdecore/svgicons/ksvgiconpainter.cpp b/kdecore/svgicons/ksvgiconpainter.cpp index 06d5804f8..2f988ce78 100644 --- a/kdecore/svgicons/ksvgiconpainter.cpp +++ b/kdecore/svgicons/ksvgiconpainter.cpp @@ -1263,8 +1263,8 @@ void KSVGIconPainter::setStrokeColor(const TQString &stroke) TQString url = stroke; - unsigned int start = url.tqfind("#") + 1; - unsigned int end = url.tqfindRev(")"); + unsigned int start = url.find("#") + 1; + unsigned int end = url.findRev(")"); d->helper->m_strokeGradientReference = url.mid(start, end - start); } @@ -1291,8 +1291,8 @@ void KSVGIconPainter::setFillColor(const TQString &fill) TQString url = fill; - unsigned int start = url.tqfind("#") + 1; - unsigned int end = url.tqfindRev(")"); + unsigned int start = url.find("#") + 1; + unsigned int end = url.findRev(")"); d->helper->m_fillGradientReference = url.mid(start, end - start); } |