From 6335dc55802871b5a43492f217b6edbb420204c4 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/kdeutils@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksim/baselist.h | 2 +- ksim/ksimpref.cpp | 6 ++--- ksim/ksimsysinfo.cpp | 34 +++++++++++++-------------- ksim/ksimview.cpp | 2 +- ksim/library/pluginloader.cpp | 20 ++++++++-------- ksim/library/pluginloader.h | 10 ++++---- ksim/library/pluginmodule.cpp | 2 +- ksim/library/themeloader.cpp | 34 +++++++++++++-------------- ksim/monitorprefs.cpp | 4 ++-- ksim/monitors/cpu/ksimcpu.cpp | 14 +++++------ ksim/monitors/disk/ksimdisk.cpp | 8 +++---- ksim/monitors/filesystem/filesystemwidget.cpp | 2 +- ksim/monitors/filesystem/fsystemconfig.cpp | 8 +++---- ksim/monitors/lm_sensors/sensorbase.cpp | 10 ++++---- ksim/monitors/lm_sensors/sensorsconfig.cpp | 2 +- ksim/monitors/net/ksimnet.cpp | 10 ++++---- ksim/monitors/net/netdialog.cpp | 2 +- ksim/monitors/snmp/browsedialog.cpp | 2 +- ksim/monitors/snmp/configpage.cpp | 8 +++---- ksim/monitors/snmp/hostdialog.cpp | 8 +++---- ksim/monitors/snmp/labelmonitor.cpp | 4 ++-- ksim/monitors/snmp/monitorconfig.cpp | 2 +- ksim/monitors/snmp/monitordialog.cpp | 6 ++--- ksim/monitors/snmp/session.cpp | 2 +- 24 files changed, 101 insertions(+), 101 deletions(-) (limited to 'ksim') diff --git a/ksim/baselist.h b/ksim/baselist.h index e56915b..5c4391d 100644 --- a/ksim/baselist.h +++ b/ksim/baselist.h @@ -52,7 +52,7 @@ namespace KSim return false; // Find our object and remove it from the list - if (m_baseList->tqfindRef(object) >= 0) + if (m_baseList->findRef(object) >= 0) return m_baseList->remove(); return false; diff --git a/ksim/ksimpref.cpp b/ksim/ksimpref.cpp index 9115fea..b379540 100644 --- a/ksim/ksimpref.cpp +++ b/ksim/ksimpref.cpp @@ -119,7 +119,7 @@ void KSim::ConfigDialog::reload() void KSim::ConfigDialog::removePage(const TQCString &name) { - const KSim::Plugin &plugin = KSim::PluginLoader::self().tqfind(name); + const KSim::Plugin &plugin = KSim::PluginLoader::self().find(name); if (plugin.isNull() || !plugin.configPage()) { KMessageBox::sorry(0, i18n("Failed to remove %1's config page due to the " "plugin not being loaded or the config page has not been created").tqarg(name.data())); @@ -139,7 +139,7 @@ void KSim::ConfigDialog::removePage(const TQCString &name) void KSim::ConfigDialog::createPage(const TQCString &name) { - const KSim::Plugin &plugin = KSim::PluginLoader::self().tqfind(name); + const KSim::Plugin &plugin = KSim::PluginLoader::self().find(name); createPage(plugin); } @@ -193,7 +193,7 @@ void KSim::ConfigDialog::saveConfig(bool reload) info.libName(true), item->text(0), info.location(), findPlugin(item->text(0)).isEnabled())); - KSim::PluginLoader::self().tqfind(info).setEnabled(item->isOn()); + KSim::PluginLoader::self().find(info).setEnabled(item->isOn()); } m_currentPlugins = changedPlugins; diff --git a/ksim/ksimsysinfo.cpp b/ksim/ksimsysinfo.cpp index cda1d58..259ef51 100644 --- a/ksim/ksimsysinfo.cpp +++ b/ksim/ksimsysinfo.cpp @@ -110,7 +110,7 @@ void KSim::Sysinfo::clockUptimeUpdate() TQString seconds; // found days so we have to modify hours - if (uptime.tqfind(TQRegExp("%d" ), 0) >= 0) + if (uptime.find(TQRegExp("%d" ), 0) >= 0) uptimeHours -= (uptimeDays * 24); days.sprintf("%02li", uptimeDays); @@ -118,10 +118,10 @@ void KSim::Sysinfo::clockUptimeUpdate() minutes.sprintf("%02li", uptimeMins); seconds.sprintf("%02li", uptimeSecs); - uptime.tqreplace(TQRegExp("%d"), days); - uptime.tqreplace(TQRegExp("%h"), hours); - uptime.tqreplace(TQRegExp("%m"), minutes); - uptime.tqreplace(TQRegExp("%s"), seconds); + uptime.replace(TQRegExp("%d"), days); + uptime.replace(TQRegExp("%h"), hours); + uptime.replace(TQRegExp("%m"), minutes); + uptime.replace(TQRegExp("%s"), seconds); m_uptimeLabel->setText(uptime); } } @@ -140,15 +140,15 @@ void KSim::Sysinfo::sysUpdate() unsigned long cache = system.cacheRam(); unsigned long used = system.usedRam(); unsigned long allFree = free + buffer + cache; - bool all = memory.tqfind( "%F" ) != -1; - - memory.tqreplace(TQRegExp("%s"), TQString::number(System::bytesToMegs(shared))); - memory.tqreplace(TQRegExp("%b"), TQString::number(System::bytesToMegs(buffer))); - memory.tqreplace(TQRegExp("%c"), TQString::number(System::bytesToMegs(cache))); - memory.tqreplace(TQRegExp("%u"), TQString::number(System::bytesToMegs(used))); - memory.tqreplace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); - memory.tqreplace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); - memory.tqreplace(TQRegExp("%F"), TQString::number(System::bytesToMegs(allFree))); + bool all = memory.find( "%F" ) != -1; + + memory.replace(TQRegExp("%s"), TQString::number(System::bytesToMegs(shared))); + memory.replace(TQRegExp("%b"), TQString::number(System::bytesToMegs(buffer))); + memory.replace(TQRegExp("%c"), TQString::number(System::bytesToMegs(cache))); + memory.replace(TQRegExp("%u"), TQString::number(System::bytesToMegs(used))); + memory.replace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); + memory.replace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); + memory.replace(TQRegExp("%F"), TQString::number(System::bytesToMegs(allFree))); kdDebug(2003) << memory << endl; m_memLabel->setText("Memory"); TQToolTip::add(m_memLabel, memory ); @@ -164,9 +164,9 @@ void KSim::Sysinfo::sysUpdate() unsigned long total = system.totalSwap(); unsigned long free = system.freeSwap(); unsigned long swapUsed = system.usedSwap(); - swap.tqreplace(TQRegExp("%u"), TQString::number(System::bytesToMegs(swapUsed))); - swap.tqreplace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); - swap.tqreplace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); + swap.replace(TQRegExp("%u"), TQString::number(System::bytesToMegs(swapUsed))); + swap.replace(TQRegExp("%t"), TQString::number(System::bytesToMegs(total))); + swap.replace(TQRegExp("%f"), TQString::number(System::bytesToMegs(free))); m_swapLabel->setText("Swap"); TQToolTip::add(m_swapLabel, swap); m_swapLabel->setValue(System::bytesToMegs(total) - System::bytesToMegs(free)); diff --git a/ksim/ksimview.cpp b/ksim/ksimview.cpp index 5624f54..e84ad7c 100644 --- a/ksim/ksimview.cpp +++ b/ksim/ksimview.cpp @@ -119,7 +119,7 @@ KSim::MainView::MainView(KConfig *config, m_hostLabel->setText(i18n("Unknown")); else { TQCString host(hostName); - int dotLocation = host.tqfind("."); + int dotLocation = host.find("."); if (!m_config->displayFqdn() && dotLocation != -1) host.truncate(dotLocation); diff --git a/ksim/library/pluginloader.cpp b/ksim/library/pluginloader.cpp index 4fcf761..a428c4c 100644 --- a/ksim/library/pluginloader.cpp +++ b/ksim/library/pluginloader.cpp @@ -125,7 +125,7 @@ bool KSim::PluginLoader::unloadPlugin(const TQCString &name) return false; // see if our plugin is loaded - KSim::Plugin plugin = tqfind(name); + KSim::Plugin plugin = find(name); if (plugin.isNull()) return false; @@ -161,7 +161,7 @@ bool KSim::PluginLoader::isLoaded(const TQCString &library) const if (library.isEmpty()) return false; - return !tqfind(library).isNull(); + return !find(library).isNull(); } KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name, @@ -211,13 +211,13 @@ KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name, return info; } -KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName) +KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName) { if (libName.isEmpty()) return KSim::Plugin::null; TQCString library(libName); - if (libName.tqfind(Private::ksimString) == -1) + if (libName.find(Private::ksimString) == -1) library.prepend(Private::ksimString); KSim::PluginList::Iterator it; @@ -229,13 +229,13 @@ KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName) return KSim::Plugin::null; } -const KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName) const +const KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName) const { if (libName.isEmpty()) return KSim::Plugin::null; TQCString library(libName); - if (libName.tqfind(Private::ksimString) == -1) + if (libName.find(Private::ksimString) == -1) library.prepend(Private::ksimString); KSim::PluginList::ConstIterator it; @@ -247,14 +247,14 @@ const KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName) const return KSim::Plugin::null; } -KSim::Plugin &KSim::PluginLoader::tqfind(const KSim::PluginInfo &info) +KSim::Plugin &KSim::PluginLoader::find(const KSim::PluginInfo &info) { - return tqfind(info.libName()); + return find(info.libName()); } -const KSim::Plugin &KSim::PluginLoader::tqfind(const KSim::PluginInfo &info) const +const KSim::Plugin &KSim::PluginLoader::find(const KSim::PluginInfo &info) const { - return tqfind(info.libName()); + return find(info.libName()); } const KSim::PluginList &KSim::PluginLoader::pluginList() const diff --git a/ksim/library/pluginloader.h b/ksim/library/pluginloader.h index b1806fa..7110c72 100644 --- a/ksim/library/pluginloader.h +++ b/ksim/library/pluginloader.h @@ -123,19 +123,19 @@ namespace KSim * @return a KSim::Plugin object * @see KSim::Plugin */ - KSim::Plugin &tqfind(const TQCString &libName); + KSim::Plugin &find(const TQCString &libName); /** * convenience function, see the above function for details. */ - const KSim::Plugin &tqfind(const TQCString &libName) const; + const KSim::Plugin &find(const TQCString &libName) const; /** - * equivalent to tqfind(info.libName()); + * equivalent to find(info.libName()); */ - KSim::Plugin &tqfind(const KSim::PluginInfo &info); + KSim::Plugin &find(const KSim::PluginInfo &info); /** * convenience function, see the above function for details. */ - const KSim::Plugin &tqfind(const KSim::PluginInfo &info) const; + const KSim::Plugin &find(const KSim::PluginInfo &info) const; /** * provides plugin(), view(), config page and plugin information * @see KSim::Plugin KSim::PluginList diff --git a/ksim/library/pluginmodule.cpp b/ksim/library/pluginmodule.cpp index cfc57de..f3b941c 100644 --- a/ksim/library/pluginmodule.cpp +++ b/ksim/library/pluginmodule.cpp @@ -64,7 +64,7 @@ void KSim::PluginObject::setConfigFileName(const TQString &name) return; d->configName = name; - if (name.tqfind("ksim") == -1) + if (name.find("ksim") == -1) d->configName.prepend("ksim_"); } diff --git a/ksim/library/themeloader.cpp b/ksim/library/themeloader.cpp index b532ab9..58a6f61 100644 --- a/ksim/library/themeloader.cpp +++ b/ksim/library/themeloader.cpp @@ -63,7 +63,7 @@ class KSim::Theme::Private TQString text; TQStringList::ConstIterator it; for (it = file.begin(); it != file.end(); ++it) { - if ((*it).tqfind(entry) != -1) { + if ((*it).find(entry) != -1) { text = TQStringList::split("=", (*it))[1].stripWhiteSpace(); } } @@ -73,7 +73,7 @@ class KSim::Theme::Private TQStringList::ConstIterator it2; for (it2 = dFile.begin(); it2 != dFile.end(); ++it) { - if ((*it2).tqfind(entry) != -1) { + if ((*it2).find(entry) != -1) { text = TQStringList::split("=", (*it2))[1].stripWhiteSpace(); } } @@ -135,13 +135,13 @@ TQString KSim::Theme::name() const if (name.endsWith("/")) name.remove(name.length() - 1, 1); - return name.remove(0, name.tqfindRev("/") + 1); + return name.remove(0, name.findRev("/") + 1); } TQString KSim::Theme::author() const { TQString author(d->readOption("author", false)); - return author.tqreplace(TQRegExp("\""), TQString()); + return author.replace(TQRegExp("\""), TQString()); } int KSim::Theme::fontItem() const @@ -318,7 +318,7 @@ TQFont KSim::Theme::largeFont() const return TQApplication::font(); TQFont themeFont; - themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString())); + themeFont.setRawName(font.replace(TQRegExp("\""), TQString())); return themeFont; } @@ -330,7 +330,7 @@ TQFont KSim::Theme::normalFont() const return TQApplication::font(); TQFont themeFont; - themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString())); + themeFont.setRawName(font.replace(TQRegExp("\""), TQString())); return themeFont; } @@ -342,7 +342,7 @@ TQFont KSim::Theme::smallFont() const return TQApplication::font(); TQFont themeFont; - themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString())); + themeFont.setRawName(font.replace(TQRegExp("\""), TQString())); return themeFont; } @@ -644,7 +644,7 @@ bool KSim::Theme::textShadow(const TQString &itemType, return false; TQString shadow = readEntry(itemType, entry); - if (shadow.isEmpty() || shadow.tqfindRev("none") != -1) + if (shadow.isEmpty() || shadow.findRev("none") != -1) return false; return true; @@ -997,26 +997,26 @@ TQString KSim::ThemeLoader::parseConfig(const TQString &url, while (!origStream.atEnd()) { TQString line(origStream.readLine().simplifyWhiteSpace()); - if (line.tqfind(reg) == 0) // find the location of the * comments + if (line.find(reg) == 0) // find the location of the * comments // replace all * comments with # comments so KConfig doesn't complain - line.tqreplace(reg, "#"); + line.replace(reg, "#"); - if (line.tqfind("#") == -1) { // find the location of the string 'gkrellmms' - if (line.tqfindRev("=") == -1) { // if found we check for the string '=' - int numLoc = line.tqfindRev(numbers); + if (line.find("#") == -1) { // find the location of the string 'gkrellmms' + if (line.findRev("=") == -1) { // if found we check for the string '=' + int numLoc = line.findRev(numbers); if (numLoc != -1) // if '=' doesn't exist we add one so KConfig doesn't complain line.insert(numLoc, " = "); - numLoc = line.tqfindRev(number); + numLoc = line.findRev(number); if (numLoc != -1) // if '=' doesn't exist we add one so KConfig doesn't complain line.insert(numLoc, " = "); - numLoc = line.tqfindRev(minus); + numLoc = line.findRev(minus); if (numLoc != -1) // replace the '-' with an '=' so KConfig doesn't get confused - line.tqreplace(TQRegExp("-"), "="); + line.replace(TQRegExp("-"), "="); } } @@ -1038,7 +1038,7 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt) homePath = locateLocal( "data", "ksim" ) + TQString::tqfromLatin1( "/themes" ) + homePath.right( homePath.length() - - homePath.tqfindRev( TQRegExp( "\\/" ), + - homePath.findRev( TQRegExp( "\\/" ), homePath.length() ) ); if ( !TQFile::exists( homePath ) ) diff --git a/ksim/monitorprefs.cpp b/ksim/monitorprefs.cpp index 0cac472..b89e7eb 100644 --- a/ksim/monitorprefs.cpp +++ b/ksim/monitorprefs.cpp @@ -67,7 +67,7 @@ void KSim::MonitorPrefs::saveConfig(KSim::Config *config) TQStringList::ConstIterator it; for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) { KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo((*it)); - item = static_cast(tqfindItem(info.name(), 0)); + item = static_cast(findItem(info.name(), 0)); config->setEnabledMonitor(info.libName(), item->isOn()); config->setMonitorCommand(info.libName(), item->text(2)); config->setMonitorLocation(info.libName(), itemIndex(item)); @@ -82,7 +82,7 @@ void KSim::MonitorPrefs::readConfig(KSim::Config *config) for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) { KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo((*it)); location = config->monitorLocation(info.libName()); - origItem = static_cast(tqfindItem(info.name(), 0)); + origItem = static_cast(findItem(info.name(), 0)); origItem->setOn(config->enabledMonitor(info.libName())); origItem->setText(2, config->monitorCommand(info.libName())); if (TQListViewItem *item = itemAtIndex(location)) { diff --git a/ksim/monitors/cpu/ksimcpu.cpp b/ksim/monitors/cpu/ksimcpu.cpp index 37c09f7..9cb570a 100644 --- a/ksim/monitors/cpu/ksimcpu.cpp +++ b/ksim/monitors/cpu/ksimcpu.cpp @@ -181,15 +181,15 @@ void CpuView::updateView() // kdDebug(2003) << "idle = " << cpuData.idle << endl; if (!m_firstTime) { - if (text.tqfind("%T") != -1) + if (text.find("%T") != -1) cpuDiff = cpuData.sys + cpuData.user + cpuData.nice; - else if (text.tqfind("%t") != -1) + else if (text.find("%t") != -1) cpuDiff = cpuData.sys + cpuData.user; - else if (text.tqfind("%s") != -1) + else if (text.find("%s") != -1) cpuDiff = cpuData.sys; - else if (text.tqfind("%u") != -1) + else if (text.find("%u") != -1) cpuDiff = cpuData.user; - else if (text.tqfind("%n") != -1) + else if (text.find("%n") != -1) cpuDiff = cpuData.nice; cpuDiff *= 100; @@ -225,7 +225,7 @@ void CpuView::updateCpu(CpuData &cpu, int cpuNumber) while (!m_procStream->atEnd()) { parser = m_procStream->readLine(); // remove all the entries apart from the line containing 'cpuString' - if (!cpuFound && parser.tqfind(TQRegExp(cpuString)) != -1) { + if (!cpuFound && parser.find(TQRegExp(cpuString)) != -1) { output = parser; cpuFound = true; } @@ -438,7 +438,7 @@ void CpuConfig::readConfig() TQStringList::ConstIterator it; for (it = enabledCpus.begin(); it != enabledCpus.end(); ++it) { if (TQCheckListItem *item = - static_cast(m_listView->tqfindItem((*it), 0))) { + static_cast(m_listView->findItem((*it), 0))) { item->setOn(true); item->setText(1, config()->readEntry(CPU_NAME(cpuNum), "%T")); } diff --git a/ksim/monitors/disk/ksimdisk.cpp b/ksim/monitors/disk/ksimdisk.cpp index cdcae83..2365e19 100644 --- a/ksim/monitors/disk/ksimdisk.cpp +++ b/ksim/monitors/disk/ksimdisk.cpp @@ -248,7 +248,7 @@ void DiskView::updateData(DiskList &disks) // (3,0):(108911,48080,1713380,60831,1102644) TQRegExp regexp("\\([0-9]+,[0-9]+\\):\\([0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+\\)"); TQString content = m_procStream->read(); - if (content.tqfind("disk_io") == -1) + if (content.find("disk_io") == -1) { m_bLinux24 = false; @@ -267,8 +267,8 @@ void DiskView::updateData(DiskList &disks) { idx += regexp.matchedLength(); TQString diskStr = regexp.cap(0); - diskStr.tqreplace(':', ','); - diskStr.tqreplace(TQRegExp("\\)?\\(?"), TQString()); + diskStr.replace(':', ','); + diskStr.replace(TQRegExp("\\)?\\(?"), TQString()); TQStringList list = TQStringList::split(',', diskStr); if (list.count() < 7) @@ -527,7 +527,7 @@ void DiskConfig::readConfig() TQStringList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { TQString text = ((*it) == "complete" ? i18n("All Disks") : (*it)); - if (!m_listview->tqfindItem(text, 0)) + if (!m_listview->findItem(text, 0)) new TQListViewItem(m_listview, text); } } diff --git a/ksim/monitors/filesystem/filesystemwidget.cpp b/ksim/monitors/filesystem/filesystemwidget.cpp index fb3b3ed..4149aee 100644 --- a/ksim/monitors/filesystem/filesystemwidget.cpp +++ b/ksim/monitors/filesystem/filesystemwidget.cpp @@ -189,7 +189,7 @@ void FilesystemWidget::processExited(KProcess *) TQStringList::Iterator it; for (it = errorList.begin(); it != errorList.end(); ++it) { message += TQString::tqfromLatin1("
  • %1
  • ") - .tqarg((*it).tqreplace(TQRegExp("[u]?mount: "), TQString())); + .tqarg((*it).replace(TQRegExp("[u]?mount: "), TQString())); } message += TQString::tqfromLatin1(""); diff --git a/ksim/monitors/filesystem/fsystemconfig.cpp b/ksim/monitors/filesystem/fsystemconfig.cpp index a91eae0..937d2cc 100644 --- a/ksim/monitors/filesystem/fsystemconfig.cpp +++ b/ksim/monitors/filesystem/fsystemconfig.cpp @@ -107,7 +107,7 @@ void FsystemConfig::readConfig() TQStringList list = config()->readListEntry("mountEntries"); for (TQListViewItemIterator it(m_availableMounts); it.current(); ++it) { TQString string = it.current()->text(0) + ":" + splitString(it.current()->text(0)); - static_cast(it.current())->setOn(list.tqcontains(string) > 0); + static_cast(it.current())->setOn(list.contains(string) > 0); } } @@ -155,7 +155,7 @@ void FsystemConfig::getStats() if ( !FilesystemStats::readStats( ( *it ).dir, total, free ) ) continue; - if ( !m_availableMounts->tqfindItem( ( *it ).dir, 0 ) ) + if ( !m_availableMounts->findItem( ( *it ).dir, 0 ) ) { (void) new FSysViewItem( m_availableMounts, ( *it ).dir, ( *it ).fsname, ( *it ).type ); @@ -169,7 +169,7 @@ void FsystemConfig::getStats() TQStringList list = config()->readListEntry("mountEntries"); for (TQListViewItemIterator it(m_availableMounts); it.current(); ++it) { TQString string = it.current()->text(0) + ":" + splitString(it.current()->text(0)); - static_cast(it.current())->setOn(list.tqcontains(string) > 0); + static_cast(it.current())->setOn(list.contains(string) > 0); } } @@ -178,7 +178,7 @@ TQString FsystemConfig::splitString(const TQString &string) const if (string == "/" || !m_splitNames->isChecked()) return string; - int location = string.tqfindRev("/"); + int location = string.findRev("/"); TQString newString(string); return newString.remove(0, location + 1); } diff --git a/ksim/monitors/lm_sensors/sensorbase.cpp b/ksim/monitors/lm_sensors/sensorbase.cpp index de94a1b..cabbf5a 100644 --- a/ksim/monitors/lm_sensors/sensorbase.cpp +++ b/ksim/monitors/lm_sensors/sensorbase.cpp @@ -212,16 +212,16 @@ bool SensorBase::init() TQString SensorBase::sensorType(const TQString &name) { - if (name.tqfindRev("fan", -1, false) != -1) + if (name.findRev("fan", -1, false) != -1) return i18n("Rounds per minute", " RPM"); - if (name.tqfindRev("temp", -1, false) != -1) + if (name.findRev("temp", -1, false) != -1) if (SensorBase::fahrenheit()) return TQString::tqfromLatin1("°F"); else return TQString::tqfromLatin1("°C"); - if (name.tqfindRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1) + if (name.findRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1) return i18n("Volt", "V"); return TQString(); @@ -239,7 +239,7 @@ TQString SensorBase::chipsetString(const ChipName *c) float SensorBase::formatValue(const TQString &label, float value) { - if (label.tqfindRev("temp", -1, false) != -1) + if (label.findRev("temp", -1, false) != -1) return toFahrenheit(value); return value; @@ -247,7 +247,7 @@ float SensorBase::formatValue(const TQString &label, float value) TQString SensorBase::formatString(const TQString &label, float value) { - if (label.tqfindRev("fan", -1, false) != -1) + if (label.findRev("fan", -1, false) != -1) return TQString::number(value); return TQString::number(value,'f',2); diff --git a/ksim/monitors/lm_sensors/sensorsconfig.cpp b/ksim/monitors/lm_sensors/sensorsconfig.cpp index e5f3b6a..8b1ff46 100644 --- a/ksim/monitors/lm_sensors/sensorsconfig.cpp +++ b/ksim/monitors/lm_sensors/sensorsconfig.cpp @@ -233,7 +233,7 @@ void SensorsConfig::showEvent(TQShowEvent *) const SensorList &list = SensorBase::self()->sensorsList(); SensorList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { - TQListViewItem *item = m_sensorView->tqfindItem((*it).sensorName(), 1); + TQListViewItem *item = m_sensorView->findItem((*it).sensorName(), 1); if (item) item->setText(3, (*it).sensorValue() + (*it).sensorUnit()); } diff --git a/ksim/monitors/net/ksimnet.cpp b/ksim/monitors/net/ksimnet.cpp index 0c16f2d..daaeb90 100644 --- a/ksim/monitors/net/ksimnet.cpp +++ b/ksim/monitors/net/ksimnet.cpp @@ -371,8 +371,8 @@ void NetView::updateGraph() } // Keep backwards compat for now - if ( timeDisplay.tqcontains( '%' ) > 0 ) - timeDisplay.tqreplace( '%', "" ); + if ( timeDisplay.contains( '%' ) > 0 ) + timeDisplay.replace( '%', "" ); ( *it ).label()->setText( netTime.toString( timeDisplay ) ); } @@ -468,7 +468,7 @@ void NetView::netStatistics(const TQString &device, NetData &data) while (!m_procStream->atEnd()) { parser = m_procStream->readLine(); // remove all the entries apart from the line containing 'device' - if (parser.tqfind(device) != -1) + if (parser.find(device) != -1) output = parser; } @@ -480,7 +480,7 @@ void NetView::netStatistics(const TQString &device, NetData &data) // make sure our output doesn't contain "eth0:11210107" so we dont // end up with netList[1] actually being netList[2] - output.tqreplace(TQRegExp(":"), " "); + output.replace(TQRegExp(":"), " "); TQStringList netList = TQStringList::split(' ', output); data.in = netList[1].toULong(); @@ -559,7 +559,7 @@ bool NetView::isOnline(const TQString &device) if (!file.open(IO_ReadOnly)) return -1; - return (TQTextStream(&file).read().tqfind(device) != -1 ? true : false); + return (TQTextStream(&file).read().find(device) != -1 ? true : false); #endif #ifdef __FreeBSD__ diff --git a/ksim/monitors/net/netdialog.cpp b/ksim/monitors/net/netdialog.cpp index 3513bf4..d79f06f 100644 --- a/ksim/monitors/net/netdialog.cpp +++ b/ksim/monitors/net/netdialog.cpp @@ -256,7 +256,7 @@ TQStringList NetDialog::createList() const for (it = output.begin(); it != output.end(); ++it) { list = TQStringList::split(' ', (*it)); (*it) = list[0].stripWhiteSpace(); - (*it).truncate((*it).tqfind(':')); + (*it).truncate((*it).find(':')); } return output; diff --git a/ksim/monitors/snmp/browsedialog.cpp b/ksim/monitors/snmp/browsedialog.cpp index 3b571ef..75f2dac 100644 --- a/ksim/monitors/snmp/browsedialog.cpp +++ b/ksim/monitors/snmp/browsedialog.cpp @@ -134,7 +134,7 @@ void BrowseDialog::applyFilter( TQListViewItem *item ) return; } - if ( item->text( 0 ).tqfind( filterText, 0 /*index*/, false /*case sensitive*/ ) == -1 ) { + if ( item->text( 0 ).find( filterText, 0 /*index*/, false /*case sensitive*/ ) == -1 ) { item->setVisible( false ); return; } diff --git a/ksim/monitors/snmp/configpage.cpp b/ksim/monitors/snmp/configpage.cpp index ede7a52..f5c1d24 100644 --- a/ksim/monitors/snmp/configpage.cpp +++ b/ksim/monitors/snmp/configpage.cpp @@ -123,7 +123,7 @@ void ConfigPage::modifyHost() if ( !currentItem ) return; - HostConfigMap::Iterator hostIt = m_hosts.tqfind( currentItem->text( 0 ) ); + HostConfigMap::Iterator hostIt = m_hosts.find( currentItem->text( 0 ) ); if ( hostIt == m_hosts.end() ) return; @@ -147,7 +147,7 @@ void ConfigPage::removeHost() if ( !currentItem ) return; - HostConfigMap::Iterator hostIt = m_hosts.tqfind( currentItem->text( 0 ) ); + HostConfigMap::Iterator hostIt = m_hosts.find( currentItem->text( 0 ) ); if ( hostIt == m_hosts.end() ) return; @@ -191,7 +191,7 @@ void ConfigPage::modifyMonitor() if ( !currentItem ) return; - MonitorConfigMap::Iterator monitorIt = m_monitors.tqfind( currentItem->text( 0 ) ); + MonitorConfigMap::Iterator monitorIt = m_monitors.find( currentItem->text( 0 ) ); if ( monitorIt == m_monitors.end() ) return; @@ -215,7 +215,7 @@ void ConfigPage::removeMonitor() if ( !currentItem ) return; - MonitorConfigMap::Iterator monitorIt = m_monitors.tqfind( currentItem->text( 0 ) ); + MonitorConfigMap::Iterator monitorIt = m_monitors.find( currentItem->text( 0 ) ); if ( monitorIt == m_monitors.end() ) return; diff --git a/ksim/monitors/snmp/hostdialog.cpp b/ksim/monitors/snmp/hostdialog.cpp index e8eceab..2ea7314 100644 --- a/ksim/monitors/snmp/hostdialog.cpp +++ b/ksim/monitors/snmp/hostdialog.cpp @@ -163,7 +163,7 @@ void HostDialog::loadSettingsFromHostConfig( const HostConfig &src ) hostName->setText( src.name ); port->setValue( src.port ); - snmpVersion->setCurrentItem( allSnmpVersions().tqfindIndex( snmpVersionToString( src.version ) ) ); + snmpVersion->setCurrentItem( allSnmpVersions().findIndex( snmpVersionToString( src.version ) ) ); if ( src.version != SnmpVersion3 ) { communityString->setText( src.community ); @@ -172,18 +172,18 @@ void HostDialog::loadSettingsFromHostConfig( const HostConfig &src ) securityName->setText( src.securityName ); - securityLevel->setCurrentItem( allSecurityLevels().tqfindIndex( securityLevelToString( src.securityLevel ) ) ); + securityLevel->setCurrentItem( allSecurityLevels().findIndex( securityLevelToString( src.securityLevel ) ) ); if ( src.securityLevel == NoAuthPriv ) return; - authenticationType->setCurrentItem( allAuthenticationProtocols().tqfindIndex( authenticationProtocolToString( src.authentication.protocol ) ) ); + authenticationType->setCurrentItem( allAuthenticationProtocols().findIndex( authenticationProtocolToString( src.authentication.protocol ) ) ); authenticationPassphrase->setText( src.authentication.key ); if ( src.securityLevel == AuthNoPriv ) return; - privacyType->setCurrentItem( allPrivacyProtocols().tqfindIndex( privacyProtocolToString( src.privacy.protocol ) ) ); + privacyType->setCurrentItem( allPrivacyProtocols().findIndex( privacyProtocolToString( src.privacy.protocol ) ) ); privacyPassphrase->setText( src.privacy.key ); } diff --git a/ksim/monitors/snmp/labelmonitor.cpp b/ksim/monitors/snmp/labelmonitor.cpp index e8ae261..5e7ea34 100644 --- a/ksim/monitors/snmp/labelmonitor.cpp +++ b/ksim/monitors/snmp/labelmonitor.cpp @@ -32,8 +32,8 @@ void LabelMonitor::setData( const Value &data ) if ( m_config.useCustomFormatString ) { TQString text = m_config.customFormatString; - text.tqreplace( "%n", m_config.name ); - text.tqreplace( "%s", dataString ); + text.replace( "%n", m_config.name ); + text.replace( "%s", dataString ); setText( text ); } else setText( m_config.name + ": " + dataString ); diff --git a/ksim/monitors/snmp/monitorconfig.cpp b/ksim/monitors/snmp/monitorconfig.cpp index 6a77813..b8cd756 100644 --- a/ksim/monitors/snmp/monitorconfig.cpp +++ b/ksim/monitors/snmp/monitorconfig.cpp @@ -39,7 +39,7 @@ bool MonitorConfig::load( KConfigBase &config, const HostConfigMap &hosts ) if ( hostName.isEmpty() ) return false; - HostConfigMap::ConstIterator hostIt = hosts.tqfind( hostName ); + HostConfigMap::ConstIterator hostIt = hosts.find( hostName ); if ( hostIt == hosts.end() ) return false; diff --git a/ksim/monitors/snmp/monitordialog.cpp b/ksim/monitors/snmp/monitordialog.cpp index 297a818..574f244 100644 --- a/ksim/monitors/snmp/monitordialog.cpp +++ b/ksim/monitors/snmp/monitordialog.cpp @@ -144,14 +144,14 @@ void MonitorDialog::init( const MonitorConfig &monitor ) assert( allHosts.findIndex( monitor.host.name ) != -1 ); - host->setCurrentItem( allHosts.tqfindIndex( monitor.host.name ) ); + host->setCurrentItem( allHosts.findIndex( monitor.host.name ) ); oid->setText( monitor.oid ); updateIntervalMinutes->setValue( monitor.refreshInterval.minutes ); updateIntervalSeconds->setValue( monitor.refreshInterval.seconds ); - displayType->setCurrentItem( allDisplayTypes().tqfindIndex( monitorDisplayTypeToString( monitor.display ) ) ); + displayType->setCurrentItem( allDisplayTypes().findIndex( monitorDisplayTypeToString( monitor.display ) ) ); customFormatStringCheckBox->setChecked( monitor.useCustomFormatString ); customFormatString->setEnabled( monitor.useCustomFormatString ); @@ -166,7 +166,7 @@ void MonitorDialog::init( const MonitorConfig &monitor ) HostConfig MonitorDialog::currentHost() const { - HostConfigMap::ConstIterator hostIt = m_hosts.tqfind( host->currentText() ); + HostConfigMap::ConstIterator hostIt = m_hosts.find( host->currentText() ); if ( hostIt == m_hosts.end() ) return HostConfig(); diff --git a/ksim/monitors/snmp/session.cpp b/ksim/monitors/snmp/session.cpp index 07dc77e..2f16adc 100644 --- a/ksim/monitors/snmp/session.cpp +++ b/ksim/monitors/snmp/session.cpp @@ -235,7 +235,7 @@ bool Session::snmpGet( const Identifier &identifier, Value &value, ErrorInfo *er if ( !snmpGet( ids, vars, error ) ) return false; - ValueMap::ConstIterator it = vars.tqfind( identifier ); + ValueMap::ConstIterator it = vars.find( identifier ); if ( it == vars.end() ) { if ( error ) *error = ErrorInfo( ErrorInfo::ErrMissingVariables ); -- cgit v1.2.1