diff options
Diffstat (limited to 'kcontrol')
94 files changed, 502 insertions, 502 deletions
diff --git a/kcontrol/background/bgadvanced.cpp b/kcontrol/background/bgadvanced.cpp index 644cfc9df..0f97753e4 100644 --- a/kcontrol/background/bgadvanced.cpp +++ b/kcontrol/background/bgadvanced.cpp @@ -240,7 +240,7 @@ void BGAdvancedDialog::updateUI() void BGAdvancedDialog::removeProgram(const TQString &name) { - if (m_programItems.tqfind(name)) + if (m_programItems.find(name)) { delete m_programItems[name]; m_programItems.remove(name); @@ -265,7 +265,7 @@ void BGAdvancedDialog::addProgram(const TQString &name) void BGAdvancedDialog::selectProgram(const TQString &name) { - if (m_programItems.tqfind(name)) + if (m_programItems.find(name)) { TQListViewItem *item = m_programItems[name]; dlg->m_listPrograms->ensureItemVisible(item); diff --git a/kcontrol/background/bgdialog.cpp b/kcontrol/background/bgdialog.cpp index b166704ad..1e681c3d6 100644 --- a/kcontrol/background/bgdialog.cpp +++ b/kcontrol/background/bgdialog.cpp @@ -510,7 +510,7 @@ void BGDialog::loadWallpaperFilesList() { KSimpleConfig fileConfig(*it); fileConfig.setGroup("Wallpaper"); - int slash = (*it).tqfindRev('/') + 1; + int slash = (*it).findRev('/') + 1; TQString directory = (*it).left(slash); TQString imageCaption = fileConfig.readEntry("Name"); @@ -524,14 +524,14 @@ void BGDialog::loadWallpaperFilesList() { if (imageCaption.isEmpty()) { imageCaption = fileName; - imageCaption.tqreplace('_', ' '); + imageCaption.replace('_', ' '); imageCaption = KStringHandler::capwords(imageCaption); } // avoid name collisions TQString rs = imageCaption; TQString lrs = rs.lower(); - for (int n = 1; papers.tqfind(lrs) != papers.end(); ++n) + for (int n = 1; papers.find(lrs) != papers.end(); ++n) { rs = imageCaption + " (" + TQString::number(n) + ')'; lrs = rs.lower(); @@ -562,8 +562,8 @@ void BGDialog::loadWallpaperFilesList() { if (imageCaption.isEmpty()) { - int slash = (*it).tqfindRev('/') + 1; - int endDot = (*it).tqfindRev('.'); + int slash = (*it).findRev('/') + 1; + int endDot = (*it).findRev('.'); // strip the extension if it exists if (endDot != -1 && endDot > slash) @@ -571,14 +571,14 @@ void BGDialog::loadWallpaperFilesList() { else imageCaption = (*it).mid(slash); - imageCaption.tqreplace('_', ' '); + imageCaption.replace('_', ' '); imageCaption = KStringHandler::capwords(imageCaption); } // avoid name collisions TQString rs = imageCaption; TQString lrs = rs.lower(); - for (int n = 1; papers.tqfind(lrs) != papers.end(); ++n) + for (int n = 1; papers.find(lrs) != papers.end(); ++n) { rs = imageCaption + " (" + TQString::number(n) + ')'; lrs = rs.lower(); @@ -606,12 +606,12 @@ void BGDialog::setWallpaper(const TQString &s) KComboBox *comboWallpaper = m_urlWallpaperBox; comboWallpaper->blockSignals(true); - if (m_wallpaper.tqfind(s) == m_wallpaper.end()) + if (m_wallpaper.find(s) == m_wallpaper.end()) { int i = comboWallpaper->count(); TQString imageCaption; - int slash = s.tqfindRev('/') + 1; - int endDot = s.tqfindRev('.'); + int slash = s.findRev('/') + 1; + int endDot = s.findRev('.'); // strip the extension if it exists if (endDot != -1 && endDot > slash) @@ -750,7 +750,7 @@ void BGDialog::updateUI() case KBackgroundSettings::Pattern: { - int i = m_patterns.tqfindIndex(r->KBackgroundPattern::name()); + int i = m_patterns.findIndex(r->KBackgroundPattern::name()); if (i >= 0) m_comboPattern->setCurrentItem(NR_PREDEF_PATTERNS+i); else diff --git a/kcontrol/background/bgrender.cpp b/kcontrol/background/bgrender.cpp index c6195e718..65ef3c12b 100644 --- a/kcontrol/background/bgrender.cpp +++ b/kcontrol/background/bgrender.cpp @@ -124,7 +124,7 @@ TQString KBackgroundRenderer::buildCommand() if (cmd.isEmpty()) return TQString(); - while ((pos = cmd.tqfind('%', pos)) != -1) { + while ((pos = cmd.find('%', pos)) != -1) { if (pos == (int) (cmd.length() - 1)) break; @@ -132,24 +132,24 @@ TQString KBackgroundRenderer::buildCommand() switch (cmd.tqat(pos+1).latin1()) { case 'f': createTempFile(); - cmd.tqreplace(pos, 2, KShellProcess::quote(m_Tempfile->name())); + cmd.replace(pos, 2, KShellProcess::quote(m_Tempfile->name())); pos += m_Tempfile->name().length() - 2; break; case 'x': num.setNum(m_Size.width()); - cmd.tqreplace(pos, 2, num); + cmd.replace(pos, 2, num); pos += num.length() - 2; break; case 'y': num.setNum(m_Size.height()); - cmd.tqreplace(pos, 2, num); + cmd.replace(pos, 2, num); pos += num.length() - 2; break; case '%': - cmd.tqreplace(pos, 2, "%"); + cmd.replace(pos, 2, "%"); pos--; break; default: @@ -584,7 +584,7 @@ void KBackgroundRenderer::fastWallpaperBlend() m_Pixmap.convertFromImage( m_Wallpaper ); return; } - else if( m_WallpaperRect.tqcontains( TQRect( TQPoint( 0, 0 ), m_Size )) + else if( m_WallpaperRect.contains( TQRect( TQPoint( 0, 0 ), m_Size )) && !m_Wallpaper.hasAlphaBuffer()) // wallpaper covers all and no blending m_Pixmap = TQPixmap( m_Size ); else if (m_Background.size() == m_Size) @@ -1251,7 +1251,7 @@ void KVirtualBGRenderer::screenDone(int _desk, int _screen) Q_UNUSED(_screen); const KBackgroundRenderer * sender = dynamic_cast<const KBackgroundRenderer*>(this->sender()); - int screen = m_renderer.tqfind(sender); + int screen = m_renderer.find(sender); if (screen == -1) //?? return; diff --git a/kcontrol/background/bgsettings.cpp b/kcontrol/background/bgsettings.cpp index 6548b066d..c98376cc4 100644 --- a/kcontrol/background/bgsettings.cpp +++ b/kcontrol/background/bgsettings.cpp @@ -122,7 +122,7 @@ void KBackgroundPattern::readSettings() m_Pattern = m_pConfig->readPathEntry("File"); m_Comment = m_pConfig->readEntry("Comment"); if (m_Comment.isEmpty()) - m_Comment = m_File.mid(m_File.tqfindRev('/')+1); + m_Comment = m_File.mid(m_File.findRev('/')+1); } @@ -190,10 +190,10 @@ TQStringList KBackgroundPattern::list() TQStringList::Iterator it; for (it=lst.begin(); it!=lst.end(); ++it) { // Strip path and suffix - int pos = (*it).tqfindRev('/'); + int pos = (*it).findRev('/'); if (pos != -1) (*it) = (*it).mid(pos+1); - pos = (*it).tqfindRev('.'); + pos = (*it).findRev('.'); if (pos != -1) (*it) = (*it).left(pos); } @@ -401,10 +401,10 @@ TQStringList KBackgroundProgram::list() TQStringList::Iterator it; for (it=lst.begin(); it!=lst.end(); ++it) { // Strip path and suffix - int pos = (*it).tqfindRev('/'); + int pos = (*it).findRev('/'); if (pos != -1) (*it) = (*it).mid(pos+1); - pos = (*it).tqfindRev('.'); + pos = (*it).findRev('.'); if (pos != -1) (*it) = (*it).left(pos); } @@ -665,7 +665,7 @@ void KBackgroundSettings::setWallpaperList(TQStringList list) } updateWallpaperFiles(); // Try to keep the current wallpaper (-1 to set position to one before it) - m_CurrentWallpaper = m_WallpaperFiles.tqfindIndex(m_CurrentWallpaperName) - 1; + m_CurrentWallpaper = m_WallpaperFiles.findIndex(m_CurrentWallpaperName) - 1; changeWallpaper(m_CurrentWallpaper < 0); } @@ -751,7 +751,7 @@ void KBackgroundSettings::readSettings(bool reparse) m_BackgroundMode = defBackgroundMode; s = m_pConfig->readEntry("BackgroundMode", "invalid"); - if (m_BMMap.tqcontains(s)) { + if (m_BMMap.contains(s)) { int mode = m_BMMap[s]; // consistency check if ( ((mode != Pattern) && (mode != Program)) || @@ -763,7 +763,7 @@ void KBackgroundSettings::readSettings(bool reparse) m_BlendMode = defBlendMode; s = m_pConfig->readEntry("BlendMode", "invalid"); - if (m_BlMMap.tqcontains(s)) { + if (m_BlMMap.contains(s)) { m_BlendMode = m_BlMMap[s]; } @@ -784,14 +784,14 @@ void KBackgroundSettings::readSettings(bool reparse) m_MultiMode = defMultiMode; s = m_pConfig->readEntry("MultiWallpaperMode"); - if (m_MMMap.tqcontains(s)) { + if (m_MMMap.contains(s)) { int mode = m_MMMap[s]; m_MultiMode = mode; } updateWallpaperFiles(); if( !m_CurrentWallpaperName.isEmpty()) - m_CurrentWallpaper = m_WallpaperFiles.tqfindIndex(m_CurrentWallpaperName); + m_CurrentWallpaper = m_WallpaperFiles.findIndex(m_CurrentWallpaperName); if(m_CurrentWallpaper < 0) m_CurrentWallpaper = 0; @@ -799,7 +799,7 @@ void KBackgroundSettings::readSettings(bool reparse) m_WallpaperMode = defWallpaperMode; m_Wallpaper = m_pConfig->readPathEntry("Wallpaper"); s = m_pConfig->readEntry("WallpaperMode", "invalid"); - if (m_WMMap.tqcontains(s)) { + if (m_WMMap.contains(s)) { int mode = m_WMMap[s]; // consistency check. if ((mode == NoWallpaper) || !m_Wallpaper.isEmpty() || (m_MultiMode == InOrder || m_MultiMode == Random)) diff --git a/kcontrol/clock/dtime.cpp b/kcontrol/clock/dtime.cpp index 7de5c7890..ef3f73ac1 100644 --- a/kcontrol/clock/dtime.cpp +++ b/kcontrol/clock/dtime.cpp @@ -272,7 +272,7 @@ void Dtime::save() list.append(timeServerList->currentText()); for ( int i=0; i<timeServerList->count();i++ ) { TQString text = timeServerList->text(i); - if( list.tqfind(text) == list.end()) + if( list.find(text) == list.end()) list.append(text); // Limit so errors can go away and not stored forever if( list.count() == 10) @@ -284,9 +284,9 @@ void Dtime::save() if(setDateTimeAuto->isChecked() && !ntpUtility.isEmpty()){ // NTP Time setting TQString timeServer = timeServerList->currentText(); - if( timeServer.tqfind( TQRegExp(".*\\(.*\\)$") ) != -1 ) { - timeServer.tqreplace( TQRegExp(".*\\("), "" ); - timeServer.tqreplace( TQRegExp("\\).*"), "" ); + if( timeServer.find( TQRegExp(".*\\(.*\\)$") ) != -1 ) { + timeServer.replace( TQRegExp(".*\\("), "" ); + timeServer.replace( TQRegExp("\\).*"), "" ); // Would this be better?: s/^.*\(([^)]*)\).*$/\1/ } KProcess proc; diff --git a/kcontrol/clock/tzone.cpp b/kcontrol/clock/tzone.cpp index 9812fcd7c..53325c9c5 100644 --- a/kcontrol/clock/tzone.cpp +++ b/kcontrol/clock/tzone.cpp @@ -113,7 +113,7 @@ void Tzone::save() for (TQString line = is.readLine(); !line.isNull(); line = is.readLine()) { - if (line.tqfind("TZ=") == 0) + if (line.find("TZ=") == 0) { *ts << "TZ=" << selectedzone << endl; found = true; diff --git a/kcontrol/colors/colorscm.cpp b/kcontrol/colors/colorscm.cpp index 38a4ea444..aad75704b 100644 --- a/kcontrol/colors/colorscm.cpp +++ b/kcontrol/colors/colorscm.cpp @@ -444,7 +444,7 @@ void KColorScheme::slotSave( ) if (!entry) return; sCurrentScheme = entry->path; KSimpleConfig *config = new KSimpleConfig(sCurrentScheme ); - int i = sCurrentScheme.tqfindRev('/'); + int i = sCurrentScheme.findRev('/'); if (i >= 0) sCurrentScheme = sCurrentScheme.mid(i+1); @@ -800,7 +800,7 @@ void KColorScheme::readScheme( int index ) sCurrentScheme = entry->path; config = new KSimpleConfig(sCurrentScheme, true); config->setGroup("Color Scheme"); - int i = sCurrentScheme.tqfindRev('/'); + int i = sCurrentScheme.findRev('/'); if (i >= 0) sCurrentScheme = sCurrentScheme.mid(i+1); } @@ -905,7 +905,7 @@ int KColorScheme::findSchemeByName(const TQString &scheme) return 1; TQString search = scheme; - int i = search.tqfindRev('/'); + int i = search.findRev('/'); if (i >= 0) search = search.mid(i+1); @@ -972,7 +972,7 @@ void KColorScheme::insertEntry(const TQString &sFile, const TQString &sName) { KColorSchemeEntry *newEntry = new KColorSchemeEntry(sFile, sName, true); mSchemeList->inSort(newEntry); - int newIndex = mSchemeList->tqfindRef(newEntry)+nSysSchemes; + int newIndex = mSchemeList->findRef(newEntry)+nSysSchemes; sList->insertItem(sName, newIndex); sList->setCurrentItem(newIndex); } diff --git a/kcontrol/colors/widgetcanvas.cpp b/kcontrol/colors/widgetcanvas.cpp index 9b7e6e720..0f5d035b6 100644 --- a/kcontrol/colors/widgetcanvas.cpp +++ b/kcontrol/colors/widgetcanvas.cpp @@ -64,7 +64,7 @@ void WidgetCanvas::paintEvent(TQPaintEvent *) void WidgetCanvas::mousePressEvent( TQMouseEvent *me ) { for ( int i = 0; i < MAX_HOTSPOTS; i++ ) - if ( hotspots[i].rect.tqcontains( me->pos() ) ) { + if ( hotspots[i].rect.contains( me->pos() ) ) { emit widgetSelected( hotspots[i].number ); return; } @@ -73,7 +73,7 @@ void WidgetCanvas::mousePressEvent( TQMouseEvent *me ) void WidgetCanvas::mouseMoveEvent( TQMouseEvent *me ) { for ( int i = 0; i < MAX_HOTSPOTS; i++ ) - if ( hotspots[i].rect.tqcontains( me->pos() ) ) { + if ( hotspots[i].rect.contains( me->pos() ) ) { if ( i != currentHotspot ) { TQString tip = tips[hotspots[i].number]; TQToolTip::remove( this ); @@ -91,7 +91,7 @@ void WidgetCanvas::dropEvent( TQDropEvent *e) TQColor c; if (KColorDrag::decode( e, c)) { for ( int i = 0; i < MAX_HOTSPOTS; i++ ) - if ( hotspots[i].rect.tqcontains( e->pos() ) ) { + if ( hotspots[i].rect.contains( e->pos() ) ) { emit colorDropped( hotspots[i].number, c); return; } diff --git a/kcontrol/crypto/crypto.cpp b/kcontrol/crypto/crypto.cpp index f6b3c9b16..e8f2d7ac0 100644 --- a/kcontrol/crypto/crypto.cpp +++ b/kcontrol/crypto/crypto.cpp @@ -128,7 +128,7 @@ OtherCertItem::OtherCertItem( TQListView *view, const TQString& sub, const TQStr m_module = module; KSSLX509Map cert(sub); setText(0, cert.getValue("O")); - setText(1, cert.getValue("CN").tqreplace("\n", ", ")); + setText(1, cert.getValue("CN").replace("\n", ", ")); if (_exp.date().year() > 3000 || _exp.date().year() < 1900) _exp.setDate(TQDate(3000,1,1)); @@ -151,7 +151,7 @@ YourCertItem::YourCertItem( TQListView *view, TQString pkcs, TQString pass, TQSt { m_module = module; KSSLX509Map cert(name); - TQString tmp = cert.getValue("CN").tqreplace("\n", ", "); + TQString tmp = cert.getValue("CN").replace("\n", ", "); setText(0, tmp); setText(1, cert.getValue("Email")); _pkcs = pkcs; @@ -180,10 +180,10 @@ KSSLX509Map mcert(name); TQString tmp; setText(0, mcert.getValue("O")); tmp = mcert.getValue("OU"); - tmp.tqreplace("\n", ", "); + tmp.replace("\n", ", "); setText(1, tmp); tmp = mcert.getValue("CN"); - tmp.tqreplace("\n", ", "); + tmp.replace("\n", ", "); setText(2, tmp); _name = name; _cert = cert; @@ -1921,7 +1921,7 @@ void KCryptoConfig::slotCAImport() { if (certStore) { KOSSL::self()->X509_STORE_free(certStore); certStore = NULL; } - if (certtext.tqcontains("-----BEGIN CERTIFICATE-----")) { + if (certtext.contains("-----BEGIN CERTIFICATE-----")) { qf.reset(); certtext = TQString(); while (!qf.atEnd()) { @@ -1929,10 +1929,10 @@ void KCryptoConfig::slotCAImport() { qf.readLine(xx, qf.size()); certtext += xx; } - certtext = certtext.tqreplace("-----BEGIN CERTIFICATE-----", TQString()); - certtext = certtext.tqreplace("-----END CERTIFICATE-----", TQString()); + certtext = certtext.replace("-----BEGIN CERTIFICATE-----", TQString()); + certtext = certtext.replace("-----END CERTIFICATE-----", TQString()); certtext = certtext.stripWhiteSpace(); - certtext = certtext.tqreplace("\n", TQString()); + certtext = certtext.replace("\n", TQString()); } else { // Must [could?] be DER qf.close(); @@ -2350,7 +2350,7 @@ SSL_CONST SSL_METHOD *meth; break; // Leak of sc*? TQString scn(sc->name); - if (scn.tqcontains("ADH-") || scn.tqcontains("NULL-") || scn.tqcontains("DES-CBC3-SHA") || scn.tqcontains("FZA-")) { + if (scn.contains("ADH-") || scn.contains("NULL-") || scn.contains("DES-CBC3-SHA") || scn.contains("FZA-")) { continue; } k = SSL_CIPHER_get_bits(sc, &j); @@ -2378,7 +2378,7 @@ SSL_CONST SSL_METHOD *meth; break; // Leak of sc*? TQString scn(sc->name); - if (scn.tqcontains("ADH-") || scn.tqcontains("NULL-") || scn.tqcontains("DES-CBC3-SHA") || scn.tqcontains("FZA-")) { + if (scn.contains("ADH-") || scn.contains("NULL-") || scn.contains("DES-CBC3-SHA") || scn.contains("FZA-")) { continue; } k = SSL_CIPHER_get_bits(sc, &j); diff --git a/kcontrol/css/template.cpp b/kcontrol/css/template.cpp index a34839ef2..e237ed796 100644 --- a/kcontrol/css/template.cpp +++ b/kcontrol/css/template.cpp @@ -23,16 +23,16 @@ bool CSSTemplate::expand(TQString destname, const TQMap<TQString,TQString> &dict { line = is.readLine(); - int start = line.tqfind('$'); + int start = line.find('$'); if (start >= 0) { - int end = line.tqfind('$', start+1); + int end = line.find('$', start+1); if (end >= 0) { TQString expr = line.mid(start+1, end-start-1); TQString res = dict[expr]; - line.tqreplace(start, end-start+1, res); + line.replace(start, end-start+1, res); } } os << line << endl; diff --git a/kcontrol/display/display.cpp b/kcontrol/display/display.cpp index 9e3293965..189d4723b 100644 --- a/kcontrol/display/display.cpp +++ b/kcontrol/display/display.cpp @@ -85,7 +85,7 @@ void KCMDisplay::save() void KCMDisplay::moduleChanged( bool isChanged ) { - TQMap<KCModule*, bool>::Iterator currentModule = m_modules.tqfind(static_cast<KCModule*>(TQT_TQWIDGET(const_cast<TQObject*>(TQT_TQOBJECT_CONST(sender()))))); + TQMap<KCModule*, bool>::Iterator currentModule = m_modules.find(static_cast<KCModule*>(TQT_TQWIDGET(const_cast<TQObject*>(TQT_TQOBJECT_CONST(sender()))))); Q_ASSERT(currentModule != m_modules.end()); if (currentModule.data() == isChanged) return; diff --git a/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp b/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp index 6604a5a08..fc92c945d 100644 --- a/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp +++ b/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp @@ -459,7 +459,7 @@ SearchProviderItem *FilterOptions::displaySearchProvider(SearchProvider *p, bool item = new SearchProviderItem(m_dlg->lvSearchProviders, p); - if (m_favoriteEngines.tqfind(p->desktopEntryName())!=m_favoriteEngines.end()) + if (m_favoriteEngines.find(p->desktopEntryName())!=m_favoriteEngines.end()) item->setOn(true); for (itemCount = 1; itemCount < totalCount; itemCount++) diff --git a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp index 0e800a36c..9f3a245fc 100644 --- a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp +++ b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp @@ -64,7 +64,7 @@ TQString KURISearchFilterEngine::webShortcutQuery( const TQString& typedString ) if (m_bWebShortcutsEnabled) { TQString search = typedString; - int pos = search.tqfind(m_cKeywordDelimiter); + int pos = search.find(m_cKeywordDelimiter); TQString key; if (pos > -1) @@ -98,7 +98,7 @@ TQString KURISearchFilterEngine::autoWebSearchQuery( const TQString& typedString if (m_bWebShortcutsEnabled && !m_defaultSearchEngine.isEmpty()) { // Make sure we ignore supported protocols, e.g. "smb:", "http:" - int pos = typedString.tqfind(':'); + int pos = typedString.find(':'); if (pos == -1 || !KProtocolInfo::isKnownProtocol(typedString.left(pos))) { @@ -147,7 +147,7 @@ TQStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map, int i = 0; int n = 0; TQString s = userquery.mid (pos, qsexpr.matchedLength()); - while ((i = s.tqfind(" ")) != -1) + while ((i = s.find(" ")) != -1) { s = s.replace (i, 1, "%20"); n++; @@ -163,11 +163,11 @@ TQStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map, // Back-substitute quoted strings (%20 -> " "): { int i = 0; - while ((i = userquery.tqfind("%20")) != -1) - userquery = userquery.tqreplace(i, 3, " "); + while ((i = userquery.find("%20")) != -1) + userquery = userquery.replace(i, 3, " "); for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) - *it = (*it).tqreplace("%20", " "); + *it = (*it).replace("%20", " "); } PIDDBG << "Generating substitution map:\n"; @@ -187,23 +187,23 @@ TQStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map, v = l[i-1]; // Back-substitute quoted strings (%20 -> " "): - while ((j = v.tqfind("%20")) != -1) - v = v.tqreplace(j, 3, " "); + while ((j = v.find("%20")) != -1) + v = v.replace(j, 3, " "); // Insert partial queries (referenced by \1 ... \n) to map: - map.tqreplace(TQString::number(i), v); + map.replace(TQString::number(i), v); PDVAR (" map['" + nr + "']", map[nr]); // Insert named references (referenced by \name) to map: j = 0; - if ((i>0) && (pos = v.tqfind("=")) > 0) + if ((i>0) && (pos = v.find("=")) > 0) { TQString s = v.mid(pos + 1); TQString k = v.left(pos); // Back-substitute references contained in references (e.g. '\refname' substitutes to 'thisquery=\0') - while ((j = s.tqfind("%5C")) != -1) s = s.tqreplace(j, 3, "\\"); - map.tqreplace(k, s); + while ((j = s.find("%5C")) != -1) s = s.replace(j, 3, "\\"); + map.replace(k, s); PDVAR (" map['" + k + "']", map[k]); } } @@ -231,12 +231,12 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & // Check, if old style '\1' is found and replace it with \{@} (compatibility mode): { int pos = -1; - if ((pos = newurl.tqfind("\\1")) >= 0) + if ((pos = newurl.find("\\1")) >= 0) { PIDDBG << "WARNING: Using compatibility mode for newurl='" << newurl << "'. Please replace old style '\\1' with new style '\\{0}' " "in the query definition.\n"; - newurl = newurl.tqreplace(pos, 2, "\\{@}"); + newurl = newurl.replace(pos, 2, "\\{@}"); } } @@ -275,7 +275,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & // Substitute a range of keywords if (range.search(rlitem, 0) >= 0) { - int pos = rlitem.tqfind("-"); + int pos = rlitem.find("-"); int first = rlitem.left(pos).toInt(); int last = rlitem.right(rlitem.length()-pos-1).toInt(); @@ -307,7 +307,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & v = encodeString(s, encodingMib); PDVAR (" default", s); } - else if (map.tqcontains(rlitem)) + else if (map.contains(rlitem)) { // Use value from substitution map: found = true; @@ -340,7 +340,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & // Encode '+', otherwise it would be interpreted as space in the resulting url: int vpos = 0; - while ((vpos = v.tqfind('+')) != -1) + while ((vpos = v.find('+')) != -1) v = v.replace (vpos, 1, "%2B"); } @@ -353,7 +353,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & i++; } - newurl = newurl.tqreplace(pos, reflist.matchedLength(), v); + newurl = newurl.replace(pos, reflist.matchedLength(), v); } // Special handling for \{@}; @@ -370,7 +370,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & // Substitute \{@} with list of unmatched query strings int vpos = 0; - while ((vpos = newurl.tqfind("\\@")) != -1) + while ((vpos = newurl.find("\\@")) != -1) newurl = newurl.replace (vpos, 2, v); } } @@ -397,7 +397,7 @@ TQString KURISearchFilterEngine::formatResult( const TQString& url, { // Return nothing if userquery is empty and it contains // substitution strings... - if (query.isEmpty() && url.tqfind(TQRegExp(TQRegExp::escape("\\{"))) > 0) + if (query.isEmpty() && url.find(TQRegExp(TQRegExp::escape("\\{"))) > 0) return TQString::null; // Debug info of map: @@ -427,13 +427,13 @@ TQString KURISearchFilterEngine::formatResult( const TQString& url, PDVAR ("query definition", url); // Add charset indicator for the query to substitution map: - map.tqreplace("ikw_charset", cseta); + map.replace("ikw_charset", cseta); // Add charset indicator for the fallback query to substitution map: TQString csetb = cset2; if (csetb.isEmpty()) csetb = "iso-8859-1"; - map.tqreplace("wsc_charset", csetb); + map.replace("wsc_charset", csetb); TQString newurl = substituteQuery (url, map, userquery, csetacodec->mibEnum()); diff --git a/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp b/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp index 183d2a288..586f947ff 100644 --- a/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp +++ b/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp @@ -60,7 +60,7 @@ SearchProviderDialog::SearchProviderDialog(SearchProvider *provider, m_dlg->leName->setText(m_provider->name()); m_dlg->leQuery->setText(m_provider->query()); m_dlg->leShortcut->setText(m_provider->keys().join(",")); - m_dlg->cbCharset->setCurrentItem(m_provider->charset().isEmpty() ? 0 : charsets.tqfindIndex(m_provider->charset())); + m_dlg->cbCharset->setCurrentItem(m_provider->charset().isEmpty() ? 0 : charsets.findIndex(m_provider->charset())); m_dlg->leName->setEnabled(false); m_dlg->leQuery->setFocus(); } @@ -81,7 +81,7 @@ void SearchProviderDialog::slotChanged() void SearchProviderDialog::slotOk() { - if ((m_dlg->leQuery->text().tqfind("\\{") == -1) + if ((m_dlg->leQuery->text().find("\\{") == -1) && KMessageBox::warningContinueCancel(0, i18n("The URI does not contain a \\{...} placeholder for the user query.\n" "This means that the same page is always going to be visited, " diff --git a/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp b/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp index a893e9f3a..f81fda73d 100644 --- a/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp +++ b/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp @@ -71,8 +71,8 @@ bool LocalDomainURIFilter::filterURI( KURIFilterData& data ) const bool LocalDomainURIFilter::isLocalDomainHost( TQString& cmd ) const { // find() returns -1 when no match -> left()/truncate() are noops then - TQString host( cmd.left( cmd.tqfind( '/' ) ) ); - host.truncate( host.tqfind( ':' ) ); // Remove port number + TQString host( cmd.left( cmd.find( '/' ) ) ); + host.truncate( host.find( ':' ) ); // Remove port number if( !(host == last_host && last_time > time( NULL ) - 5 ) ) { @@ -95,7 +95,7 @@ bool LocalDomainURIFilter::isLocalDomainHost( TQString& cmd ) const last_result = proc.wait( 1 ) && proc.normalExit() && !proc.exitStatus(); if( !m_fullname.isEmpty() ) - cmd.tqreplace( 0, host.length(), m_fullname ); + cmd.replace( 0, host.length(), m_fullname ); } return last_result; diff --git a/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp b/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp index 40d97e29d..bee6e99c4 100644 --- a/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp +++ b/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp @@ -66,7 +66,7 @@ static bool isValidShortURL( const TQString& cmd, bool verbose = false ) // Match FQDN_PATTERN exp.setPattern( QFL1(FQDN_PATTERN) ); - if ( cmd.tqcontains( exp ) ) + if ( cmd.contains( exp ) ) { if (verbose) kdDebug() << "KShortURIFilter::isValidShortURL: " << cmd @@ -85,7 +85,7 @@ static bool isValidShortURL( const TQString& cmd, bool verbose = false ) // Match IPv4 addresses exp.setPattern( QFL1(IPv4_PATTERN) ); - if ( cmd.tqcontains( exp ) ) + if ( cmd.contains( exp ) ) { if (verbose) kdDebug() << "KShortURIFilter::isValidShortURL: " << cmd @@ -95,7 +95,7 @@ static bool isValidShortURL( const TQString& cmd, bool verbose = false ) // Match IPv6 addresses exp.setPattern( QFL1(IPv6_PATTERN) ); - if ( cmd.tqcontains( exp ) ) + if ( cmd.contains( exp ) ) { if (verbose) kdDebug() << "KShortURIFilter::isValidShortURL: " << cmd @@ -121,7 +121,7 @@ static TQString removeArgs( const TQString& _cmd ) do { - spacePos = cmd.tqfind( ' ', spacePos+1 ); + spacePos = cmd.find( ' ', spacePos+1 ); } while ( spacePos > 1 && cmd[spacePos - 1] == '\\' ); if( spacePos > 0 ) @@ -182,7 +182,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const // You mean caching the last filtering, to try and reuse it, to save stat()s? (David) const TQString starthere_proto = QFL1("start-here:"); - if (cmd.tqfind(starthere_proto, 0, true) == 0 ) + if (cmd.find(starthere_proto, 0, true) == 0 ) { setFilteredURI( data, KURL("system:/") ); setURIType( data, KURIFilterData::LOCAL_DIR ); @@ -193,8 +193,8 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const const TQString man_proto = QFL1("man:"); const TQString info_proto = QFL1("info:"); if( cmd[0] == '#' || - cmd.tqfind( man_proto, 0, true ) == 0 || - cmd.tqfind( info_proto, 0, true ) == 0 ) + cmd.find( man_proto, 0, true ) == 0 || + cmd.find( info_proto, 0, true ) == 0 ) { if( cmd.left(2) == QFL1("##") ) cmd = QFL1("info:/") + cmd.mid(2); @@ -213,7 +213,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const if ( cmd.startsWith( TQString::tqfromLatin1( "\\\\") ) ) { // make sure path is unix style - cmd.tqreplace('\\', '/'); + cmd.replace('\\', '/'); cmd.prepend( TQString::tqfromLatin1( "smb:" ) ); setFilteredURI( data, KURL( cmd )); setURIType( data, KURIFilterData::NET_PROTOCOL ); @@ -257,7 +257,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const if( path[0] == '~' ) { - int slashPos = path.tqfind('/'); + int slashPos = path.find('/'); if( slashPos == -1 ) slashPos = path.length(); if( slashPos == 1 ) // ~/ @@ -293,7 +293,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const const char* exp = getenv( path.mid( 1, r.matchedLength() - 1 ).local8Bit().data() ); if(exp) { - path.tqreplace( 0, r.matchedLength(), TQString::fromLocal8Bit(exp) ); + path.replace( 0, r.matchedLength(), TQString::fromLocal8Bit(exp) ); expanded = true; } } @@ -303,7 +303,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const { // Look for #ref again, after $ and ~ expansion (testcase: $QTDIR/doc/html/functions.html#s) // Can't use KURL here, setPath would escape it... - int pos = path.tqfind('#'); + int pos = path.find('#'); if ( pos > -1 ) { ref = path.mid( pos + 1 ); @@ -354,12 +354,12 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const if ( !exists ) { // Support for name filter (/foo/*.txt), see also KonqMainWindow::detectNameFilter // If the app using this filter doesn't support it, well, it'll simply error out itself - int lastSlash = path.tqfindRev( '/' ); - if ( lastSlash > -1 && path.tqfind( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments + int lastSlash = path.findRev( '/' ); + if ( lastSlash > -1 && path.find( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments { TQString fileName = path.mid( lastSlash + 1 ); TQString testPath = path.left( lastSlash + 1 ); - if ( ( fileName.tqfind( '*' ) != -1 || fileName.tqfind( '[' ) != -1 || fileName.tqfind( '?' ) != -1 ) + if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 ) && stat( TQFile::encodeName(testPath).data(), &buff ) == 0 ) { nameFilter = fileName; @@ -453,7 +453,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const // Okay this is the code that allows users to supply custom matches for // specific URLs using Qt's regexp class. This is hard-coded for now. // TODO: Make configurable at some point... - if ( !cmd.tqcontains( ' ' ) ) + if ( !cmd.contains( ' ' ) ) { TQValueList<URLHint>::ConstIterator it; for( it = m_urlHints.begin(); it != m_urlHints.end(); ++it ) diff --git a/kcontrol/filetypes/filetypesview.cpp b/kcontrol/filetypes/filetypesview.cpp index 940d4afa3..45c700fd9 100644 --- a/kcontrol/filetypes/filetypesview.cpp +++ b/kcontrol/filetypes/filetypesview.cpp @@ -174,11 +174,11 @@ void FileTypesView::readFileTypes() TQValueListIterator<KMimeType::Ptr> it2(mimetypes.begin()); for (; it2 != mimetypes.end(); ++it2) { TQString mimetype = (*it2)->name(); - int index = mimetype.tqfind("/"); + int index = mimetype.find("/"); TQString maj = mimetype.left(index); TQString min = mimetype.right(mimetype.length() - index+1); - TQMapIterator<TQString,TypesListItem*> mit = m_majorMap.tqfind( maj ); + TQMapIterator<TQString,TypesListItem*> mit = m_majorMap.find( maj ); if ( mit == m_majorMap.end() ) { groupItem = new TypesListItem( typesLV, maj ); m_majorMap.insert( maj, groupItem ); @@ -196,7 +196,7 @@ void FileTypesView::readFileTypes() void FileTypesView::slotEmbedMajor(const TQString &major, bool &embed) { TypesListItem *groupItem; - TQMapIterator<TQString,TypesListItem*> mit = m_majorMap.tqfind( major ); + TQMapIterator<TQString,TypesListItem*> mit = m_majorMap.find( major ); if ( mit == m_majorMap.end() ) return; @@ -425,7 +425,7 @@ void FileTypesView::slotDatabaseChanged() TQValueList<TypesListItem *>::Iterator it = m_itemsModified.begin(); for( ; it != m_itemsModified.end(); ++it ) { TQString name = (*it)->name(); - if ( removedList.tqfind( name ) == removedList.end() ) // if not deleted meanwhile + if ( removedList.find( name ) == removedList.end() ) // if not deleted meanwhile (*it)->refresh(); } m_itemsModified.clear(); diff --git a/kcontrol/filetypes/typeslistitem.cpp b/kcontrol/filetypes/typeslistitem.cpp index 21061b065..3380f86f9 100644 --- a/kcontrol/filetypes/typeslistitem.cpp +++ b/kcontrol/filetypes/typeslistitem.cpp @@ -92,7 +92,7 @@ void TypesListItem::init(KMimeType::Ptr mimetype) m_bFullInit = false; m_mimetype = mimetype; - int index = mimetype->name().tqfind("/"); + int index = mimetype->name().find("/"); if (index != -1) { m_major = mimetype->name().left(index); m_minor = mimetype->name().right(mimetype->name().length() - @@ -343,18 +343,18 @@ void TypesListItem::sync() continue; // Only those which were added in init() // Look in the correct list... - if ( (isApplication && ! m_appServices.tqcontains( pService->desktopEntryPath() )) - || (!isApplication && !m_embedServices.tqcontains( pService->desktopEntryPath() )) + if ( (isApplication && ! m_appServices.contains( pService->desktopEntryPath() )) + || (!isApplication && !m_embedServices.contains( pService->desktopEntryPath() )) ) { // The service was in m_appServices but has been removed // create a new .desktop file without this mimetype if( s_changedServices == NULL ) deleter.setObject( s_changedServices, new TQMap< TQString, TQStringList > ); - TQStringList mimeTypeList = s_changedServices->tqcontains( pService->desktopEntryPath()) + TQStringList mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) ? (*s_changedServices)[ pService->desktopEntryPath() ] : pService->serviceTypes(); - if ( mimeTypeList.tqcontains( name() ) ) { + if ( mimeTypeList.contains( name() ) ) { // The mimetype is listed explicitly in the .desktop files, so // just remove it and we're done KConfig *desktop; @@ -370,12 +370,12 @@ void TypesListItem::sync() } desktop->setDesktopGroup(); - mimeTypeList = s_changedServices->tqcontains( pService->desktopEntryPath()) + mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) ? (*s_changedServices)[ pService->desktopEntryPath() ] : desktop->readListEntry("MimeType", ';'); // Remove entry and the number that might follow. TQStringList::Iterator it; - for(;(it = mimeTypeList.tqfind(name())) != mimeTypeList.end();) + for(;(it = mimeTypeList.find(name())) != mimeTypeList.end();) { it = mimeTypeList.remove(it); if (it != mimeTypeList.end()) @@ -438,7 +438,7 @@ KMimeType::Ptr TypesListItem::findImplicitAssociation(const TQString &desktop) if( s_changedServices == NULL ) deleter.setObject( s_changedServices, new TQMap< TQString, TQStringList > ); - TQStringList mimeTypeList = s_changedServices->tqcontains( s->desktopEntryPath()) + TQStringList mimeTypeList = s_changedServices->contains( s->desktopEntryPath()) ? (*s_changedServices)[ s->desktopEntryPath() ] : s->serviceTypes(); for(TQStringList::ConstIterator it = mimeTypeList.begin(); @@ -477,10 +477,10 @@ void TypesListItem::saveServices( KConfig & profile, TQStringList services, cons // merge new mimetype if( s_changedServices == NULL ) deleter.setObject( s_changedServices, new TQMap< TQString, TQStringList > ); - TQStringList mimeTypeList = s_changedServices->tqcontains( pService->desktopEntryPath()) + TQStringList mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) ? (*s_changedServices)[ pService->desktopEntryPath() ] : pService->serviceTypes(); - if (!mimeTypeList.tqcontains(name()) && !inheritsMimetype(m_mimetype, mimeTypeList)) + if (!mimeTypeList.contains(name()) && !inheritsMimetype(m_mimetype, mimeTypeList)) { KConfig *desktop; if ( pService->type() == TQString("Service") ) @@ -495,7 +495,7 @@ void TypesListItem::saveServices( KConfig & profile, TQStringList services, cons } desktop->setDesktopGroup(); - mimeTypeList = s_changedServices->tqcontains( pService->desktopEntryPath()) + mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) ? (*s_changedServices)[ pService->desktopEntryPath() ] : desktop->readListEntry("MimeType", ';'); mimeTypeList.append(name()); diff --git a/kcontrol/fonts/kxftconfig.cpp b/kcontrol/fonts/kxftconfig.cpp index 95888e4db..fa4dc788e 100644 --- a/kcontrol/fonts/kxftconfig.cpp +++ b/kcontrol/fonts/kxftconfig.cpp @@ -52,7 +52,7 @@ TQString KXftConfig::contractHome(TQString path) unsigned int len = home.length(); if(path.length() == len || path[len] == '/') - return path.tqreplace(0, len, TQString::tqfromLatin1("~")); + return path.replace(0, len, TQString::tqfromLatin1("~")); } } @@ -62,7 +62,7 @@ TQString KXftConfig::contractHome(TQString path) TQString KXftConfig::expandHome(TQString path) { if(!path.isEmpty() && '~'==path[0]) - return 1==path.length() ? TQDir::homeDirPath() : path.tqreplace(0, 1, TQDir::homeDirPath()); + return 1==path.length() ? TQDir::homeDirPath() : path.replace(0, 1, TQDir::homeDirPath()); return path; } @@ -88,9 +88,9 @@ static TQString dirSyntax(const TQString &d) { TQString ds(d); - ds.tqreplace("//", "/"); + ds.replace("//", "/"); - int slashPos=ds.tqfindRev('/'); + int slashPos=ds.findRev('/'); if(slashPos!=(((int)ds.length())-1)) ds.append('/'); @@ -106,7 +106,7 @@ static TQString xDirSyntax(const TQString &d) if(!d.isNull()) { TQString ds(d); - int slashPos=ds.tqfindRev('/'); + int slashPos=ds.findRev('/'); if(slashPos==(((int)ds.length())-1)) ds.remove(slashPos, 1); @@ -143,7 +143,7 @@ static TQString getDir(const TQString &f) { TQString d(f); - int slashPos=d.tqfindRev('/'); + int slashPos=d.findRev('/'); if(-1!=slashPos) d.remove(slashPos+1, d.length()); @@ -191,11 +191,11 @@ TQString getConfigFile(bool system) if(fExists(f)) { - if(system || 0==fileSyntax(f).tqfind(home)) // For nonsystem, only consider file within $HOME + if(system || 0==fileSyntax(f).find(home)) // For nonsystem, only consider file within $HOME files.append(f); } #if (FC_VERSION>=20300) - if(system && dExists(f) && (-1!=f.tqfind(TQRegExp("/conf\\.d/?$")) || -1!=f.tqfind(TQRegExp("/conf\\.d?$"))) ) + if(system && dExists(f) && (-1!=f.find(TQRegExp("/conf\\.d/?$")) || -1!=f.find(TQRegExp("/conf\\.d?$"))) ) return dirSyntax(f)+constKdeRootFcFile; // This ones good enough for me! #endif } @@ -208,7 +208,7 @@ TQString getConfigFile(bool system) end(files.end()); for(; it!=end; ++it) - if(-1!=(*it).tqfind(TQRegExp(system ? "/local\\.conf$" : "/\\.?fonts\\.conf$"))) + if(-1!=(*it).find(TQRegExp(system ? "/local\\.conf$" : "/\\.?fonts\\.conf$"))) return *it; return files.front(); // Just return the 1st one... } @@ -645,13 +645,13 @@ bool KXftConfig::apply() TQString str(m_doc.toString()); int idx; - if(0!=str.tqfind("<?xml")) + if(0!=str.find("<?xml")) str.insert(0, xmlHeader); - else if(0==str.tqfind(qtXmlHeader)) - str.tqreplace(0, strlen(qtXmlHeader), xmlHeader); + else if(0==str.find(qtXmlHeader)) + str.replace(0, strlen(qtXmlHeader), xmlHeader); - if(-1!=(idx=str.tqfind(qtDocTypeLine))) - str.tqreplace(idx, strlen(qtDocTypeLine), docTypeLine); + if(-1!=(idx=str.find(qtDocTypeLine))) + str.replace(idx, strlen(qtDocTypeLine), docTypeLine); // // Write to file... @@ -947,7 +947,7 @@ bool KXftConfig::hasDir(const TQString &d) ListItem *item; for(item=m_dirs.first(); item; item=m_dirs.next()) - if(0==dir.tqfind(item->str)) + if(0==dir.find(item->str)) return true; return false; @@ -1291,7 +1291,7 @@ void KXftConfig::applySubPixelType() if(m_subPixel.node.isNull()) m_doc.documentElement().appendChild(matchNode); else - m_doc.documentElement().tqreplaceChild(matchNode, m_subPixel.node); + m_doc.documentElement().replaceChild(matchNode, m_subPixel.node); m_subPixel.node=matchNode; } @@ -1323,7 +1323,7 @@ void KXftConfig::applyHintStyle() if(m_hint.node.isNull()) m_doc.documentElement().appendChild(matchNode); else - m_doc.documentElement().tqreplaceChild(matchNode, m_hint.node); + m_doc.documentElement().replaceChild(matchNode, m_hint.node); m_hint.node=matchNode; } } @@ -1344,7 +1344,7 @@ void KXftConfig::applyHinting() if(m_hinting.node.isNull()) m_doc.documentElement().appendChild(matchNode); else - m_doc.documentElement().tqreplaceChild(matchNode, m_hinting.node); + m_doc.documentElement().replaceChild(matchNode, m_hinting.node); m_hinting.node=matchNode; } diff --git a/kcontrol/icons/icons.cpp b/kcontrol/icons/icons.cpp index 5ad1ae759..6c9e154f7 100644 --- a/kcontrol/icons/icons.cpp +++ b/kcontrol/icons/icons.cpp @@ -202,22 +202,22 @@ void KIconConfig::initDefaults() mEffects[i][2] = mDefaultEffect[2]; } // Animate desktop icons by default - int group = mGroups.tqfindIndex( "Desktop" ); + int group = mGroups.findIndex( "Desktop" ); if ( group != -1 ) mbAnimated[group] = true; // This is the new default in KDE 2.2, in sync with the kiconeffect of kdelibs Nolden 2001/06/11 - int activeState = mStates.tqfindIndex( "Active" ); + int activeState = mStates.findIndex( "Active" ); if ( activeState != -1 ) { - int group = mGroups.tqfindIndex( "Desktop" ); + int group = mGroups.findIndex( "Desktop" ); if ( group != -1 ) { mEffects[ group ][ activeState ].type = KIconEffect::ToGamma; mEffects[ group ][ activeState ].value = 0.7; } - group = mGroups.tqfindIndex( "Panel" ); + group = mGroups.findIndex( "Panel" ); if ( group != -1 ) { mEffects[ group ][ activeState ].type = KIconEffect::ToGamma; diff --git a/kcontrol/icons/iconthemes.cpp b/kcontrol/icons/iconthemes.cpp index d932c2e18..5d7f924a9 100644 --- a/kcontrol/icons/iconthemes.cpp +++ b/kcontrol/icons/iconthemes.cpp @@ -138,7 +138,7 @@ void IconThemesConfig::loadThemes() tname=name; // Just in case we have duplicated icon theme names on separate directories - for (int i=2; m_themeNames.tqfind(tname)!=m_themeNames.end() ; i++) + for (int i=2; m_themeNames.find(tname)!=m_themeNames.end() ; i++) tname=TQString("%1-%2").arg(name).arg(i); m_iconThemes->insertItem(new TQListViewItem(m_iconThemes,name, diff --git a/kcontrol/info/info_fbsd.cpp b/kcontrol/info/info_fbsd.cpp index 3f67b4b7a..3ccd1c086 100644 --- a/kcontrol/info/info_fbsd.cpp +++ b/kcontrol/info/info_fbsd.cpp @@ -347,24 +347,24 @@ bool GetInfo_Devices (TQListView *lbox) TQString GetController(const TQString &line) { - if ( ( (line.startsWith("ad")) || (line.startsWith("afd")) || (line.startsWith("acd")) ) && (line.tqfind(":") < 6) ) { + if ( ( (line.startsWith("ad")) || (line.startsWith("afd")) || (line.startsWith("acd")) ) && (line.find(":") < 6) ) { TQString controller = line; - controller.remove(0, controller.tqfind(" at ")+4); - if (controller.tqfind("-slave") != -1) { - controller.remove(controller.tqfind("-slave"), controller.length()); - } else if (controller.tqfind("-master") != -1) { - controller.remove(controller.tqfind("-master"), controller.length()); + controller.remove(0, controller.find(" at ")+4); + if (controller.find("-slave") != -1) { + controller.remove(controller.find("-slave"), controller.length()); + } else if (controller.find("-master") != -1) { + controller.remove(controller.find("-master"), controller.length()); } else controller=TQString::null; if (!controller.isNull()) return controller; } - if (line.tqfind(" on ") != -1) { + if (line.find(" on ") != -1) { TQString controller; controller = line; - controller.remove(0, controller.tqfind(" on ")+4); - if (controller.tqfind(" ") != -1) - controller.remove(controller.tqfind(" "), controller.length()); + controller.remove(0, controller.find(" on ")+4); + if (controller.find(" ") != -1) + controller.remove(controller.find(" "), controller.length()); return controller; } return TQString::null; @@ -373,13 +373,13 @@ TQString GetController(const TQString &line) Device *GetDevice(const TQString &line) { Device *dev; - int colon = line.tqfind(":"); + int colon = line.find(":"); if (colon == -1) return 0; dev = new Device; dev->name = line.mid(0, colon); - dev->description = line.mid(line.tqfind("<")+1, line.length()); - dev->description.remove(dev->description.tqfind(">"), dev->description.length()); + dev->description = line.mid(line.find("<")+1, line.length()); + dev->description.remove(dev->description.find(">"), dev->description.length()); return dev; } diff --git a/kcontrol/info/info_linux.cpp b/kcontrol/info/info_linux.cpp index 196029781..18287c45f 100644 --- a/kcontrol/info/info_linux.cpp +++ b/kcontrol/info/info_linux.cpp @@ -109,7 +109,7 @@ bool GetInfo_ReadfromFile(TQListView * lbox, const char *FileName, line = stream.readLine(); if (!line.isEmpty()) { if (!splitChar.isNull()) { - int pos = line.tqfind(splitChar); + int pos = line.find(splitChar); s1 = line.left(pos-1).stripWhiteSpace(); s2 = line.mid(pos+1).stripWhiteSpace(); } @@ -228,11 +228,11 @@ bool GetInfo_Devices(TQListView * lBox) while (!stream.atEnd()) { line = stream.readLine(); if (!line.isEmpty()) { - if (-1 != line.tqfind("character device",0,false)) { + if (-1 != line.find("character device",0,false)) { parent = new TQListViewItem(lBox,parent,i18n("Character Devices")); parent->setPixmap(0,SmallIcon("chardevice")); parent->setOpen(true); - } else if (-1 != line.tqfind("block device",0,false)) { + } else if (-1 != line.find("block device",0,false)) { parent = new TQListViewItem(lBox,parent,i18n("Block Devices")); parent->setPixmap(0,SmallIcon("blockdevice")); parent->setOpen(true); @@ -293,7 +293,7 @@ static void cleanPassword(TQString & str) while (index >= 0) { - index = str.tqfind(passwd, index, FALSE); + index = str.find(passwd, index, FALSE); if (index >= 0) { index += passwd.length(); while (index < (int) str.length() && @@ -473,7 +473,7 @@ bool GetInfo_Partitions(TQListView * lbox) while (file->readLine(buf, sizeof( buf )) > 0) { str = TQString::fromLocal8Bit(buf); if (str.length()) { - int p = str.tqfind(' '); /* find first space. */ + int p = str.find(' '); /* find first space. */ if (p) str.remove(p, 1024); /* erase all chars including space. */ Mounted_Partitions.append(str); @@ -503,7 +503,7 @@ bool GetInfo_Partitions(TQListView * lbox) #endif { total = avail = 0; /* initialize size.. */ - found_in_List = (Mounted_Partitions.tqcontains(FS_NAME) > 0); + found_in_List = (Mounted_Partitions.contains(FS_NAME) > 0); if (found_in_List && statfs(FS_FILE, &sfs) == 0) { total = ((LONG_TYPE) sfs.f_blocks) * sfs.f_bsize; avail = (getuid()? sfs.f_bavail : sfs.f_bfree) @@ -573,7 +573,7 @@ bool GetInfo_CD_ROM(TQListView * lBox) if (-1 != rx.search(line)) { TQString text = rx.cap(1); TQString value = rx.cap(2); - if (!text.tqcontains('#')) { + if (!text.contains('#')) { if (value == "0") value = KStdGuiItem::no().plainText(); if (value == "1") diff --git a/kcontrol/info/info_netbsd.cpp b/kcontrol/info/info_netbsd.cpp index 8eb9acf2e..b779eac29 100644 --- a/kcontrol/info/info_netbsd.cpp +++ b/kcontrol/info/info_netbsd.cpp @@ -125,18 +125,18 @@ static bool GetDmesgInfo(TQListView *lBox, const char *filter, TQListViewItem *olditem = NULL; while(!(s = t->readLine().local8Bit()).isEmpty()) { if (!seencpu) { - if (s.tqcontains("cpu")) + if (s.contains("cpu")) seencpu = true; else continue; } - if (s.tqcontains("boot device") || - s.tqcontains("WARNING: old BSD partition ID!")) + if (s.contains("boot device") || + s.contains("WARNING: old BSD partition ID!")) break; if (!filter - || (filter[0] == '^' && s.tqfind(&filter[1]) == 0) - || (filter[0] != '^' && s.tqcontains(filter))) { + || (filter[0] == '^' && s.find(&filter[1]) == 0) + || (filter[0] != '^' && s.contains(filter))) { if (func) func(lBox, s); else @@ -163,7 +163,7 @@ AddIRQLine(TQListView *lBox, TQString s) int pos, irqnum; char numstr[3]; - pos = s.tqfind(" irq "); + pos = s.find(" irq "); irqnum = (pos < 0) ? 0 : atoi(&s.ascii()[pos+5]); if (irqnum) snprintf(numstr, 3, "%02d", irqnum); @@ -221,7 +221,7 @@ bool GetInfo_Sound (TQListView *lbox) s = lvitem->text(0); // The autoconf message is in form 'audio0 at auvia0: ...' - if (s.tqfind("audio") == 0 && (pos = s.tqfind(" at ")) > 0) { + if (s.find("audio") == 0 && (pos = s.find(" at ")) > 0) { pos += 4; // skip " at " start = s.ascii() + pos; len = (int) strcspn(start, ":\n\t "); @@ -253,7 +253,7 @@ bool GetInfo_SCSI (TQListView *lbox) for(; lvitem; lvitem = lvitem->nextSibling()) { TQString s = lvitem->text(0); - if (s.tqcontains("seconds for devices to settle")) { + if (s.contains("seconds for devices to settle")) { lbox->removeItem(lvitem); break; } diff --git a/kcontrol/info/info_openbsd.cpp b/kcontrol/info/info_openbsd.cpp index 6a68e33cb..12ec8ee2d 100644 --- a/kcontrol/info/info_openbsd.cpp +++ b/kcontrol/info/info_openbsd.cpp @@ -122,16 +122,16 @@ static bool GetDmesgInfo(TQListView *lBox, const char *filter, TQListViewItem *olditem = NULL; while(!(s = t->readLine()).isNull()) { if (!seencpu) { - if (s.tqcontains("cpu")) + if (s.contains("cpu")) seencpu = true; else continue; } - if (s.tqcontains("boot device") || - s.tqcontains("WARNING: old BSD partition ID!")) + if (s.contains("boot device") || + s.contains("WARNING: old BSD partition ID!")) break; - if (!filter || s.tqcontains(filter)) { + if (!filter || s.contains(filter)) { if (func) { func(lBox, s, &opaque, false); } @@ -180,7 +180,7 @@ void AddIRQLine(TQListView *lBox, TQString s, void **opaque, bool ending) return; } - pos = s.tqfind(" irq "); + pos = s.find(" irq "); irqnum = (pos < 0) ? 0 : atoi(&p[pos+5]); if (irqnum) { s.sprintf("%02d%s", irqnum, p); @@ -232,7 +232,7 @@ bool GetInfo_Sound (TQListView *lbox) char *dev; s = lvitem->text(0); - if ((pos = s.tqfind("at ")) >= 0) { + if ((pos = s.find("at ")) >= 0) { pos += 3; // skip "at " start = end = s.ascii(); for(; (*end!=':') && (*end!='\n'); end++); diff --git a/kcontrol/info/info_svr4.cpp b/kcontrol/info/info_svr4.cpp index 1f71246b7..ba491a50e 100644 --- a/kcontrol/info/info_svr4.cpp +++ b/kcontrol/info/info_svr4.cpp @@ -55,9 +55,9 @@ bool GetInfo_ReadfromFile( TQListView *lBox, char *Name, char splitchar ) } TQString s1 = TQString::fromLocal8Bit(buf); - TQString s2 = s1.mid(s1.tqfind(splitchar)+1); + TQString s2 = s1.mid(s1.find(splitchar)+1); - s1.truncate(s1.tqfind(splitchar)); + s1.truncate(s1.find(splitchar)); if(!(s1.isEmpty() || s2.isEmpty())) olditem = new TQListViewItem(lBox, olditem, s1, s2); } diff --git a/kcontrol/info/opengl.cpp b/kcontrol/info/opengl.cpp index c92d85721..f04a93d06 100644 --- a/kcontrol/info/opengl.cpp +++ b/kcontrol/info/opengl.cpp @@ -107,7 +107,7 @@ static bool get_dri_device() TQTextStream stream(&file); TQString line = stream.readLine(); if (!line.isEmpty()) { - dri_info.module = line.mid(0, line.tqfind(0x20)); + dri_info.module = line.mid(0, line.find(0x20)); // possible formats, for regression testing // line = " PCI:01:00:0"; @@ -115,8 +115,8 @@ static bool get_dri_device() TQRegExp rx = TQRegExp("\\b[Pp][Cc][Ii][:]([0-9a-fA-F]+[:])?([0-9a-fA-F]+[:][0-9a-fA-F]+[:.][0-9a-fA-F]+)\\b"); if (rx.search(line)>0) { dri_info.pci = rx.cap(2); - int end = dri_info.pci.tqfindRev(':'); - int end2 = dri_info.pci.tqfindRev('.'); + int end = dri_info.pci.findRev(':'); + int end2 = dri_info.pci.findRev('.'); if (end2>end) end=end2; dri_info.pci[end]='.'; @@ -151,7 +151,7 @@ static bool get_dri_device() { TQStringList pci_info; if (ReadPipe("sysctl -n hw.dri.0.name",pci_info)) { - dri_info.module = pci_info[0].mid(0, pci_info[0].tqfind(0x20)); + dri_info.module = pci_info[0].mid(0, pci_info[0].find(0x20)); } return false; } diff --git a/kcontrol/input/core/themepage.cpp b/kcontrol/input/core/themepage.cpp index 73ab04b8c..eed2fd319 100644 --- a/kcontrol/input/core/themepage.cpp +++ b/kcontrol/input/core/themepage.cpp @@ -130,7 +130,7 @@ void ThemePage::load( bool useDefaults ) currentTheme = whiteCursor ? "SmallWhite" : "SmallBlack"; selectedTheme = currentTheme; - TQListViewItem *item = listview->tqfindItem( currentTheme, DirColumn ); + TQListViewItem *item = listview->findItem( currentTheme, DirColumn ); item->setSelected( true ); } diff --git a/kcontrol/input/xcursor/themepage.cpp b/kcontrol/input/xcursor/themepage.cpp index 2a0255857..93221df17 100644 --- a/kcontrol/input/xcursor/themepage.cpp +++ b/kcontrol/input/xcursor/themepage.cpp @@ -122,7 +122,7 @@ ThemePage::ThemePage( TQWidget* parent, const char* name ) ( !icons.exists() && !TQFileInfo( TQDir::homeDirPath() ).isWritable() ) ) installButton->setEnabled( false ); - if ( !themeDirs.tqcontains( path ) ) + if ( !themeDirs.contains( path ) ) installButton->setEnabled( false ); selectionChanged( listview->currentItem() ); @@ -170,9 +170,9 @@ void ThemePage::load( bool useDefaults ) currentTheme = "system"; // Find the theme in the listview and select it - TQListViewItem *item = listview->tqfindItem( currentTheme, DirColumn ); + TQListViewItem *item = listview->findItem( currentTheme, DirColumn ); if( !item ) - item = listview->tqfindItem( "system", DirColumn ); + item = listview->findItem( "system", DirColumn ); selectedTheme = item->text( DirColumn ); listview->setSelected( item, true ); listview->ensureItemVisible( item ); @@ -260,7 +260,7 @@ void ThemePage::removeClicked() KIO::del( u ); // Remove the theme from the listview and from the themeinfo dict - delete listview->tqfindItem( selectedTheme, DirColumn ); + delete listview->findItem( selectedTheme, DirColumn ); themeInfo.remove( selectedTheme ); listview->setSelected( listview->currentItem(), true ); @@ -371,7 +371,7 @@ void ThemePage::insertTheme( const TQString &path ) info->writable = true; // If an item with the same name already exists, remove it - delete listview->tqfindItem( dirName, DirColumn ); + delete listview->findItem( dirName, DirColumn ); // Create the listview item and insert it into the list. KListViewItem *item = new KListViewItem( listview, name, desc, /*hidden*/ dirName ); @@ -395,7 +395,7 @@ const TQStringList ThemePage::getThemeBaseDirs() const TQString path = XcursorLibraryPath(); #endif // Expand all occurences of ~ to the home dir - path.tqreplace( "~/", TQDir::homeDirPath() + '/' ); + path.replace( "~/", TQDir::homeDirPath() + '/' ); return TQStringList::split( ':', path ); } @@ -414,7 +414,7 @@ bool ThemePage::isCursorTheme( const TQString &theme, const int depth ) const continue; const TQStringList subdirs( dir.entryList( TQDir::Dirs ) ); - if ( subdirs.tqcontains( theme ) ) + if ( subdirs.contains( theme ) ) { const TQString path = *it + '/' + theme; const TQString indexfile = path + "/index.theme"; @@ -471,7 +471,7 @@ void ThemePage::insertThemes() // in the list. Xcursor will use the first theme it finds in that // case, and since we use the same search order that should also be // the theme we end up adding to the list. - if ( listview->tqfindItem( *it, DirColumn ) ) + if ( listview->findItem( *it, DirColumn ) ) continue; const TQString path = dir.path() + '/' + *it; diff --git a/kcontrol/ioslaveinfo/kcmioslaveinfo.cpp b/kcontrol/ioslaveinfo/kcmioslaveinfo.cpp index cb0f7de11..e2014a1ca 100644 --- a/kcontrol/ioslaveinfo/kcmioslaveinfo.cpp +++ b/kcontrol/ioslaveinfo/kcmioslaveinfo.cpp @@ -97,13 +97,13 @@ KCMIOSlaveInfo::KCMIOSlaveInfo(TQWidget *parent, const char *name, const TQStrin void KCMIOSlaveInfo::slaveHelp( KIO::Job *, const TQByteArray &data) { if ( data.size() == 0 ) { // EOF - int index = helpData.tqfind( "<meta http-equiv=\"Content-Type\"" ); - index = helpData.tqfind( "charset=", index ) + 8; - TQString charset = helpData.mid( index, helpData.tqfind( '\"', index ) - index ); + int index = helpData.find( "<meta http-equiv=\"Content-Type\"" ); + index = helpData.find( "charset=", index ) + 8; + TQString charset = helpData.mid( index, helpData.find( '\"', index ) - index ); TQString text = TQTextCodec::codecForName(charset.latin1())->toUnicode( helpData ); - index = text.tqfind( "<div class=\"titlepage\">" ); + index = text.find( "<div class=\"titlepage\">" ); text = text.mid( index ); - index = text.tqfind( "<table width=\"100%\" class=\"bottom-nav\"" ); + index = text.find( "<table width=\"100%\" class=\"bottom-nav\"" ); text = text.left( index ); m_info->setText(text); return; diff --git a/kcontrol/joystick/joywidget.cpp b/kcontrol/joystick/joywidget.cpp index 0f2349050..3d9eaf0d4 100644 --- a/kcontrol/joystick/joywidget.cpp +++ b/kcontrol/joystick/joywidget.cpp @@ -213,7 +213,7 @@ void JoyWidget::restoreCurrDev() { // try to find the current open device in the combobox list TQListBoxItem *item; - item = device->listBox()->tqfindItem(joydev->device(), TQt::Contains); + item = device->listBox()->findItem(joydev->device(), TQt::Contains); if ( !item ) // the current open device is one the user entered (not in the list) device->setCurrentText(joydev->device()); @@ -230,7 +230,7 @@ void JoyWidget::deviceChanged(const TQString &dev) int start, stop; TQString devName; - if ( (start = dev.tqfind("/dev")) == -1 ) + if ( (start = dev.find("/dev")) == -1 ) { KMessageBox::sorry(this, i18n("The given device name is invalid (does not contain /dev).\n" @@ -241,7 +241,7 @@ void JoyWidget::deviceChanged(const TQString &dev) return; } - if ( (stop = dev.tqfind(")", start)) != -1 ) // seems to be text selected from our list + if ( (stop = dev.find(")", start)) != -1 ) // seems to be text selected from our list devName = dev.mid(start, stop - start); else devName = dev.mid(start); diff --git a/kcontrol/kcontrol/helpwidget.cpp b/kcontrol/kcontrol/helpwidget.cpp index 9cb2037eb..9b5ec5006 100644 --- a/kcontrol/kcontrol/helpwidget.cpp +++ b/kcontrol/kcontrol/helpwidget.cpp @@ -69,7 +69,7 @@ bool HelpWidget::clicked(const TQString & _url) if ( _url.isNull() ) return true; - if ( _url.tqfind('@') > -1 ) { + if ( _url.find('@') > -1 ) { kapp->invokeMailer(_url); return true; } diff --git a/kcontrol/kcontrol/moduleiconview.cpp b/kcontrol/kcontrol/moduleiconview.cpp index c8e9bdc01..c6df5cb71 100644 --- a/kcontrol/kcontrol/moduleiconview.cpp +++ b/kcontrol/kcontrol/moduleiconview.cpp @@ -92,7 +92,7 @@ void ModuleIconView::fill() // go-back node ModuleIconItem *i = new ModuleIconItem(this, i18n("Back"), icon); i->setOrderNo(0); - int last_slash = _path.tqfindRev('/', -2); + int last_slash = _path.findRev('/', -2); if (last_slash == -1) i->setTag(TQString::null); else diff --git a/kcontrol/kcontrol/modulemenu.cpp b/kcontrol/kcontrol/modulemenu.cpp index 908b6003e..ad60eda5a 100644 --- a/kcontrol/kcontrol/modulemenu.cpp +++ b/kcontrol/kcontrol/modulemenu.cpp @@ -70,7 +70,7 @@ void ModuleMenu::fill(KPopupMenu *parentMenu, const TQString &parentPath) // Item names may contain ampersands. To avoid them being converted to // accelators, replace them with two ampersands. TQString name = group->caption(); - name.tqreplace("&", "&&"); + name.replace("&", "&&"); parentMenu->insertItem(KGlobal::iconLoader()->loadIcon(group->icon(), KIcon::Desktop, KIcon::SizeSmall) , name, menu); @@ -85,7 +85,7 @@ void ModuleMenu::fill(KPopupMenu *parentMenu, const TQString &parentPath) // Item names may contain ampersands. To avoid them being converted to // accelators, replace them with two ampersands. TQString name = module->moduleName(); - name.tqreplace("&", "&&"); + name.replace("&", "&&"); int realid = parentMenu->insertItem(KGlobal::iconLoader()->loadIcon(module->icon(), KIcon::Desktop, KIcon::SizeSmall) , name, id); diff --git a/kcontrol/kcontrol/modules.cpp b/kcontrol/kcontrol/modules.cpp index 11317c2d2..b2ece7c33 100644 --- a/kcontrol/kcontrol/modules.cpp +++ b/kcontrol/kcontrol/modules.cpp @@ -174,7 +174,7 @@ void ConfigModule::runAsRoot() // remove all kdesu switches while( cmd.length() > 1 && cmd[ 0 ] == '-' ) { - int pos = cmd.tqfind( ' ' ); + int pos = cmd.find( ' ' ); cmd = TQString(cmd.remove( 0, pos )).stripWhiteSpace(); } } @@ -316,7 +316,7 @@ bool ConfigModuleList::readDesktopEntriesRecursive(const TQString &path) TQPtrList<ConfigModule> ConfigModuleList::modules(const TQString &path) { - Menu *menu = subMenus.tqfind(path); + Menu *menu = subMenus.find(path); if (menu) return menu->modules; @@ -325,7 +325,7 @@ TQPtrList<ConfigModule> ConfigModuleList::modules(const TQString &path) TQStringList ConfigModuleList::submenus(const TQString &path) { - Menu *menu = subMenus.tqfind(path); + Menu *menu = subMenus.find(path); if (menu) return menu->submenus; @@ -338,7 +338,7 @@ TQString ConfigModuleList::findModule(ConfigModule *module) Menu *menu; for(;(menu = it.current());++it) { - if (menu->modules.tqcontainsRef(module)) + if (menu->modules.containsRef(module)) return it.currentKey(); } return TQString::null; diff --git a/kcontrol/kcontrol/moduletreeview.cpp b/kcontrol/kcontrol/moduletreeview.cpp index d685f7fe8..fda83854f 100644 --- a/kcontrol/kcontrol/moduletreeview.cpp +++ b/kcontrol/kcontrol/moduletreeview.cpp @@ -166,7 +166,7 @@ void ModuleTreeView::expandItem(TQListViewItem *item, TQPtrList<TQListViewItem> { while (item) { - setOpen(item, parentList-.tqcontains(item)); + setOpen(item, parentList-.contains(item)); if (item->childCount() != 0) expandItem(item->firstChild(), parentList); @@ -356,7 +356,7 @@ void ModuleTreeItem::setGroup(const TQString &path) { KServiceGroup::Ptr group = KServiceGroup::group(path); TQString defName = path.left(path.length()-1); - int pos = defName.tqfindRev('/'); + int pos = defName.findRev('/'); if (pos >= 0) defName = defName.mid(pos+1); if (group && group->isValid()) diff --git a/kcontrol/kcontrol/toplevel.cpp b/kcontrol/kcontrol/toplevel.cpp index a4023f88c..4389a10fe 100644 --- a/kcontrol/kcontrol/toplevel.cpp +++ b/kcontrol/kcontrol/toplevel.cpp @@ -514,7 +514,7 @@ void TopLevel::aboutModule() TQString TopLevel::handleAmpersand( TQString modulename ) const { - if( modulename.tqcontains( '&' )) // double it + if( modulename.contains( '&' )) // double it { for( int i = modulename.length(); i >= 0; diff --git a/kcontrol/kded/kcmkded.cpp b/kcontrol/kded/kcmkded.cpp index 2a7a7cbfb..a3896b71e 100644 --- a/kcontrol/kded/kcmkded.cpp +++ b/kcontrol/kded/kcmkded.cpp @@ -113,10 +113,10 @@ KDEDConfig::KDEDConfig(TQWidget* parent, const char* name, const TQStringList &) void setModuleGroup(KConfig *config, const TQString &filename) { TQString module = filename; - int i = module.tqfindRev('/'); + int i = module.findRev('/'); if (i != -1) module = module.mid(i+1); - i = module.tqfindRev('.'); + i = module.findRev('.'); if (i != -1) module = module.left(i); @@ -201,7 +201,7 @@ void KDEDConfig::save() { if (file.readBoolEntry("X-KDE-Kded-autoload")){ - item = static_cast<TQCheckListItem *>(_lvStartup->tqfindItem(file.readEntry("X-KDE-Library"),4)); + item = static_cast<TQCheckListItem *>(_lvStartup->findItem(file.readEntry("X-KDE-Library"),4)); if (item) { // we found a match, now compare and see what changed setAutoloadEnabled(&kdedrc, *it, item->isOn()); @@ -251,13 +251,13 @@ void KDEDConfig::getServiceStatus() it.current()->setText(3, NOT_RUNNING); for ( QCStringList::Iterator it = modules.begin(); it != modules.end(); ++it ) { - TQListViewItem *item = _lvLoD->tqfindItem(*it, 4); + TQListViewItem *item = _lvLoD->findItem(*it, 4); if ( item ) { item->setText(2, RUNNING); } - item = _lvStartup->tqfindItem(*it, 4); + item = _lvStartup->findItem(*it, 4); if ( item ) { item->setText(3, RUNNING); @@ -269,7 +269,7 @@ void KDEDConfig::slotReload() { TQString current = _lvStartup->currentItem()->text(4); load(); - TQListViewItem *item = _lvStartup->tqfindItem(current, 4); + TQListViewItem *item = _lvStartup->findItem(current, 4); if (item) _lvStartup->setCurrentItem(item); } diff --git a/kcontrol/kdm/kbackedcombobox.cpp b/kcontrol/kdm/kbackedcombobox.cpp index 9f651b433..1ba598e49 100644 --- a/kcontrol/kdm/kbackedcombobox.cpp +++ b/kcontrol/kdm/kbackedcombobox.cpp @@ -28,7 +28,7 @@ void KBackedComboBox::insertItem( const TQString &id, const TQString &name ) void KBackedComboBox::setCurrentId( const TQString &id ) { - if (id2name.tqcontains( id )) + if (id2name.contains( id )) setCurrentItem( id2name[id] ); else setCurrentItem( 0 ); diff --git a/kcontrol/kdm/kdm-appear.cpp b/kcontrol/kdm/kdm-appear.cpp index 5f8b116dc..08c412c26 100644 --- a/kcontrol/kdm/kdm-appear.cpp +++ b/kcontrol/kdm/kdm-appear.cpp @@ -256,7 +256,7 @@ void KDMAppearanceWidget::loadLanguageList(KLanguageButton *combo) it != langlist.end(); ++it ) { TQString fpath = (*it).left((*it).length() - 14); - int index = fpath.tqfindRev('/'); + int index = fpath.findRev('/'); TQString nid = fpath.mid(index + 1); KSimpleConfig entry(*it); @@ -280,7 +280,7 @@ void KDMAppearanceWidget::loadColorSchemes(KBackedComboBox *combo) if (!(str = config.readEntry("Name")).isEmpty() || !(str = config.readEntry("name")).isEmpty()) { - TQString str2 = (*it).mid( (*it).tqfindRev( '/' ) + 1 ); // strip off path + TQString str2 = (*it).mid( (*it).findRev( '/' ) + 1 ); // strip off path str2.setLength( str2.length() - 6 ); // strip off ".kcsrc combo->insertItem( str2, str ); } diff --git a/kcontrol/kdm/kdm-conv.cpp b/kcontrol/kdm/kdm-conv.cpp index 94e64debb..e7f267ce3 100644 --- a/kcontrol/kdm/kdm-conv.cpp +++ b/kcontrol/kdm/kdm-conv.cpp @@ -295,7 +295,7 @@ void KDMConvenienceWidget::slotUpdateNoPassUser( TQListViewItem *item ) if ( !item ) return; TQCheckListItem *itm = (TQCheckListItem *)item; - TQStringList::iterator it = noPassUsers.tqfind( itm->text() ); + TQStringList::iterator it = noPassUsers.find( itm->text() ); if (itm->isOn()) { if (it == noPassUsers.end()) noPassUsers.append( itm->text() ); @@ -328,7 +328,7 @@ void KDMConvenienceWidget::slotAddUsers(const TQMap<TQString,int> &users) } if (it.data() != 0) (new TQCheckListItem(npuserlv, it.key(), TQCheckListItem::CheckBox))-> - setOn(noPassUsers.tqfind(it.key()) != noPassUsers.end()); + setOn(noPassUsers.find(it.key()) != noPassUsers.end()); } if (userlb->listBox()) @@ -349,13 +349,13 @@ void KDMConvenienceWidget::slotDelUsers(const TQMap<TQString,int> &users) if (it.data() > 0) { if (it.key() != autoUser && userlb->listBox()) delete userlb->listBox()-> - tqfindItem( it.key(), ExactMatch | CaseSensitive ); + findItem( it.key(), ExactMatch | CaseSensitive ); if (it.key() != preselUser && puserlb->listBox()) delete puserlb->listBox()-> - tqfindItem( it.key(), ExactMatch | CaseSensitive ); + findItem( it.key(), ExactMatch | CaseSensitive ); } if (it.data() != 0) - delete npuserlv->tqfindItem( it.key(), 0 ); + delete npuserlv->findItem( it.key(), 0 ); } } diff --git a/kcontrol/kdm/kdm-users.cpp b/kcontrol/kdm/kdm-users.cpp index da6025026..d349b7da7 100644 --- a/kcontrol/kdm/kdm-users.cpp +++ b/kcontrol/kdm/kdm-users.cpp @@ -381,7 +381,7 @@ void KDMUsersWidget::updateOptList( TQListViewItem *item, TQStringList &list ) if ( !item ) return; TQCheckListItem *itm = (TQCheckListItem *)item; - TQStringList::iterator it = list.tqfind( itm->text() ); + TQStringList::iterator it = list.find( itm->text() ); if (itm->isOn()) { if (it == list.end()) list.append( itm->text() ); @@ -415,9 +415,9 @@ void KDMUsersWidget::slotAddUsers(const TQMap<TQString,int> &users) for (it = users.begin(); it != users.end(); ++it) { const TQString *name = &it.key(); (new TQCheckListItem(optinlv, *name, TQCheckListItem::CheckBox))-> - setOn(selectedUsers.tqfind(*name) != selectedUsers.end()); + setOn(selectedUsers.find(*name) != selectedUsers.end()); (new TQCheckListItem(optoutlv, *name, TQCheckListItem::CheckBox))-> - setOn(hiddenUsers.tqfind(*name) != hiddenUsers.end()); + setOn(hiddenUsers.find(*name) != hiddenUsers.end()); if ((*name)[0] != '@') usercombo->insertItem(*name); } @@ -433,9 +433,9 @@ void KDMUsersWidget::slotDelUsers(const TQMap<TQString,int> &users) for (it = users.begin(); it != users.end(); ++it) { const TQString *name = &it.key(); if (usercombo->listBox()) - delete usercombo->listBox()->tqfindItem( *name, ExactMatch | CaseSensitive ); - delete optinlv->tqfindItem( *name, 0 ); - delete optoutlv->tqfindItem( *name, 0 ); + delete usercombo->listBox()->findItem( *name, ExactMatch | CaseSensitive ); + delete optinlv->findItem( *name, 0 ); + delete optoutlv->findItem( *name, 0 ); } } diff --git a/kcontrol/kdm/main.cpp b/kcontrol/kdm/main.cpp index 103e60428..00239636c 100644 --- a/kcontrol/kdm/main.cpp +++ b/kcontrol/kdm/main.cpp @@ -132,9 +132,9 @@ KDModule::KDModule(TQWidget *parent, const char *name, const TQStringList &) struct passwd *ps; for (setpwent(); (ps = getpwent()); ) { TQString un( TQFile::decodeName( ps->pw_name ) ); - if (usermap.tqfind( un ) == usermap.end()) { + if (usermap.find( un ) == usermap.end()) { usermap.insert( un, QPair<int,TQStringList>( ps->pw_uid, sl ) ); - if ((tgmapi = tgmap.tqfind( ps->pw_gid )) != tgmap.end()) + if ((tgmapi = tgmap.find( ps->pw_gid )) != tgmap.end()) (*tgmapi).append( un ); else tgmap[ps->pw_gid] = un; @@ -146,7 +146,7 @@ KDModule::KDModule(TQWidget *parent, const char *name, const TQStringList &) for (setgrent(); (grp = getgrent()); ) { TQString gn( TQFile::decodeName( grp->gr_name ) ); bool delme = false; - if ((tgmapi = tgmap.tqfind( grp->gr_gid )) != tgmap.end()) { + if ((tgmapi = tgmap.find( grp->gr_gid )) != tgmap.end()) { if ((*tgmapi).count() == 1 && (*tgmapi).first() == gn) delme = true; else @@ -160,8 +160,8 @@ KDModule::KDModule(TQWidget *parent, const char *name, const TQStringList &) continue; do { TQString un( TQFile::decodeName( *grp->gr_mem ) ); - if ((umapi = usermap.tqfind( un )) != usermap.end()) { - if ((*umapi).second.tqfind( gn ) == (*umapi).second.end()) + if ((umapi = usermap.find( un )) != usermap.end()) { + if ((*umapi).second.find( gn ) == (*umapi).second.end()) (*umapi).second.append( gn ); } else kdWarning() << "group '" << gn << "' contains unknown user '" << un << "'" << endl; @@ -281,7 +281,7 @@ void KDModule::propagateUsers() if (!uid || (uid >= minshowuid && uid <= maxshowuid)) { lusers[it.key()] = uid; for (jt = it.data().second.begin(); jt != it.data().second.end(); ++jt) - if ((gmapi = groupmap.tqfind( *jt )) == groupmap.end()) { + if ((gmapi = groupmap.find( *jt )) == groupmap.end()) { groupmap[*jt] = 1; lusers['@' + *jt] = -uid; } else @@ -307,7 +307,7 @@ void KDModule::slotMinMaxUID(int min, int max) dlusers[it.key()] = uid; for (jt = it.data().second.begin(); jt != it.data().second.end(); ++jt) { - gmapi = groupmap.tqfind( *jt ); + gmapi = groupmap.find( *jt ); if (!--(*gmapi)) { groupmap.remove( gmapi ); dlusers['@' + *jt] = -uid; @@ -319,7 +319,7 @@ void KDModule::slotMinMaxUID(int min, int max) alusers[it.key()] = uid; for (jt = it.data().second.begin(); jt != it.data().second.end(); ++jt) - if ((gmapi = groupmap.tqfind( *jt )) == groupmap.end()) { + if ((gmapi = groupmap.find( *jt )) == groupmap.end()) { groupmap[*jt] = 1; alusers['@' + *jt] = -uid; } else diff --git a/kcontrol/keys/commandShortcuts.cpp b/kcontrol/keys/commandShortcuts.cpp index fb0f06681..cf564e89f 100644 --- a/kcontrol/keys/commandShortcuts.cpp +++ b/kcontrol/keys/commandShortcuts.cpp @@ -158,7 +158,7 @@ void CommandShortcutsModule::shortcutRadioToggled(bool remove) { m_shortcutButton->setShortcut(TQString(), false); item->setAccel(TQString()); - if (m_changedItems.tqfindRef(item) == -1) + if (m_changedItems.findRef(item) == -1) { m_changedItems.append(item); } @@ -186,7 +186,7 @@ void CommandShortcutsModule::shortcutChanged(const KShortcut& shortcut) m_shortcutButton->setShortcut(accel, false); item->setAccel(accel); m_noneRadio->blockSignals(false); - if (m_changedItems.tqfindRef(item) == -1) + if (m_changedItems.findRef(item) == -1) { m_changedItems.append(item); } diff --git a/kcontrol/keys/kaccelaction.h b/kcontrol/keys/kaccelaction.h index e28846a3a..144427d9c 100644 --- a/kcontrol/keys/kaccelaction.h +++ b/kcontrol/keys/kaccelaction.h @@ -111,7 +111,7 @@ class KAccelAction bool setKeySequence( uint i, const KKeySequence& ); void clearShortcut(); - bool tqcontains( const KKeySequence& ); + bool contains( const KKeySequence& ); TQString toString() const; TQString toStringInternal() const; diff --git a/kcontrol/keys/keyconfig.cpp b/kcontrol/keys/keyconfig.cpp index 239873a24..5af8c74f0 100644 --- a/kcontrol/keys/keyconfig.cpp +++ b/kcontrol/keys/keyconfig.cpp @@ -75,7 +75,7 @@ void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone ) for( uint i = 0; i < actions.size(); i++ ) { TQString sConfigKey = actions[i].m_sName; //kdDebug(125) << "sConfigKey: " << sConfigKey << endl; - int iLastSpace = sConfigKey.tqfindRev( ' ' ); + int iLastSpace = sConfigKey.findRev( ' ' ); bool bIsNum = false; if( iLastSpace >= 0 ) sConfigKey.mid( iLastSpace+1 ).toInt( &bIsNum ); @@ -83,7 +83,7 @@ void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone ) kdDebug(125) << "sConfigKey: " << sConfigKey << " bIsNum: " << bIsNum << " bSeriesOnly: " << bSeriesOnly << endl; - if( ((bSeriesOnly && !bIsNum) || (bSeriesNone && bIsNum)) && !sConfigKey.tqcontains( ':' ) ) { + if( ((bSeriesOnly && !bIsNum) || (bSeriesNone && bIsNum)) && !sConfigKey.contains( ':' ) ) { actions.removeAction( sConfigKey ); i--; } @@ -318,7 +318,7 @@ void KKeyModule::readScheme( int index ) // parse the string for first white space - ind = sFile.tqfind(" "); + ind = sFile.find(" "); if (ind == -1) { ind = sFile.length(); break; @@ -332,7 +332,7 @@ void KKeyModule::readScheme( int index ) TQString s = sFile.mid( ind, 1 ); s = s.upper(); - sFile.tqreplace( ind, 1, s ); + sFile.replace( ind, 1, s ); } @@ -416,8 +416,8 @@ void KKeyModule::readScheme( int index ) // Set various appropriate for the scheme if ( indx < nSysSchemes || - (*sFileList->tqat(indx)).tqcontains( "/global-" ) || - (*sFileList->tqat(indx)).tqcontains( "/app-" ) ) { + (*sFileList->tqat(indx)).contains( "/global-" ) || + (*sFileList->tqat(indx)).contains( "/app-" ) ) { removeBt->setEnabled( FALSE ); } else { removeBt->setEnabled( TRUE ); diff --git a/kcontrol/keys/shortcuts.cpp b/kcontrol/keys/shortcuts.cpp index acd55e47f..931d2267d 100644 --- a/kcontrol/keys/shortcuts.cpp +++ b/kcontrol/keys/shortcuts.cpp @@ -227,14 +227,14 @@ void ShortcutsModule::createActionsGeneral() for( uint i = 0; i < actions.count(); i++ ) { TQString sConfigKey = actions[i].name(); //kdDebug(125) << "sConfigKey: " << sConfigKey << endl; - int iLastSpace = sConfigKey.tqfindRev( ' ' ); + int iLastSpace = sConfigKey.findRev( ' ' ); bool bIsNum = false; if( iLastSpace >= 0 ) sConfigKey.mid( iLastSpace+1 ).toInt( &bIsNum ); //kdDebug(125) << "sConfigKey: " << sConfigKey // << " bIsNum: " << bIsNum << endl; - if( bIsNum && !sConfigKey.tqcontains( ':' ) ) { + if( bIsNum && !sConfigKey.contains( ':' ) ) { actions[i].setConfigurable( false ); actions[i].setName( TQString::null ); } @@ -248,14 +248,14 @@ void ShortcutsModule::createActionsSequence() for( uint i = 0; i < actions.count(); i++ ) { TQString sConfigKey = actions[i].name(); //kdDebug(125) << "sConfigKey: " << sConfigKey << endl; - int iLastSpace = sConfigKey.tqfindRev( ' ' ); + int iLastSpace = sConfigKey.findRev( ' ' ); bool bIsNum = false; if( iLastSpace >= 0 ) sConfigKey.mid( iLastSpace+1 ).toInt( &bIsNum ); //kdDebug(125) << "sConfigKey: " << sConfigKey // << " bIsNum: " << bIsNum << endl; - if( !bIsNum && !sConfigKey.tqcontains( ':' ) ) { + if( !bIsNum && !sConfigKey.contains( ':' ) ) { actions[i].setConfigurable( false ); actions[i].setName( TQString::null ); } @@ -372,7 +372,7 @@ void ShortcutsModule::slotSaveSchemeAs() int ind = 0; while( ind < (int) sFile.length() ) { // parse the string for first white space - ind = sFile.tqfind(" "); + ind = sFile.find(" "); if( ind == -1 ) { ind = sFile.length(); break; @@ -384,7 +384,7 @@ void ShortcutsModule::slotSaveSchemeAs() // Make the next letter upper case TQString s = sFile.mid( ind, 1 ); s = s.upper(); - sFile.tqreplace( ind, 1, s ); + sFile.replace( ind, 1, s ); } iScheme = -1; diff --git a/kcontrol/keys/treeview.cpp b/kcontrol/keys/treeview.cpp index 4d41b91c2..58de8a1f5 100644 --- a/kcontrol/keys/treeview.cpp +++ b/kcontrol/keys/treeview.cpp @@ -55,7 +55,7 @@ void AppTreeItem::setName(const TQString &name) void AppTreeItem::setAccel(const TQString &accel) { m_accel = accel; - int temp = accel.tqfind(';'); + int temp = accel.find(';'); if (temp != -1) { setText(1, accel.left(temp)); @@ -157,7 +157,7 @@ void AppTreeView::fillBranch(const TQString& rPath, AppTreeItem *parent) // Item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - groupCaption.tqreplace("&", "&&"); + groupCaption.replace("&", "&&"); AppTreeItem *item; if (parent == 0) @@ -178,7 +178,7 @@ void AppTreeView::fillBranch(const TQString& rPath, AppTreeItem *parent) // Item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - serviceCaption.tqreplace("&", "&&"); + serviceCaption.replace("&", "&&"); AppTreeItem* item; if (parent == 0) @@ -209,7 +209,7 @@ TQStringList AppTreeView::fileList(const TQString& rPath) TQString relativePath = rPath; // truncate "/.directory" - int pos = relativePath.tqfindRev("/.directory"); + int pos = relativePath.findRev("/.directory"); if (pos > 0) relativePath.truncate(pos); TQStringList filelist; @@ -228,7 +228,7 @@ TQStringList AppTreeView::fileList(const TQString& rPath) TQStringList files = dir.entryList(); for (TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { // does not work?! - //if (filelist.tqcontains(*it)) continue; + //if (filelist.contains(*it)) continue; if (relativePath.isEmpty()) { filelist.remove(*it); // hack @@ -248,7 +248,7 @@ TQStringList AppTreeView::dirList(const TQString& rPath) TQString relativePath = rPath; // truncate "/.directory" - int pos = relativePath.tqfindRev("/.directory"); + int pos = relativePath.findRev("/.directory"); if (pos > 0) relativePath.truncate(pos); TQStringList dirlist; @@ -266,7 +266,7 @@ TQStringList AppTreeView::dirList(const TQString& rPath) for (TQStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it) { if ((*it) == "." || (*it) == "..") continue; // does not work?! - // if (dirlist.tqcontains(*it)) continue; + // if (dirlist.contains(*it)) continue; if (relativePath.isEmpty()) { dirlist.remove(*it); //hack diff --git a/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp b/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp index bf5017d5b..53295963e 100644 --- a/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp +++ b/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp @@ -391,7 +391,7 @@ void CKCmFontInst::fileHighlighted(const KFileItem *item) ? list->getFirst() : NULL; - if(previewItem && list && list->tqcontains(previewItem)) // OK, check its been selected - not deselected!!! + if(previewItem && list && list->contains(previewItem)) // OK, check its been selected - not deselected!!! itsPreview->openURL(previewItem->url()); } #endif @@ -551,7 +551,7 @@ void CKCmFontInst::infoMessage(const TQString &msg) static TQString family(const TQString &name) { - int commaPos=name.tqfind(','); + int commaPos=name.find(','); return -1==commaPos ? name : name.left(commaPos); } @@ -571,7 +571,7 @@ void CKCmFontInst::updateInformation(int, int fonts) TQString fam(family(item->text())); size+=item->size(); - if(-1==families.tqfindIndex(fam)) + if(-1==families.findIndex(fam)) families+=fam; } } diff --git a/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp b/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp index 430e9c8b8..112e3562b 100644 --- a/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp +++ b/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp @@ -44,35 +44,35 @@ static int strToWeight(const TQString &str) { if(NULL==str) return FC_WEIGHT_MEDIUM; - else if(str.tqcontains("Bold", false)) + else if(str.contains("Bold", false)) return FC_WEIGHT_BOLD; - else if(str.tqcontains("Heavy", false)) + else if(str.contains("Heavy", false)) return FC_WEIGHT_HEAVY; - else if(str.tqcontains("Black", false)) + else if(str.contains("Black", false)) return FC_WEIGHT_BLACK; - else if(str.tqcontains("ExtraBold", false)) + else if(str.contains("ExtraBold", false)) return FC_WEIGHT_EXTRABOLD; - else if(str.tqcontains("UltraBold", false)) + else if(str.contains("UltraBold", false)) return FC_WEIGHT_ULTRABOLD; - else if(str.tqcontains("ExtraLight", false)) + else if(str.contains("ExtraLight", false)) return FC_WEIGHT_EXTRALIGHT; - else if(str.tqcontains("UltraLight", false)) + else if(str.contains("UltraLight", false)) return FC_WEIGHT_ULTRALIGHT; - else if(str.tqcontains("Light", false)) + else if(str.contains("Light", false)) return FC_WEIGHT_LIGHT; - else if(str.tqcontains("Medium", false) || str.tqcontains("Normal", false) || str.tqcontains("Roman", false)) + else if(str.contains("Medium", false) || str.contains("Normal", false) || str.contains("Roman", false)) return FC_WEIGHT_MEDIUM; - else if(str.tqcontains("Regular", false)) + else if(str.contains("Regular", false)) return FC_WEIGHT_REGULAR; - else if(str.tqcontains("SemiBold", false)) + else if(str.contains("SemiBold", false)) return FC_WEIGHT_SEMIBOLD; - else if(str.tqcontains("DemiBold", false)) + else if(str.contains("DemiBold", false)) return FC_WEIGHT_DEMIBOLD; - else if(str.tqcontains("Thin", false)) + else if(str.contains("Thin", false)) return FC_WEIGHT_THIN; - else if(str.tqcontains("Book", false)) + else if(str.contains("Book", false)) return FC_WEIGHT_NORMAL; - else if(str.tqcontains("Demi", false)) + else if(str.contains("Demi", false)) return FC_WEIGHT_NORMAL; else return FC_WEIGHT_MEDIUM; @@ -83,21 +83,21 @@ static int strToWidth(const TQString &str) { if(str.isEmpty()) return FC_WIDTH_NORMAL; - else if(str.tqcontains("UltraCondensed", false)) + else if(str.contains("UltraCondensed", false)) return FC_WIDTH_ULTRACONDENSED; - else if(str.tqcontains("ExtraCondensed", false)) + else if(str.contains("ExtraCondensed", false)) return FC_WIDTH_EXTRACONDENSED; - else if(str.tqcontains("SemiCondensed", false)) + else if(str.contains("SemiCondensed", false)) return FC_WIDTH_SEMICONDENSED; - else if(str.tqcontains("Condensed", false)) + else if(str.contains("Condensed", false)) return FC_WIDTH_CONDENSED; - else if(str.tqcontains("SemiExpanded", false)) + else if(str.contains("SemiExpanded", false)) return FC_WIDTH_SEMIEXPANDED; - else if(str.tqcontains("UltraExpanded", false)) + else if(str.contains("UltraExpanded", false)) return FC_WIDTH_ULTRAEXPANDED; - else if(str.tqcontains("ExtraExpanded", false)) + else if(str.contains("ExtraExpanded", false)) return FC_WIDTH_EXTRAEXPANDED; - else if(str.tqcontains("Expanded", false)) + else if(str.contains("Expanded", false)) return FC_WIDTH_EXPANDED; else return FC_WIDTH_NORMAL; @@ -201,7 +201,7 @@ static bool readAfm(const TQString &file, TQString &full, TQString &family, TQSt if(inMetrics) { - if(0==line.tqfind("FullName ")) + if(0==line.find("FullName ")) { full=line.mid(9); #ifndef KFI_FC_NO_WIDTHS @@ -209,24 +209,24 @@ static bool readAfm(const TQString &file, TQString &full, TQString &family, TQSt #endif foundName=true; } - else if(0==line.tqfind("FamilyName ")) + else if(0==line.find("FamilyName ")) { family=line.mid(11); foundFamily=true; } - else if(0==line.tqfind("Weight ")) + else if(0==line.find("Weight ")) intWeight=strToWeight(line.mid(7)); - else if(0==line.tqfind("ItalicAngle ")) + else if(0==line.find("ItalicAngle ")) intSlant=0.0f==line.mid(12).toFloat() ? FC_SLANT_ROMAN : FC_SLANT_ITALIC; - else if(0==line.tqfind("IsFixedPitch ")) - intSpacing=0==line.mid(13).tqfind("false", 0, false) ? FC_PROPORTIONAL : FC_MONO; - else if(0==line.tqfind("Notice ")) + else if(0==line.find("IsFixedPitch ")) + intSpacing=0==line.mid(13).find("false", 0, false) ? FC_PROPORTIONAL : FC_MONO; + else if(0==line.find("Notice ")) foundry=getFoundry(line.mid(7).latin1()); - else if(0==line.tqfind("StartCharMetrics")) + else if(0==line.find("StartCharMetrics")) break; } else - if(0==line.tqfind("StartFontMetrics")) + if(0==line.find("StartFontMetrics")) inMetrics=true; }; f.close(); @@ -237,7 +237,7 @@ static bool readAfm(const TQString &file, TQString &full, TQString &family, TQSt foundFamily=true; } - if(foundName && FC_SLANT_ITALIC==intItalic && (-1!=full.tqfind("Oblique") || -1!=full.tqfind("Slanted"))) + if(foundName && FC_SLANT_ITALIC==intItalic && (-1!=full.find("Oblique") || -1!=full.find("Slanted"))) intItalic=FC_SLANT_OBLIQUE; } @@ -372,7 +372,7 @@ bool KFileFontPlugin::readInfo(KFileMetaInfo& info, uint what) const FoundryMap *entry; for(entry=map; NULL!=entry->foundry; entry++) - if(foundryAll.length()==entry->len && foundryAll.tqcontains(entry->foundry, false)) + if(foundryAll.length()==entry->len && foundryAll.contains(entry->foundry, false)) { foundryAll=entry->foundry; break; diff --git a/kcontrol/kfontinst/kfontinst/FontEngine.cpp b/kcontrol/kfontinst/kfontinst/FontEngine.cpp index 7f14d556f..dffa60f2d 100644 --- a/kcontrol/kfontinst/kfontinst/FontEngine.cpp +++ b/kcontrol/kfontinst/kfontinst/FontEngine.cpp @@ -157,7 +157,7 @@ CFontEngine::EWeight CFontEngine::strToWeight(const char *str) static void removeSymbols(TQString &str) { - str.tqreplace(TQRegExp("[\\-\\[\\]()]"), " "); + str.replace(TQRegExp("[\\-\\[\\]()]"), " "); int len=str.length(); TQChar space(' '); diff --git a/kcontrol/kfontinst/kfontinst/Fontmap.cpp b/kcontrol/kfontinst/kfontinst/Fontmap.cpp index c8e63c403..8b04ef7bd 100644 --- a/kcontrol/kfontinst/kfontinst/Fontmap.cpp +++ b/kcontrol/kfontinst/kfontinst/Fontmap.cpp @@ -113,7 +113,7 @@ static TQString createX11PsName(const TQString &font) unsigned int ch; bool newWord=true; - newName.tqreplace(TQRegExp("\\-"), "_"); + newName.replace(TQRegExp("\\-"), "_"); for(ch=0; ch<newName.length(); ++ch) { @@ -136,7 +136,7 @@ static TQString createX11PsName(const TQString &font) } } - newName.tqreplace(" ", TQString()); + newName.replace(" ", TQString()); return newName; } @@ -180,7 +180,7 @@ static TQString getEntry(TQStringList &list, const TQString &name) end(list.end()); for( ; it!=end; ++it) - if(0==(*it).tqfind('/'+name+' ')) + if(0==(*it).find('/'+name+' ')) return *it; return TQString::null; @@ -188,7 +188,7 @@ static TQString getEntry(TQStringList &list, const TQString &name) inline bool isAlias(const TQString &entry) { - return -1==entry.tqfindRev(TQRegExp(")\\s*;\\s*$")); + return -1==entry.findRev(TQRegExp(")\\s*;\\s*$")); } static void addEntry(TQStringList &list, const TQString &name, const TQString &file, const TQString &fmapDir) @@ -209,7 +209,7 @@ static void addEntry(TQStringList &list, const TQString &name, const TQString &f str << '/' << name << " ("; - if(0==file.tqfind(fmapDir)) + if(0==file.find(fmapDir)) str << file.mid(fmapDir.length()); else str << file; @@ -309,7 +309,7 @@ bool create(const TQString &dir, CFontEngine &fe) TQString fName(Misc::fileSyntax(CFcEngine::getFcString(fs->fonts[i], FC_FILE))); FcBool scalable=FcFalse; - if(!fName.isEmpty() && (root || dir.isEmpty() || 0==fName.tqfind(dir)) && + if(!fName.isEmpty() && (root || dir.isEmpty() || 0==fName.find(dir)) && FcResultMatch==FcPatternGetBool(fs->fonts[i], FC_SCALABLE, 0, &scalable) && scalable) { const TQStringList *existing=old.getEntries(fName); @@ -552,7 +552,7 @@ CFile::CFile(const TQString &dir) const TQStringList * CFile::getEntries(const TQString &fname) { - TEntry *entry=findEntry(0==fname.tqfind(itsDir) ? fname.mid(itsDir.length()) : fname, false); + TEntry *entry=findEntry(0==fname.find(itsDir) ? fname.mid(itsDir.length()) : fname, false); return entry ? &entry->entries : NULL; } diff --git a/kcontrol/kfontinst/kfontinst/Main.cpp b/kcontrol/kfontinst/kfontinst/Main.cpp index f0e6d3152..6db9b83c8 100644 --- a/kcontrol/kfontinst/kfontinst/Main.cpp +++ b/kcontrol/kfontinst/kfontinst/Main.cpp @@ -285,7 +285,7 @@ int main(int argc, char *argv[]) bool found=false; while((dir=FcStrListNext(list))) - if(0==KFI::Misc::dirSyntax((const char *)dir).tqfind(folder)) + if(0==KFI::Misc::dirSyntax((const char *)dir).find(folder)) found=true; if(!found) diff --git a/kcontrol/kfontinst/kfontinst/XConfig.cpp b/kcontrol/kfontinst/kfontinst/XConfig.cpp index 36bd153df..112ab3d3c 100644 --- a/kcontrol/kfontinst/kfontinst/XConfig.cpp +++ b/kcontrol/kfontinst/kfontinst/XConfig.cpp @@ -748,9 +748,9 @@ CXConfig::TPath::EType CXConfig::TPath::getType(const TQString &d) { TQString str(d); - str.tqreplace(TQRegExp("\\s*"), ""); + str.replace(TQRegExp("\\s*"), ""); - return 0==str.tqfind("unix/:") + return 0==str.find("unix/:") ? FONT_SERVER : "fontconfig"==str ? FONT_CONFIG diff --git a/kcontrol/kfontinst/kio/KioFonts.cpp b/kcontrol/kfontinst/kio/KioFonts.cpp index cefa5188d..cef1fd9dd 100644 --- a/kcontrol/kfontinst/kio/KioFonts.cpp +++ b/kcontrol/kfontinst/kio/KioFonts.cpp @@ -136,7 +136,7 @@ static TQString removeMultipleExtension(const KURL &url) TQString fname(url.fileName()); int pos; - if(-1!=(pos=fname.tqfindRev(TQString::tqfromLatin1(constMultipleExtension)))) + if(-1!=(pos=fname.findRev(TQString::tqfromLatin1(constMultipleExtension)))) fname=fname.left(pos); return fname; @@ -147,7 +147,7 @@ static TQString modifyName(const TQString &fname) static const char constSymbols[]={ '-', ' ', ':', 0 }; TQString rv(fname); - int dotPos=rv.tqfindRev('.'); + int dotPos=rv.findRev('.'); if(-1!=dotPos) { @@ -158,7 +158,7 @@ static TQString modifyName(const TQString &fname) } for(int s=0; constSymbols[s]; ++s) - rv=rv.tqreplace(constSymbols[s], '_'); + rv=rv.replace(constSymbols[s], '_'); return rv; } @@ -427,7 +427,7 @@ static KURL getRedirect(const KURL &u) sect(CKioFonts::getSect(path)); path.remove(sect); - path.tqreplace("//", "/"); + path.replace("//", "/"); redirect.setPath(path); KFI_DBUG << "Redirect from " << u.path() << " to " << redirect.path() << endl; @@ -441,7 +441,7 @@ static bool nonRootSys(const KURL &u) static TQString getFontFolder(const TQString &defaultDir, const TQString &root, TQStringList &dirs) { - if(dirs.tqcontains(defaultDir)) + if(dirs.contains(defaultDir)) return defaultDir; else { @@ -450,7 +450,7 @@ static TQString getFontFolder(const TQString &defaultDir, const TQString &root, bool found=false; for(it=dirs.begin(); it!=end && !found; ++it) - if(0==(*it).tqfind(root)) + if(0==(*it).find(root)) return *it; } @@ -494,7 +494,7 @@ static bool isAAfm(const TQString &fname) { line=stream.readLine(); - if(line.tqcontains("StartFontMetrics")) + if(line.contains("StartFontMetrics")) { file.close(); return true; @@ -646,11 +646,11 @@ static bool getFontList(const TQStringList &files, TQMap<TQString, TQString> &ma { TQString name(Misc::getFile(*it)), path(Misc::getDir(*it)); - TQValueList<FontList>::Iterator entry=list.tqfind(FontList(name)); + TQValueList<FontList>::Iterator entry=list.find(FontList(name)); if(entry!=list.end()) { - if(!(*entry).paths.tqcontains(path)) + if(!(*entry).paths.contains(path)) (*entry).paths.append(path); } else @@ -688,11 +688,11 @@ static bool getFontList(const TQStringList &files, TQMap<TQString, TQString> &ma if((*pIt).orig[i]!=(*pBegin).orig[i]) { (*pIt).modified=(*pIt).orig.mid(i); - (*pIt).modified=(*pIt).modified.tqreplace('/', '_'); + (*pIt).modified=(*pIt).modified.replace('/', '_'); if((*pBegin).modified.isEmpty()) { (*pBegin).modified=(*pBegin).orig.mid(i); - (*pBegin).modified=(*pBegin).modified.tqreplace('/', '_'); + (*pBegin).modified=(*pBegin).modified.replace('/', '_'); } break; } @@ -806,9 +806,9 @@ CKioFonts::CKioFonts(const TQCString &pool, const TQCString &app) { TQString str(paths[path]); - str.tqreplace(TQRegExp("\\s*"), ""); + str.replace(TQRegExp("\\s*"), ""); - if(0==str.tqfind("unix/:")) + if(0==str.find("unix/:")) itsUsingXfsFpe=true; else if("fontconfig"==str) itsUsingFcFpe=true; @@ -1751,9 +1751,9 @@ void CKioFonts::special(const TQByteArray &a) finished(); break; case SPECIAL_RECONFIG: // Only itended to be called from kcmfontinst - when a user has re-enabled doX or doGs - if(itsRoot && !itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location)) + if(itsRoot && !itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location)) itsFolders[FOLDER_SYS].modified.add(itsFolders[FOLDER_SYS].location); - else if(!itsRoot && !itsFolders[FOLDER_USER].modified.tqcontains(itsFolders[FOLDER_USER].location)) + else if(!itsRoot && !itsFolders[FOLDER_USER].modified.contains(itsFolders[FOLDER_USER].location)) itsFolders[FOLDER_USER].modified.add(itsFolders[FOLDER_USER].location); doModified(); @@ -1831,7 +1831,7 @@ void CKioFonts::doModified() // // If a non-default folder has been modified, always configure X if(NULL==strchr(itsKfiParams, 'x') && - (itsFolders[FOLDER_SYS].modified.count()>1 || !itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location))) + (itsFolders[FOLDER_SYS].modified.count()>1 || !itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location))) { if(0==itsKfiParams[0]) strcpy(itsKfiParams, "-x"); @@ -1850,7 +1850,7 @@ void CKioFonts::doModified() KFI_DBUG << "RUN(root): kfontinst " << itsKfiParams << ' ' << *it << endl; } - if(itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location)) + if(itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location)) { itsHasSys=true; itsAddToSysFc=false; @@ -1862,7 +1862,7 @@ void CKioFonts::doModified() TQCString cmd; createRootRefreshCmd(cmd, itsFolders[FOLDER_SYS].modified, false); - if(doRootCmd(cmd, false) && itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location)) + if(doRootCmd(cmd, false) && itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location)) { itsHasSys=true; itsAddToSysFc=false; @@ -2039,7 +2039,7 @@ bool CKioFonts::updateFontList() if(!file.isEmpty()) { - if(!itsRoot && 0==file.tqfind(home)) + if(!itsRoot && 0==file.find(home)) folder=FOLDER_USER; TQValueList<FcPattern *> &patterns= @@ -2079,14 +2079,14 @@ CKioFonts::EFolder CKioFonts::getFolder(const KURL &url) TQMap<TQString, TQValueList<FcPattern *> >::Iterator CKioFonts::getMap(const KURL &url) { EFolder folder(getFolder(url)); - TQMap<TQString, TQValueList<FcPattern *> >::Iterator it=itsFolders[folder].fontMap.tqfind(removeMultipleExtension(url)); + TQMap<TQString, TQValueList<FcPattern *> >::Iterator it=itsFolders[folder].fontMap.find(removeMultipleExtension(url)); if(it==itsFolders[folder].fontMap.end()) // Perhaps it was fonts:/System/times.ttf ??? { FcPattern *pat=getEntry(folder, url.fileName(), false); if(pat) - it=itsFolders[folder].fontMap.tqfind(CFcEngine::createName(pat)); + it=itsFolders[folder].fontMap.find(CFcEngine::createName(pat)); } return it; @@ -2180,7 +2180,7 @@ bool CKioFonts::getSourceFiles(const KURL &src, TQStringList &files) uEnd=urls.end(); for(uIt=urls.begin(); uIt!=uEnd; ++uIt) - if(-1==files.tqfindIndex((*uIt).path())) + if(-1==files.findIndex((*uIt).path())) files.append((*uIt).path()); } } @@ -2290,7 +2290,7 @@ bool CKioFonts::confirmMultiple(const KURL &url, const TQStringList &files, EFol { TQString name(CFcEngine::createName(pat)); - if(-1==fonts.tqfindIndex(name)) + if(-1==fonts.findIndex(name)) fonts.append(name); } } @@ -2356,7 +2356,7 @@ bool CKioFonts::checkUrl(const KURL &u, bool rootOk) if(itsRoot) { if((isSysFolder(sect) || isUserFolder(sect)) && - (itsFolders[FOLDER_SYS].fontMap.end()==itsFolders[FOLDER_SYS].fontMap.tqfind(sect))) + (itsFolders[FOLDER_SYS].fontMap.end()==itsFolders[FOLDER_SYS].fontMap.find(sect))) //CPD: TODO: || it has a font specified! e.g. fonts:/System/Times -> even in have a fonts:/System font, redirect //should still happen { diff --git a/kcontrol/kfontinst/kio/KioFonts.h b/kcontrol/kfontinst/kio/KioFonts.h index 32d5a384e..66a2b01b9 100644 --- a/kcontrol/kfontinst/kio/KioFonts.h +++ b/kcontrol/kfontinst/kio/KioFonts.h @@ -82,7 +82,7 @@ class CKioFonts : public KIO::SlaveBase CDirList() { } CDirList(const TQString &str) : TQStringList(str) { } - void add(const TQString &d) { if ( tqcontains(d)) append(d); } + void add(const TQString &d) { if ( contains(d)) append(d); } }; struct TFolder diff --git a/kcontrol/kfontinst/lib/FcEngine.cpp b/kcontrol/kfontinst/lib/FcEngine.cpp index ec4f833a3..2b3d40737 100644 --- a/kcontrol/kfontinst/lib/FcEngine.cpp +++ b/kcontrol/kfontinst/lib/FcEngine.cpp @@ -185,72 +185,72 @@ static int fcSpacing(int spacing) static int strToWeight(const TQString &str, TQString &newStr) { - if(0==str.tqfind(i18n(KFI_WEIGHT_THIN), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_THIN), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_THIN).length()); return FC_WEIGHT_THIN; } - if(0==str.tqfind(i18n(KFI_WEIGHT_EXTRALIGHT), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_EXTRALIGHT), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_EXTRALIGHT).length()); return FC_WEIGHT_EXTRALIGHT; } - if(0==str.tqfind(i18n(KFI_WEIGHT_ULTRALIGHT), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_ULTRALIGHT), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_ULTRALIGHT).length()); return FC_WEIGHT_ULTRALIGHT; } - if(0==str.tqfind(i18n(KFI_WEIGHT_LIGHT), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_LIGHT), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_LIGHT).length()); return FC_WEIGHT_LIGHT; } - if(0==str.tqfind(i18n(KFI_WEIGHT_REGULAR), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_REGULAR), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_REGULAR).length()); return FC_WEIGHT_REGULAR; } - if(0==str.tqfind(i18n(KFI_WEIGHT_NORMAL), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_NORMAL), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_NORMAL).length()); return FC_WEIGHT_NORMAL; } - if(0==str.tqfind(i18n(KFI_WEIGHT_MEDIUM), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_MEDIUM), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_MEDIUM).length()); return FC_WEIGHT_MEDIUM; } - if(0==str.tqfind(i18n(KFI_WEIGHT_DEMIBOLD), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_DEMIBOLD), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_DEMIBOLD).length()); return FC_WEIGHT_SEMIBOLD; } - if(0==str.tqfind(i18n(KFI_WEIGHT_SEMIBOLD), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_SEMIBOLD), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_SEMIBOLD).length()); return FC_WEIGHT_SEMIBOLD; } - if(0==str.tqfind(i18n(KFI_WEIGHT_BOLD), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_BOLD), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_BOLD).length()); return FC_WEIGHT_BOLD; } - if(0==str.tqfind(i18n(KFI_WEIGHT_EXTRABOLD), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_EXTRABOLD), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_EXTRABOLD).length()); return FC_WEIGHT_EXTRABOLD; } - if(0==str.tqfind(i18n(KFI_WEIGHT_ULTRABOLD), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_ULTRABOLD), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_ULTRABOLD).length()); return FC_WEIGHT_ULTRABOLD; } - if(0==str.tqfind(i18n(KFI_WEIGHT_BLACK), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_BLACK), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_BLACK).length()); return FC_WEIGHT_BLACK; } - if(0==str.tqfind(i18n(KFI_WEIGHT_HEAVY), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_HEAVY), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_HEAVY).length()); return FC_WEIGHT_HEAVY; @@ -263,47 +263,47 @@ static int strToWeight(const TQString &str, TQString &newStr) #ifndef KFI_FC_NO_WIDTHS static int strToWidth(const TQString &str, TQString &newStr) { - if(0==str.tqfind(i18n(KFI_WIDTH_ULTRACONDENSED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_ULTRACONDENSED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_ULTRACONDENSED).length()); return FC_WIDTH_ULTRACONDENSED; } - if(0==str.tqfind(i18n(KFI_WIDTH_EXTRACONDENSED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_EXTRACONDENSED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_EXTRACONDENSED).length()); return FC_WIDTH_EXTRACONDENSED; } - if(0==str.tqfind(i18n(KFI_WIDTH_CONDENSED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_CONDENSED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_CONDENSED).length()); return FC_WIDTH_CONDENSED; } - if(0==str.tqfind(i18n(KFI_WIDTH_SEMICONDENSED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_SEMICONDENSED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_SEMICONDENSED).length()); return FC_WIDTH_SEMICONDENSED; } - if(0==str.tqfind(i18n(KFI_WIDTH_NORMAL), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_NORMAL), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_NORMAL).length()); return FC_WIDTH_NORMAL; } - if(0==str.tqfind(i18n(KFI_WIDTH_SEMIEXPANDED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_SEMIEXPANDED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_SEMIEXPANDED).length()); return FC_WIDTH_SEMIEXPANDED; } - if(0==str.tqfind(i18n(KFI_WIDTH_EXPANDED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_EXPANDED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_EXPANDED).length()); return FC_WIDTH_EXPANDED; } - if(0==str.tqfind(i18n(KFI_WIDTH_EXTRAEXPANDED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_EXTRAEXPANDED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_EXTRAEXPANDED).length()); return FC_WIDTH_EXTRAEXPANDED; } - if(0==str.tqfind(i18n(KFI_WIDTH_ULTRAEXPANDED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_ULTRAEXPANDED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_ULTRAEXPANDED).length()); return FC_WIDTH_ULTRAEXPANDED; @@ -316,9 +316,9 @@ static int strToWidth(const TQString &str, TQString &newStr) static int strToSlant(const TQString &str) { - if(-1!=str.tqfind(i18n(KFI_SLANT_ITALIC))) + if(-1!=str.find(i18n(KFI_SLANT_ITALIC))) return FC_SLANT_ITALIC; - if(-1!=str.tqfind(i18n(KFI_SLANT_OBLIQUE))) + if(-1!=str.find(i18n(KFI_SLANT_OBLIQUE))) return FC_SLANT_OBLIQUE; return FC_SLANT_ROMAN; } @@ -867,7 +867,7 @@ bool CFcEngine::getInfo(const KURL &url, int faceNo, TQString &full, TQString &f { int pos; - if(-1==(pos=itsDescriptiveName.tqfind(", "))) // No style information... + if(-1==(pos=itsDescriptiveName.find(", "))) // No style information... family=itsDescriptiveName; else family=itsDescriptiveName.left(pos); @@ -948,7 +948,7 @@ bool CFcEngine::parseUrl(const KURL &url, int faceNo, bool all) TQTextStream stream(&file); thumbUrl=stream.readLine(); - isThumbnailUrl=0==thumbUrl.tqfind(KFI_KIO_FONTS_PROTOCOL) && parseUrl(KURL(thumbUrl), faceNo, all); + isThumbnailUrl=0==thumbUrl.find(KFI_KIO_FONTS_PROTOCOL) && parseUrl(KURL(thumbUrl), faceNo, all); file.close(); } @@ -1003,7 +1003,7 @@ void CFcEngine::parseName(const TQString &name, int faceNo, bool all) itsDescriptiveName=name; itsSpacing=FC_PROPORTIONAL; - if(-1==(pos=name.tqfind(", "))) // No style information... + if(-1==(pos=name.find(", "))) // No style information... { itsWeight=FC_WEIGHT_NORMAL; #ifndef KFI_FC_NO_WIDTHS diff --git a/kcontrol/kfontinst/lib/Misc.cpp b/kcontrol/kfontinst/lib/Misc.cpp index 6e87c9b02..1e779b514 100644 --- a/kcontrol/kfontinst/lib/Misc.cpp +++ b/kcontrol/kfontinst/lib/Misc.cpp @@ -65,9 +65,9 @@ TQString dirSyntax(const TQString &d) { TQString ds(d); - ds.tqreplace("//", "/"); + ds.replace("//", "/"); - int slashPos=ds.tqfindRev('/'); + int slashPos=ds.findRev('/'); if(slashPos!=(((int)ds.length())-1)) ds.append('/'); @@ -84,9 +84,9 @@ TQString xDirSyntax(const TQString &d) { TQString ds(d); - ds.tqreplace("//", "/"); + ds.replace("//", "/"); - int slashPos=ds.tqfindRev('/'); + int slashPos=ds.findRev('/'); if(slashPos==(((int)ds.length())-1)) ds.remove(slashPos, 1); @@ -100,7 +100,7 @@ TQString getDir(const TQString &f) { TQString d(f); - int slashPos=d.tqfindRev('/'); + int slashPos=d.findRev('/'); if(slashPos!=-1) d.remove(slashPos+1, d.length()); @@ -112,7 +112,7 @@ TQString getFile(const TQString &f) { TQString d(f); - int slashPos=d.tqfindRev('/'); + int slashPos=d.findRev('/'); if(slashPos!=-1) d.remove(0, slashPos+1); @@ -152,7 +152,7 @@ bool doCmd(const TQString &cmd, const TQString &p1, const TQString &p2, const TQ TQString changeExt(const TQString &f, const TQString &newExt) { TQString newStr(f); - int dotPos=newStr.tqfindRev('.'); + int dotPos=newStr.findRev('.'); if(-1==dotPos) newStr+=TQChar('.')+newExt; diff --git a/kcontrol/kicker/advancedDialog.cpp b/kcontrol/kicker/advancedDialog.cpp index a6790d9c9..29de71df7 100644 --- a/kcontrol/kicker/advancedDialog.cpp +++ b/kcontrol/kicker/advancedDialog.cpp @@ -136,7 +136,7 @@ void advancedDialog::save() // is there a config group for this extension? if(!c.hasGroup(group) || - group.tqcontains("Extension") < 1) + group.contains("Extension") < 1) { continue; } diff --git a/kcontrol/kicker/applettab_impl.cpp b/kcontrol/kicker/applettab_impl.cpp index 534f2cbdb..a8b7cdb20 100644 --- a/kcontrol/kicker/applettab_impl.cpp +++ b/kcontrol/kicker/applettab_impl.cpp @@ -132,7 +132,7 @@ void AppletTab::load( bool useDefaults ) TQStringList list = c.readListEntry("TrustedApplets"); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - if(available.tqcontains(*it)) + if(available.contains(*it)) l_trusted << (*it); } } @@ -142,7 +142,7 @@ void AppletTab::load( bool useDefaults ) for ( TQStringList::Iterator it = available.begin(); it != available.end(); ++it ) { - if(!l_trusted.tqcontains(*it)) + if(!l_trusted.contains(*it)) l_available << (*it); } diff --git a/kcontrol/kicker/lookandfeeltab_impl.cpp b/kcontrol/kicker/lookandfeeltab_impl.cpp index 984666d36..24c640a1d 100644 --- a/kcontrol/kicker/lookandfeeltab_impl.cpp +++ b/kcontrol/kicker/lookandfeeltab_impl.cpp @@ -190,35 +190,35 @@ void LookAndFeelTab::load(bool useDefaults) if (config.readBoolEntry("EnableKMenuTiles", false)) { tile = config.readEntry("KMenuTile", "solid_blue"); - m_kmenuTile->setCurrentItem(m_tilename.tqfindIndex(tile)); + m_kmenuTile->setCurrentItem(m_tilename.findIndex(tile)); kcfg_KMenuTileColor->setEnabled(tile == "Colorize"); } if (config.readBoolEntry("EnableDesktopButtonTiles", false)) { tile = config.readEntry("DesktopButtonTile", "solid_orange"); - m_desktopTile->setCurrentItem(m_tilename.tqfindIndex(tile)); + m_desktopTile->setCurrentItem(m_tilename.findIndex(tile)); kcfg_DesktopButtonTileColor->setEnabled(tile == "Colorize"); } if (config.readBoolEntry("EnableURLTiles", false)) { tile = config.readEntry("URLTile", "solid_gray"); - m_urlTile->setCurrentItem(m_tilename.tqfindIndex(tile)); + m_urlTile->setCurrentItem(m_tilename.findIndex(tile)); kcfg_URLTileColor->setEnabled(tile == "Colorize"); } if (config.readBoolEntry("EnableBrowserTiles", false)) { tile = config.readEntry("BrowserTile", "solid_green"); - m_browserTile->setCurrentItem(m_tilename.tqfindIndex(tile)); + m_browserTile->setCurrentItem(m_tilename.findIndex(tile)); kcfg_BrowserTileColor->setEnabled(tile == "Colorize"); } if (config.readBoolEntry("EnableWindowListTiles", false)) { tile = config.readEntry("WindowListTile", "solid_green"); - m_windowListTile->setCurrentItem(m_tilename.tqfindIndex(tile)); + m_windowListTile->setCurrentItem(m_tilename.findIndex(tile)); kcfg_WindowListTileColor->setEnabled(tile == "Colorize"); } } @@ -328,7 +328,7 @@ void LookAndFeelTab::fillTileCombos() TQPixmap pix(tile); TQFileInfo fi(tile); tile = fi.fileName(); - tile.truncate(tile.tqfind("_tiny_up.png")); + tile.truncate(tile.find("_tiny_up.png")); m_tilename << tile; // Transform tile to words with title case diff --git a/kcontrol/kicker/main.cpp b/kcontrol/kicker/main.cpp index 31cd34c11..95d80cc31 100644 --- a/kcontrol/kicker/main.cpp +++ b/kcontrol/kicker/main.cpp @@ -187,7 +187,7 @@ void KickerConfig::setupExtensionInfo(KConfig& config, bool checkExists, bool re TQString group(*it); // is there a config group for this extension? - if (!config.hasGroup(group) || group.tqcontains("Extension") < 1) + if (!config.hasGroup(group) || group.contains("Extension") < 1) { continue; } diff --git a/kcontrol/kicker/positiontab_impl.cpp b/kcontrol/kicker/positiontab_impl.cpp index 5f89cd5a6..3a72e6417 100644 --- a/kcontrol/kicker/positiontab_impl.cpp +++ b/kcontrol/kicker/positiontab_impl.cpp @@ -220,7 +220,7 @@ void PositionTab::sizeChanged(int which) void PositionTab::movePanel(int whichButton) { - TQPushButton* pushed = reinterpret_cast<TQPushButton*>(m_locationGroup->tqfind(whichButton)); + TQPushButton* pushed = reinterpret_cast<TQPushButton*>(m_locationGroup->find(whichButton)); if (pushed == locationTopLeft) { diff --git a/kcontrol/kio/fakeuaprovider.cpp b/kcontrol/kio/fakeuaprovider.cpp index 2fe6d27f1..e48d15432 100644 --- a/kcontrol/kio/fakeuaprovider.cpp +++ b/kcontrol/kio/fakeuaprovider.cpp @@ -37,11 +37,11 @@ FakeUASProvider::FakeUASProvider() FakeUASProvider::StatusCode FakeUASProvider::createNewUAProvider( const TQString& uaStr ) { TQStringList split; - int pos = (uaStr).tqfind("::"); + int pos = (uaStr).find("::"); if ( pos == -1 ) { - pos = (uaStr).tqfind(':'); + pos = (uaStr).find(':'); if ( pos != -1 ) { split.append(uaStr.left(pos)); @@ -53,7 +53,7 @@ FakeUASProvider::StatusCode FakeUASProvider::createNewUAProvider( const TQString split = TQStringList::split("::", uaStr); } - if ( m_lstIdentity.tqcontains(split[1]) ) + if ( m_lstIdentity.contains(split[1]) ) return DUPLICATE_ENTRY; else { @@ -90,29 +90,29 @@ void FakeUASProvider::parseDescription() struct utsname utsn; uname( &utsn ); - tmp.tqreplace( QFL("appSysName"), TQString(utsn.sysname) ); - tmp.tqreplace( QFL("appSysRelease"), TQString(utsn.release) ); - tmp.tqreplace( QFL("appMachineType"), TQString(utsn.machine) ); + tmp.replace( QFL("appSysName"), TQString(utsn.sysname) ); + tmp.replace( QFL("appSysRelease"), TQString(utsn.release) ); + tmp.replace( QFL("appMachineType"), TQString(utsn.machine) ); TQStringList languageList = KGlobal::locale()->languageList(); if ( languageList.count() ) { - TQStringList::Iterator it = languageList.tqfind( TQString::tqfromLatin1("C") ); + TQStringList::Iterator it = languageList.find( TQString::tqfromLatin1("C") ); if( it != languageList.end() ) { - if( languageList.tqcontains( TQString::tqfromLatin1("en") ) > 0 ) + if( languageList.contains( TQString::tqfromLatin1("en") ) > 0 ) languageList.remove( it ); else (*it) = TQString::tqfromLatin1("en"); } } - tmp.tqreplace( QFL("appLanguage"), TQString("%1").arg(languageList.join(", ")) ); - tmp.tqreplace( QFL("appPlatform"), QFL("X11") ); + tmp.replace( QFL("appLanguage"), TQString("%1").arg(languageList.join(", ")) ); + tmp.replace( QFL("appPlatform"), QFL("X11") ); } // Ignore dups... - if ( m_lstIdentity.tqcontains(tmp) ) + if ( m_lstIdentity.contains(tmp) ) continue; m_lstIdentity << tmp; @@ -133,7 +133,7 @@ void FakeUASProvider::parseDescription() TQString FakeUASProvider::aliasStr( const TQString& name ) { - int id = userAgentStringList().tqfindIndex(name); + int id = userAgentStringList().findIndex(name); if ( id == -1 ) return TQString::null; else @@ -142,7 +142,7 @@ TQString FakeUASProvider::aliasStr( const TQString& name ) TQString FakeUASProvider::agentStr( const TQString& name ) { - int id = userAgentAliasList().tqfindIndex(name); + int id = userAgentAliasList().findIndex(name); if ( id == -1 ) return TQString::null; else diff --git a/kcontrol/kio/kcookiesmanagement.cpp b/kcontrol/kio/kcookiesmanagement.cpp index da899be1f..fa9bb097c 100644 --- a/kcontrol/kio/kcookiesmanagement.cpp +++ b/kcontrol/kio/kcookiesmanagement.cpp @@ -408,7 +408,7 @@ void KCookiesManagement::deleteCookie(TQListViewItem* deleteItem) if( item->cookie() ) { CookieListViewItem *parent = static_cast<CookieListViewItem*>(item->tqparent()); - CookiePropList *list = deletedCookies.tqfind(parent->domain()); + CookiePropList *list = deletedCookies.find(parent->domain()); if(!list) { list = new CookiePropList; diff --git a/kcontrol/kio/kcookiespolicies.cpp b/kcontrol/kio/kcookiespolicies.cpp index 163b9b14a..ac0b2572f 100644 --- a/kcontrol/kio/kcookiespolicies.cpp +++ b/kcontrol/kio/kcookiespolicies.cpp @@ -434,7 +434,7 @@ void KCookiesPolicies::defaults() void KCookiesPolicies::splitDomainAdvice (const TQString& cfg, TQString &domain, KCookieAdvice::Value &advice) { - int sepPos = cfg.tqfindRev(':'); + int sepPos = cfg.findRev(':'); // Ignore any policy that does not contain a domain... if ( sepPos <= 0 ) diff --git a/kcontrol/kio/kmanualproxydlg.cpp b/kcontrol/kio/kmanualproxydlg.cpp index a9c8e6eca..b5961db7c 100644 --- a/kcontrol/kio/kmanualproxydlg.cpp +++ b/kcontrol/kio/kmanualproxydlg.cpp @@ -337,7 +337,7 @@ bool KManualProxyDlg::handleDuplicate( const TQString& site ) TQListBoxItem* item = mDlg->lbExceptions->firstItem(); while ( item != 0 ) { - if ( item->text().tqfindRev( site ) != -1 && + if ( item->text().findRev( site ) != -1 && item != mDlg->lbExceptions->selectedItem() ) { TQString msg = i18n("You entered a duplicate address. " diff --git a/kcontrol/kio/policydlg.h b/kcontrol/kio/policydlg.h index 17616860f..a67bfccaa 100644 --- a/kcontrol/kio/policydlg.h +++ b/kcontrol/kio/policydlg.h @@ -52,11 +52,11 @@ public: if (advice.isEmpty()) return KCookieAdvice::Dunno; - if (advice.tqfind (TQString::tqfromLatin1("accept"), 0, false) == 0) + if (advice.find (TQString::tqfromLatin1("accept"), 0, false) == 0) return KCookieAdvice::Accept; - else if (advice.tqfind (TQString::tqfromLatin1("reject"), 0, false) == 0) + else if (advice.find (TQString::tqfromLatin1("reject"), 0, false) == 0) return KCookieAdvice::Reject; - else if (advice.tqfind (TQString::tqfromLatin1("ask"), 0, false) == 0) + else if (advice.find (TQString::tqfromLatin1("ask"), 0, false) == 0) return KCookieAdvice::Ask; return KCookieAdvice::Dunno; diff --git a/kcontrol/kio/smbrodlg.cpp b/kcontrol/kio/smbrodlg.cpp index e5337cbf2..148af43d1 100644 --- a/kcontrol/kio/smbrodlg.cpp +++ b/kcontrol/kio/smbrodlg.cpp @@ -101,7 +101,7 @@ void SMBRoOptions::load() // TQStringList _strList = KGlobal::charsets()->availableEncodingNames(); // TQString m_encoding = TQTextCodec::codecForLocale()->name(); -// m_encodingList->setCurrentItem( _strList.tqfindIndex( cfg->readEntry( "Encoding", m_encoding.lower() ) ) ); +// m_encodingList->setCurrentItem( _strList.findIndex( cfg->readEntry( "Encoding", m_encoding.lower() ) ) ); // unscramble TQString scrambled = cfg->readEntry( "Password" ); diff --git a/kcontrol/kio/uagentproviderdlg.cpp b/kcontrol/kio/uagentproviderdlg.cpp index adab4b611..5bf92cdb7 100644 --- a/kcontrol/kio/uagentproviderdlg.cpp +++ b/kcontrol/kio/uagentproviderdlg.cpp @@ -121,7 +121,7 @@ void UAProviderDlg::setSiteName( const TQString& text ) void UAProviderDlg::setIdentity( const TQString& text ) { - int id = dlg->cbAlias->listBox()->index( dlg->cbAlias->listBox()->tqfindItem(text) ); + int id = dlg->cbAlias->listBox()->index( dlg->cbAlias->listBox()->findItem(text) ); dlg->cbAlias->setCurrentItem( id ); slotActivated( dlg->cbAlias->currentText() ); if ( !dlg->leSite->isEnabled() ) diff --git a/kcontrol/kio/useragentdlg.cpp b/kcontrol/kio/useragentdlg.cpp index 26476d9a8..c34d5cadc 100644 --- a/kcontrol/kio/useragentdlg.cpp +++ b/kcontrol/kio/useragentdlg.cpp @@ -111,12 +111,12 @@ void UserAgentDlg::load() dlg->cbSendUAString->setChecked( b ); m_ua_keys = m_config->readEntry("UserAgentKeys", DEFAULT_USER_AGENT_KEYS).lower(); dlg->leDefaultId->setSqueezedText( KProtocolManager::defaultUserAgent( m_ua_keys ) ); - dlg->cbOS->setChecked( m_ua_keys.tqcontains('o') ); - dlg->cbOSVersion->setChecked( m_ua_keys.tqcontains('v') ); - dlg->cbOSVersion->setEnabled( m_ua_keys.tqcontains('o') ); - dlg->cbPlatform->setChecked( m_ua_keys.tqcontains('p') ); - dlg->cbProcessorType->setChecked( m_ua_keys.tqcontains('m') ); - dlg->cbLanguage->setChecked( m_ua_keys.tqcontains('l') ); + dlg->cbOS->setChecked( m_ua_keys.contains('o') ); + dlg->cbOSVersion->setChecked( m_ua_keys.contains('v') ); + dlg->cbOSVersion->setEnabled( m_ua_keys.contains('o') ); + dlg->cbPlatform->setChecked( m_ua_keys.contains('p') ); + dlg->cbProcessorType->setChecked( m_ua_keys.contains('m') ); + dlg->cbLanguage->setChecked( m_ua_keys.contains('l') ); updateButtons(); emit changed( false ); } @@ -135,12 +135,12 @@ void UserAgentDlg::defaults() dlg->lvDomainPolicyList->clear(); m_ua_keys = DEFAULT_USER_AGENT_KEYS; dlg->leDefaultId->setSqueezedText( KProtocolManager::defaultUserAgent(m_ua_keys) ); - dlg->cbOS->setChecked( m_ua_keys.tqcontains('o') ); - dlg->cbOSVersion->setChecked( m_ua_keys.tqcontains('v') ); - dlg->cbOSVersion->setEnabled( m_ua_keys.tqcontains('o') ); - dlg->cbPlatform->setChecked( m_ua_keys.tqcontains('p') ); - dlg->cbProcessorType->setChecked( m_ua_keys.tqcontains('m') ); - dlg->cbLanguage->setChecked( m_ua_keys.tqcontains('l') ); + dlg->cbOS->setChecked( m_ua_keys.contains('o') ); + dlg->cbOSVersion->setChecked( m_ua_keys.contains('v') ); + dlg->cbOSVersion->setEnabled( m_ua_keys.contains('o') ); + dlg->cbPlatform->setChecked( m_ua_keys.contains('p') ); + dlg->cbProcessorType->setChecked( m_ua_keys.contains('m') ); + dlg->cbLanguage->setChecked( m_ua_keys.contains('l') ); dlg->cbSendUAString->setChecked( true ); updateButtons(); configChanged(); @@ -351,7 +351,7 @@ void UserAgentDlg::changeDefaultUAModifiers( int ) if ( dlg->cbLanguage->isChecked() ) m_ua_keys += 'l'; - dlg->cbOSVersion->setEnabled(m_ua_keys.tqcontains('o')); + dlg->cbOSVersion->setEnabled(m_ua_keys.contains('o')); TQString modVal = KProtocolManager::defaultUserAgent( m_ua_keys ); if ( dlg->leDefaultId->text() != modVal ) diff --git a/kcontrol/konq/desktopbehavior_impl.cpp b/kcontrol/konq/desktopbehavior_impl.cpp index 3a03c4d69..49725a3af 100644 --- a/kcontrol/konq/desktopbehavior_impl.cpp +++ b/kcontrol/konq/desktopbehavior_impl.cpp @@ -259,7 +259,7 @@ void DesktopBehavior::fillMediaListView() for (; it2 != mimetypes.end(); ++it2) { if ( ((*it2)->name().startsWith("media/")) ) { - bool ok=excludedMedia.tqcontains((*it2)->name())==0; + bool ok=excludedMedia.contains((*it2)->name())==0; new DesktopBehaviorMediaItem (this, mediaListView, (*it2)->comment(), (*it2)->name(),ok); } } @@ -309,8 +309,8 @@ void DesktopBehavior::load( bool useDefaults ) previewListView->clear(); TQStringList previews = g_pConfig->readListEntry("Preview"); for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) - new DesktopBehaviorPreviewItem(this, previewListView, *it, previews.tqcontains((*it)->desktopEntryName())); - new DesktopBehaviorPreviewItem(this, previewListView, previews.tqcontains("audio/")); + new DesktopBehaviorPreviewItem(this, previewListView, *it, previews.contains((*it)->desktopEntryName())); + new DesktopBehaviorPreviewItem(this, previewListView, previews.contains("audio/")); // g_pConfig->setGroup( "FMSettings" ); toolTipBox->setChecked(g_pConfig->readBoolEntry( "ShowFileTips", true ) ); diff --git a/kcontrol/konqhtml/domainlistview.cpp b/kcontrol/konqhtml/domainlistview.cpp index 4927eda48..699940b66 100644 --- a/kcontrol/konqhtml/domainlistview.cpp +++ b/kcontrol/konqhtml/domainlistview.cpp @@ -163,7 +163,7 @@ void DomainListView::deletePressed() return; } - DomainPolicyMap::Iterator it = domainPolicies.tqfind(index); + DomainPolicyMap::Iterator it = domainPolicies.find(index); if (it != domainPolicies.end()) { delete it.data(); domainPolicies.remove(it); diff --git a/kcontrol/konqhtml/filteropts.cpp b/kcontrol/konqhtml/filteropts.cpp index c7bb2bdbd..731bae2ec 100644 --- a/kcontrol/konqhtml/filteropts.cpp +++ b/kcontrol/konqhtml/filteropts.cpp @@ -189,7 +189,7 @@ void KCMFilter::importFilters() } } - if (!line.isEmpty() && mListBox->tqfindItem(line, TQt::CaseSensitive|TQt::ExactMatch) == 0) + if (!line.isEmpty() && mListBox->findItem(line, TQt::CaseSensitive|TQt::ExactMatch) == 0) paths.append(line); } f.close(); @@ -267,7 +267,7 @@ void KCMFilter::load( bool useDefaults ) for (int i=0; i<num; ++i) { TQString key = "Filter-" + TQString::number(i); - it = entryMap.tqfind(key); + it = entryMap.find(key); if (it != entryMap.end()) paths.append(it.data()); } diff --git a/kcontrol/konqhtml/jspolicies.cpp b/kcontrol/konqhtml/jspolicies.cpp index 88baa1103..d295740dc 100644 --- a/kcontrol/konqhtml/jspolicies.cpp +++ b/kcontrol/konqhtml/jspolicies.cpp @@ -362,19 +362,19 @@ JSPoliciesFrame::~JSPoliciesFrame() { void JSPoliciesFrame::refresh() { TQRadioButton *button; - button = static_cast<TQRadioButton *>(js_popup->tqfind( + button = static_cast<TQRadioButton *>(js_popup->find( policies->window_open)); if (button != 0) button->setChecked(true); - button = static_cast<TQRadioButton *>(js_resize->tqfind( + button = static_cast<TQRadioButton *>(js_resize->find( policies->window_resize)); if (button != 0) button->setChecked(true); - button = static_cast<TQRadioButton *>(js_move->tqfind( + button = static_cast<TQRadioButton *>(js_move->find( policies->window_move)); if (button != 0) button->setChecked(true); - button = static_cast<TQRadioButton *>(js_focus->tqfind( + button = static_cast<TQRadioButton *>(js_focus->find( policies->window_focus)); if (button != 0) button->setChecked(true); - button = static_cast<TQRadioButton *>(js_statusbar->tqfind( + button = static_cast<TQRadioButton *>(js_statusbar->find( policies->window_status)); if (button != 0) button->setChecked(true); } diff --git a/kcontrol/konsole/schemaeditor.cpp b/kcontrol/konsole/schemaeditor.cpp index fc9ddee3d..80b8ef2fa 100644 --- a/kcontrol/konsole/schemaeditor.cpp +++ b/kcontrol/konsole/schemaeditor.cpp @@ -241,7 +241,7 @@ void SchemaEditor::loadAllSchema(TQString currentFile) TQString title = readSchemaTitle(name); // Only insert new items so that local items override global - if (schemaList->tqfindItem(title, ExactMatch) == 0) { + if (schemaList->findItem(title, ExactMatch) == 0) { if (title.isNull() || title.isEmpty()) title=i18n("untitled"); @@ -594,7 +594,7 @@ void SchemaEditor::readSchema(int num) continue; TQString qline(line); - backgndLine->setText(locate("wallpaper", qline.mid( qline.tqfind(" ",7)+1 ) )); + backgndLine->setText(locate("wallpaper", qline.mid( qline.find(" ",7)+1 ) )); modeCombo->setCurrentItem(attr - 2); } diff --git a/kcontrol/krdb/krdb.cpp b/kcontrol/krdb/krdb.cpp index 582937b8c..d2e4731bd 100644 --- a/kcontrol/krdb/krdb.cpp +++ b/kcontrol/krdb/krdb.cpp @@ -174,10 +174,10 @@ static void applyQtSettings( KConfig& kglobals, TQSettings& settings ) // end it with.. So keep a TQMap to bool, specifying whether the path is KDE-specified.. TQString qversion = qVersion(); - if ( qversion.tqcontains( '.' ) > 1 ) - qversion.truncate( qversion.tqfindRev( '.' ) ); - if ( qversion.tqcontains( '-' ) ) - qversion.truncate( qversion.tqfindRev( '-' ) ); + if ( qversion.contains( '.' ) > 1 ) + qversion.truncate( qversion.findRev( '.' ) ); + if ( qversion.contains( '-' ) ) + qversion.truncate( qversion.findRev( '-' ) ); TQStringList kdeAdded = settings.readListEntry("/qt/KDE/kdeAddedLibraryPaths"); @@ -220,8 +220,8 @@ static void applyQtSettings( KConfig& kglobals, TQSettings& settings ) pathDb[path]=true; - if(path.tqcontains("/lib64/")) - path.tqreplace("/lib64/","/lib/"); + if(path.contains("/lib64/")) + path.replace("/lib64/","/lib/"); pathDb[path]=true; } diff --git a/kcontrol/kthememanager/ktheme.cpp b/kcontrol/kthememanager/ktheme.cpp index 92859de6c..5396d9e2b 100644 --- a/kcontrol/kthememanager/ktheme.cpp +++ b/kcontrol/kthememanager/ktheme.cpp @@ -469,14 +469,14 @@ void KTheme::apply() iconConf->setGroup( "ToolbarIcons" ); TQString iconName = iconSubElem.tagName(); - if ( iconName.tqcontains( "Color" ) ) + if ( iconName.contains( "Color" ) ) { TQColor iconColor = TQColor( iconSubElem.attribute( "rgb" ) ); iconConf->writeEntry( iconName, iconColor, true, true ); } - else if ( iconName.tqcontains( "Value" ) || iconName == "Size" ) + else if ( iconName.contains( "Value" ) || iconName == "Size" ) iconConf->writeEntry( iconName, iconSubElem.attribute( "value" ).toUInt(), true, true ); - else if ( iconName.tqcontains( "Effect" ) ) + else if ( iconName.contains( "Effect" ) ) iconConf->writeEntry( iconName, iconSubElem.attribute( "name" ), true, true ); else iconConf->writeEntry( iconName, static_cast<bool>( iconSubElem.attribute( "value" ).toUInt() ), true, true ); @@ -738,18 +738,18 @@ void KTheme::createIconElems( const TQString & group, const TQString & object, << "DisabledColor" << "DisabledColor2" << "DisabledEffect" << "DisabledSemiTransparent" << "DisabledValue"; for ( TQStringList::ConstIterator it = elemNames.begin(); it != elemNames.end(); ++it ) { - if ( (*it).tqcontains( "Color" ) ) + if ( (*it).contains( "Color" ) ) createColorElem( *it, object, parent, cfg ); else { TQDomElement tmpCol = m_dom.createElement( *it ); tmpCol.setAttribute( "object", object ); - if ( (*it).tqcontains( "Value" ) || *it == "Size" ) + if ( (*it).contains( "Value" ) || *it == "Size" ) tmpCol.setAttribute( "value", cfg->readNumEntry( *it, 1 ) ); - else if ( (*it).tqcontains( "DisabledEffect" ) ) + else if ( (*it).contains( "DisabledEffect" ) ) tmpCol.setAttribute( "name", cfg->readEntry( *it, "togray" ) ); - else if ( (*it).tqcontains( "Effect" ) ) + else if ( (*it).contains( "Effect" ) ) tmpCol.setAttribute( "name", cfg->readEntry( *it, "none" ) ); else tmpCol.setAttribute( "value", cfg->readBoolEntry( *it, false ) ); @@ -832,7 +832,7 @@ TQString KTheme::processFilePath( const TQString & section, const TQString & pat TQString KTheme::unprocessFilePath( const TQString & section, TQString path ) { if ( path.startsWith( "theme:/" ) ) - return path.tqreplace( TQRegExp( "^theme:/" ), m_kgd->findResourceDir( "themes", m_name + "/" + m_name + ".xml") + m_name + "/" ); + return path.replace( TQRegExp( "^theme:/" ), m_kgd->findResourceDir( "themes", m_name + "/" + m_name + ".xml") + m_name + "/" ); if ( TQFile::exists( path ) ) return path; diff --git a/kcontrol/kthememanager/kthememanager.cpp b/kcontrol/kthememanager/kthememanager.cpp index 111384bd5..ed945067b 100644 --- a/kcontrol/kthememanager/kthememanager.cpp +++ b/kcontrol/kthememanager/kthememanager.cpp @@ -136,7 +136,7 @@ void kthememanager::load(bool useDefaults) conf.setGroup( "General" ); TQString themeName = conf.readEntry( "CurrentTheme" ); - TQListViewItem * cur = dlg->lvThemes->tqfindItem( themeName, 0 ); + TQListViewItem * cur = dlg->lvThemes->findItem( themeName, 0 ); if ( cur ) { dlg->lvThemes->setSelected( cur, true ); @@ -264,7 +264,7 @@ void kthememanager::slotRemoveTheme() bool kthememanager::themeExist(const TQString &_themeName) { - return ( dlg->lvThemes->tqfindItem( _themeName, 0 )!=0 ); + return ( dlg->lvThemes->findItem( _themeName, 0 )!=0 ); } void kthememanager::slotCreateTheme() @@ -298,7 +298,7 @@ void kthememanager::slotCreateTheme() m_theme->setAuthor( dlg.getAuthor() ); m_theme->setEmail( dlg.getEmail() ); m_theme->setHomepage( dlg.getHomepage() ); - m_theme->setComment( dlg.getComment().tqreplace( "\n", "" ) ); + m_theme->setComment( dlg.getComment().replace( "\n", "" ) ); m_theme->setVersion( dlg.getVersion() ); TQString result = m_theme->createYourself( true ); diff --git a/kcontrol/locale/kcmlocale.cpp b/kcontrol/locale/kcmlocale.cpp index 81b899caa..c2ca4c310 100644 --- a/kcontrol/locale/kcmlocale.cpp +++ b/kcontrol/locale/kcmlocale.cpp @@ -172,7 +172,7 @@ void KLocaleConfig::slotAddLanguage(const TQString & code) pos = 0; // If it's already in list, just move it (delete the old, then insert a new) - int oldPos = languageList.tqfindIndex( code ); + int oldPos = languageList.findIndex( code ); if ( oldPos != -1 ) languageList.remove( languageList.tqat(oldPos) ); @@ -305,9 +305,9 @@ void KLocaleConfig::loadLanguageList() m_locale->translate("without name")); TQString tag = *it; - int index = tag.tqfindRev('/'); + int index = tag.findRev('/'); tag = tag.left(index); - index = tag.tqfindRev('/'); + index = tag.findRev('/'); tag = tag.mid(index + 1); m_addLanguage->insertItem(name, tag, submenu, menu_index); } @@ -338,11 +338,11 @@ void KLocaleConfig::loadCountryList() TQString tag = *it; int index; - index = tag.tqfindRev('/'); + index = tag.findRev('/'); if (index != -1) tag = tag.mid(index + 1); - index = tag.tqfindRev('.'); + index = tag.findRev('.'); if (index != -1) tag.truncate(index); @@ -374,9 +374,9 @@ void KLocaleConfig::loadCountryList() TQString submenu = entry.readEntry("Region"); TQString tag = *it; - int index = tag.tqfindRev('/'); + int index = tag.findRev('/'); tag.truncate(index); - index = tag.tqfindRev('/'); + index = tag.findRev('/'); tag = tag.mid(index + 1); int menu_index = submenu.isEmpty() ? -1 : -2; diff --git a/kcontrol/locale/localemon.cpp b/kcontrol/locale/localemon.cpp index 2c2fa37c5..16987cc90 100644 --- a/kcontrol/locale/localemon.cpp +++ b/kcontrol/locale/localemon.cpp @@ -152,7 +152,7 @@ void KLocaleConfigMoney::save() m_locale->monetaryDecimalSymbol(), true, true); str = ent.readEntry("MonetaryThousandsSeparator", TQString::tqfromLatin1(",")); - str.tqreplace(TQString::tqfromLatin1("$0"), TQString()); + str.replace(TQString::tqfromLatin1("$0"), TQString()); config->deleteEntry("MonetaryThousandsSeparator", false, true); if (str != m_locale->monetaryThousandsSeparator()) config->writeEntry("MonetaryThousandsSeparator", diff --git a/kcontrol/locale/localenum.cpp b/kcontrol/locale/localenum.cpp index 2095e1e9a..31f06fd98 100644 --- a/kcontrol/locale/localenum.cpp +++ b/kcontrol/locale/localenum.cpp @@ -105,7 +105,7 @@ void KLocaleConfigNumber::save() str = ent.readEntry("ThousandsSeparator", TQString::tqfromLatin1(",")); config->deleteEntry("ThousandsSeparator", false, true); - str.tqreplace(TQString::tqfromLatin1("$0"), TQString()); + str.replace(TQString::tqfromLatin1("$0"), TQString()); if (str != m_locale->thousandsSeparator()) config->writeEntry("ThousandsSeparator", TQString::tqfromLatin1("$0%1$0") diff --git a/kcontrol/privacy/kprivacymanager.cpp b/kcontrol/privacy/kprivacymanager.cpp index 6df0d04f9..098c3e75f 100644 --- a/kcontrol/privacy/kprivacymanager.cpp +++ b/kcontrol/privacy/kprivacymanager.cpp @@ -161,7 +161,7 @@ bool KPrivacyManager::isApplicationRegistered(const TQString &appName) QCStringList regApps = kapp->dcopClient()->registeredApplications(); for ( QCStringList::Iterator it = regApps.begin(); it != regApps.end(); ++it ) - if((*it).tqfind(appName.latin1()) != -1) return true; + if((*it).find(appName.latin1()) != -1) return true; return false; } diff --git a/kcontrol/randr/krandrmodule.cpp b/kcontrol/randr/krandrmodule.cpp index e87dbad5b..d5087cc35 100644 --- a/kcontrol/randr/krandrmodule.cpp +++ b/kcontrol/randr/krandrmodule.cpp @@ -181,7 +181,7 @@ void KRandRModule::slotScreenChanged(int screen) // Clear rotations for (int i = m_rotationGroup->count() - 1; i >= 0; i--) - m_rotationGroup->remove(m_rotationGroup->tqfind(i)); + m_rotationGroup->remove(m_rotationGroup->find(i)); // Create rotations for (int i = 0; i < RandRScreen::OrientationCount; i++) @@ -196,21 +196,21 @@ void KRandRModule::slotScreenChanged(int screen) void KRandRModule::slotRotationChanged() { - if (m_rotationGroup->tqfind(0)->isOn()) + if (m_rotationGroup->find(0)->isOn()) currentScreen()->proposeRotation(RandRScreen::Rotate0); - else if (m_rotationGroup->tqfind(1)->isOn()) + else if (m_rotationGroup->find(1)->isOn()) currentScreen()->proposeRotation(RandRScreen::Rotate90); - else if (m_rotationGroup->tqfind(2)->isOn()) + else if (m_rotationGroup->find(2)->isOn()) currentScreen()->proposeRotation(RandRScreen::Rotate180); else { - Q_ASSERT(m_rotationGroup->tqfind(3)->isOn()); + Q_ASSERT(m_rotationGroup->find(3)->isOn()); currentScreen()->proposeRotation(RandRScreen::Rotate270); } - if (m_rotationGroup->tqfind(4)->isOn()) + if (m_rotationGroup->find(4)->isOn()) currentScreen()->proposeRotation(currentScreen()->proposedRotation() ^ RandRScreen::ReflectX); - if (m_rotationGroup->tqfind(5)->isOn()) + if (m_rotationGroup->find(5)->isOn()) currentScreen()->proposeRotation(currentScreen()->proposedRotation() ^ RandRScreen::ReflectY); setChanged(); @@ -354,8 +354,8 @@ void KRandRModule::update() Q_ASSERT(currentScreen()->proposedRotation() & RandRScreen::RotateMask); break; } - m_rotationGroup->tqfind(4)->setDown(currentScreen()->proposedRotation() & RandRScreen::ReflectX); - m_rotationGroup->tqfind(5)->setDown(currentScreen()->proposedRotation() & RandRScreen::ReflectY); + m_rotationGroup->find(4)->setDown(currentScreen()->proposedRotation() & RandRScreen::ReflectX); + m_rotationGroup->find(5)->setDown(currentScreen()->proposedRotation() & RandRScreen::ReflectY); m_rotationGroup->blockSignals(false); m_refreshRates->blockSignals(true); diff --git a/kcontrol/randr/krandrpassivepopup.cpp b/kcontrol/randr/krandrpassivepopup.cpp index 207dfac2e..8f340bdee 100644 --- a/kcontrol/randr/krandrpassivepopup.cpp +++ b/kcontrol/randr/krandrpassivepopup.cpp @@ -60,7 +60,7 @@ void KRandrPassivePopup::startWatchingWidget( TQWidget* widget_P ) break; win = parent; - TQWidget* widget = TQWidget::tqfind( win ); + TQWidget* widget = TQWidget::find( win ); if( widget != NULL ) { widget->installEventFilter( this ); @@ -94,14 +94,14 @@ void KRandrPassivePopup::startWatchingWidget( TQWidget* widget_P ) bool KRandrPassivePopup::eventFilter( TQObject* o, TQEvent* e ) { if( e->type() == TQEvent::Move && o->isWidgetType() - && watched_widgets.tqcontains( TQT_TQWIDGET( o ))) + && watched_widgets.contains( TQT_TQWIDGET( o ))) TQTimer::singleShot( 0, this, TQT_SLOT( slotPositionSelf())); return false; } bool KRandrPassivePopup::x11Event( XEvent* e ) { - if( e->type == ConfigureNotify && watched_windows.tqcontains( e->xconfigure.window )) + if( e->type == ConfigureNotify && watched_windows.contains( e->xconfigure.window )) { if( !update_timer.isActive()) update_timer.start( 10, true ); diff --git a/kcontrol/randr/krandrtray.cpp b/kcontrol/randr/krandrtray.cpp index 49e0c17af..ca2e6e95d 100644 --- a/kcontrol/randr/krandrtray.cpp +++ b/kcontrol/randr/krandrtray.cpp @@ -260,7 +260,7 @@ void KRandRSystemTray::contextMenuAboutToShow(KPopupMenu* menu) void KRandRSystemTray::slotScreenActivated() { - setCurrentScreen(m_screenPopups.tqfind(static_cast<const KPopupMenu*>(sender()))); + setCurrentScreen(m_screenPopups.find(static_cast<const KPopupMenu*>(sender()))); } void KRandRSystemTray::configChanged() diff --git a/kcontrol/samba/kcmsambaimports.cpp b/kcontrol/samba/kcmsambaimports.cpp index 0c9a5d3fd..fd31f7800 100644 --- a/kcontrol/samba/kcmsambaimports.cpp +++ b/kcontrol/samba/kcmsambaimports.cpp @@ -74,16 +74,16 @@ void ImportsView::updateList() if (e!=0) { s=buf; - if ((s.tqcontains(" nfs ")) || (s.tqcontains(" smbfs "))) + if ((s.contains(" nfs ")) || (s.contains(" smbfs "))) { - strSource=s.left(s.tqfind(" on /")); - strMount=s.mid(s.tqfind(" on /")+4,s.length()); - if ((s.tqcontains(" nfs ")) || (s.tqcontains("/remote on "))) + strSource=s.left(s.find(" on /")); + strMount=s.mid(s.find(" on /")+4,s.length()); + if ((s.contains(" nfs ")) || (s.contains("/remote on "))) strType="NFS"; - else if (s.tqcontains(" smbfs ")) + else if (s.contains(" smbfs ")) strType="SMB"; - int pos(strMount.tqfind(" type ")); - if (pos==-1) pos=strMount.tqfind(" read/"); + int pos(strMount.find(" type ")); + if (pos==-1) pos=strMount.find(" read/"); strMount=strMount.left(pos); new TQListViewItem(&list,strType,strSource,strMount); }; diff --git a/kcontrol/samba/kcmsambastatistics.cpp b/kcontrol/samba/kcmsambastatistics.cpp index 0070e4723..ee9a8ab20 100644 --- a/kcontrol/samba/kcmsambastatistics.cpp +++ b/kcontrol/samba/kcmsambastatistics.cpp @@ -150,8 +150,8 @@ void StatisticsView::calculate() { if (connCount) { - if ((TQString(item->text(1)).tqcontains(i18n("CONNECTION OPENED"))) - && (TQString(item->text(2)).tqcontains(rService)) && (TQString(item->text(3)).tqcontains(rHost))) + if ((TQString(item->text(1)).contains(i18n("CONNECTION OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) { if (expandedInfoCb->isChecked()) item2=item->text(2); else item2=serviceLe->text(); @@ -163,8 +163,8 @@ void StatisticsView::calculate() } else { - if ((TQString(item->text(1)).tqcontains(i18n("FILE OPENED"))) - && (TQString(item->text(2)).tqcontains(rService)) && (TQString(item->text(3)).tqcontains(rHost))) + if ((TQString(item->text(1)).contains(i18n("FILE OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) { if (expandedInfoCb->isChecked()) item2=item->text(2); else item2=serviceLe->text(); @@ -201,14 +201,14 @@ void StatisticsView::calculate() { if (connCount) { - if ((TQString(item->text(1)).tqcontains(i18n("CONNECTION OPENED"))) - && (TQString(item->text(2)).tqcontains(rService)) && (TQString(item->text(3)).tqcontains(rHost))) + if ((TQString(item->text(1)).contains(i18n("CONNECTION OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) count++; } else { - if ((TQString(item->text(1)).tqcontains(i18n("FILE OPENED"))) - && (TQString(item->text(2)).tqcontains(rService)) && (TQString(item->text(3)).tqcontains(rHost))) + if ((TQString(item->text(1)).contains(i18n("FILE OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) count++; }; item=item->nextSibling(); diff --git a/kcontrol/samba/ksmbstatus.cpp b/kcontrol/samba/ksmbstatus.cpp index b36d5325b..c94bc5129 100644 --- a/kcontrol/samba/ksmbstatus.cpp +++ b/kcontrol/samba/ksmbstatus.cpp @@ -31,8 +31,8 @@ #include "ksmbstatus.moc" -#define Before(ttf,in) in.left(in.tqfind(ttf)) -#define After(ttf,in) (in.tqcontains(ttf)?TQString(in.mid(in.tqfind(ttf)+TQString(ttf).length())):TQString("")) +#define Before(ttf,in) in.left(in.find(ttf)) +#define After(ttf,in) (in.contains(ttf)?TQString(in.mid(in.find(ttf)+TQString(ttf).length())):TQString("")) NetMon::NetMon( TQWidget * parent, KConfig *config, const char * name ) : TQWidget(parent, name) @@ -77,7 +77,7 @@ NetMon::NetMon( TQWidget * parent, KConfig *config, const char * name ) void NetMon::processNFSLine(char *bufline, int) { TQCString line(bufline); - if (line.tqcontains(":/")) + if (line.contains(":/")) new TQListViewItem(list,"NFS",After(":",line),Before(":/",line)); } @@ -87,14 +87,14 @@ void NetMon::processSambaLine(char *bufline, int) rownumber++; if (rownumber == 2) version->setText(bufline); // second line = samba version - if ((readingpart==header) && line.tqcontains("Service")) + if ((readingpart==header) && line.contains("Service")) { - iUser=line.tqfind("uid"); - iGroup=line.tqfind("gid"); - iPid=line.tqfind("pid"); - iMachine=line.tqfind("machine"); + iUser=line.find("uid"); + iGroup=line.find("gid"); + iPid=line.find("pid"); + iMachine=line.find("machine"); } - else if ((readingpart==header) && (line.tqcontains("---"))) + else if ((readingpart==header) && (line.contains("---"))) { readingpart=connexions; } @@ -111,7 +111,7 @@ void NetMon::processSambaLine(char *bufline, int) } else if (readingpart==connexions) readingpart=locked_files; - else if ((readingpart==locked_files) && (line.tqfind("No ")==0)) + else if ((readingpart==locked_files) && (line.find("No ")==0)) readingpart=finished; else if (readingpart==locked_files) { diff --git a/kcontrol/screensaver/saverconfig.cpp b/kcontrol/screensaver/saverconfig.cpp index a7185135e..bf8cdc54a 100644 --- a/kcontrol/screensaver/saverconfig.cpp +++ b/kcontrol/screensaver/saverconfig.cpp @@ -29,7 +29,7 @@ bool SaverConfig::read(const TQString &file) mSaver = config.readPathEntry("Exec"); } - int indx = file.tqfindRev('/'); + int indx = file.findRev('/'); if (indx >= 0) { mFile = file.mid(indx+1); } diff --git a/kcontrol/screensaver/scrnsave.cpp b/kcontrol/screensaver/scrnsave.cpp index d4470be06..87d4b3208 100644 --- a/kcontrol/screensaver/scrnsave.cpp +++ b/kcontrol/screensaver/scrnsave.cpp @@ -360,7 +360,7 @@ void KScreenSaver::load( bool useDefaults ) for (SaverConfig* saver = mSaverList.first(); saver != 0; saver = mSaverList.next()) { if (saver->file() == mSaver) { - selectedItem = mSaverListView->tqfindItem ( saver->name(), 0 ); + selectedItem = mSaverListView->findItem ( saver->name(), 0 ); if (selectedItem) { mSelected = i; break; @@ -503,7 +503,7 @@ void KScreenSaver::findSavers() item = new TQListViewItem ( mSaverListView, s->name(), "2" + s->name() ); else { - TQListViewItem *categoryItem = mSaverListView->tqfindItem( s->category(), 0 ); + TQListViewItem *categoryItem = mSaverListView->findItem( s->category(), 0 ); if ( !categoryItem ) { categoryItem = new TQListViewItem ( mSaverListView, s->category(), "1" + s->category() ); categoryItem->setPixmap ( 0, SmallIcon ( "kscreensaver" ) ); diff --git a/kcontrol/style/kcmstyle.cpp b/kcontrol/style/kcmstyle.cpp index 5caef15d3..ba6559c1b 100644 --- a/kcontrol/style/kcmstyle.cpp +++ b/kcontrol/style/kcmstyle.cpp @@ -666,7 +666,7 @@ void KCMStyle::save() bool KCMStyle::findStyle( const TQString& str, int& combobox_item ) { - StyleEntry* se = styleEntries.tqfind(str.lower()); + StyleEntry* se = styleEntries.find(str.lower()); TQString name = se ? se->name : str; @@ -761,7 +761,7 @@ void KCMStyle::loadStyle( KConfig& config ) { TQString id = (*it).lower(); // Find the entry. - if ( (entry = styleEntries.tqfind(id)) != 0 ) + if ( (entry = styleEntries.find(id)) != 0 ) { // Do not add hidden entries if (entry->hidden) @@ -802,9 +802,9 @@ void KCMStyle::loadStyle( KConfig& config ) item = i; if ( id == cfgStyle ) // ExactMatch break; - else if ( id.tqcontains( cfgStyle ) ) + else if ( id.contains( cfgStyle ) ) break; - else if ( id.tqcontains( TQApplication::tqstyle().className() ) ) + else if ( id.contains( TQApplication::tqstyle().className() ) ) break; item = 0; } @@ -850,7 +850,7 @@ void KCMStyle::switchStyle(const TQString& styleName, bool force) appliedStyle = style; // Set the correct style description - StyleEntry* entry = styleEntries.tqfind( styleName ); + StyleEntry* entry = styleEntries.find( styleName ); TQString desc; desc = i18n("Description: %1").arg( entry ? entry->desc : i18n("No description available.") ); lblStyleDesc->setText( desc ); diff --git a/kcontrol/usbview/kcmusb.cpp b/kcontrol/usbview/kcmusb.cpp index 8d85b2fb5..5939e5997 100644 --- a/kcontrol/usbview/kcmusb.cpp +++ b/kcontrol/usbview/kcmusb.cpp @@ -104,7 +104,7 @@ static void delete_recursive( TQListViewItem *item, const TQIntDict<TQListViewIt TQListViewItemIterator it( item ); while ( it.current() ) { - if (!new_items.tqfind(it.current()->text(1).toUInt())) { + if (!new_items.find(it.current()->text(1).toUInt())) { delete_recursive( it.current()->firstChild(), new_items); delete it.current(); } @@ -133,7 +133,7 @@ void USBViewer::refresh() TQ_UINT32 k = key(*it.current()); if (level == 0) { - TQListViewItem *item = _items.tqfind(k); + TQListViewItem *item = _items.find(k); if (!item) { item = new TQListViewItem(_devices, it.current()->product(), @@ -144,10 +144,10 @@ void USBViewer::refresh() } else { - TQListViewItem *parent = new_items.tqfind(key_parent(*it.current())); + TQListViewItem *parent = new_items.find(key_parent(*it.current())); if (parent) { - TQListViewItem *item = _items.tqfind(k); + TQListViewItem *item = _items.find(k); if (!item) { item = new TQListViewItem(parent, diff --git a/kcontrol/usbview/usbdevices.cpp b/kcontrol/usbview/usbdevices.cpp index 74fcf3609..440a87edc 100644 --- a/kcontrol/usbview/usbdevices.cpp +++ b/kcontrol/usbview/usbdevices.cpp @@ -103,7 +103,7 @@ void USBDevice::parseSysDir(int bus, int parent, int level, TQString dname) TQStringList list = dir.entryList(); for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it) { - if ((*it).tqcontains(':')) + if ((*it).contains(':')) continue; USBDevice* dev = new USBDevice(); @@ -277,8 +277,8 @@ bool USBDevice::parse(TQString fname) // read in the device infos USBDevice *device = 0; int start=0, end; - result.tqreplace(TQRegExp("^\n"),""); - while ((end = result.tqfind('\n', start)) > 0) + result.replace(TQRegExp("^\n"),""); + while ((end = result.find('\n', start)) > 0) { TQString line = result.mid(start, end-start); |