From 9a3f0aacd44fb866833ebcb852df3cd31475cb33 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/background/bgadvanced.cpp | 4 ++-- kcontrol/background/bgdialog.cpp | 22 +++++++++++----------- kcontrol/background/bgrender.cpp | 14 +++++++------- kcontrol/background/bgsettings.cpp | 22 +++++++++++----------- 4 files changed, 31 insertions(+), 31 deletions(-) (limited to 'kcontrol/background') 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(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)) -- cgit v1.2.1