From 294efafa8952ef8c96127f59c5f6afe4682322ad Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: [PATCH] rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kio-apt@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/apt.cpp | 10 +++++----- src/aptcache.cpp | 4 ++-- src/dpkg.cpp | 2 +- src/parsers/parsers.cpp | 2 +- src/parsers/show.cpp | 6 +++--- src/regexps.cpp | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/apt.cpp b/src/apt.cpp index 04d126a..1ff1cc6 100644 --- a/src/apt.cpp +++ b/src/apt.cpp @@ -306,7 +306,7 @@ bool AptProtocol::check_validpackage(const TQString& query) static TQString read_option(TQMap& map, const TQString& name, const TQString& def) { - if (!map.tqcontains(name)) return def; + if (!map.contains(name)) return def; TQString ret = map[name]; map.remove(name); return ret; @@ -360,7 +360,7 @@ void AptProtocol::get ( const KURL& url ) command = cmd_it; method = methods[cmd_idx]; } - if (options.tqcontains(cmd_it)) + if (options.contains(cmd_it)) { if (options[cmd_it].isEmpty() && !options[cmd_it].isNull()) @@ -533,7 +533,7 @@ void AptProtocol::show(const TQString& package, const QueryOptions& options) { if (!check_validpackage(package)) return; - if (options.tqcontains("show_filelist")) + if (options.contains("show_filelist")) { KGlobal::config() -> writeEntry("show_filelist", options["show_filelist"] != "0"); KGlobal::config() -> sync(); @@ -805,7 +805,7 @@ void AptProtocol::adept_batch(const TQString& query, const QueryOptions& options return; } - if (!options.tqcontains("package")) + if (!options.contains("package")) { error(ERR_SLAVE_DEFINED, i18n("No package specified")); return; @@ -865,7 +865,7 @@ void AptProtocol::adept_batch(const TQString& query, const QueryOptions& options } } - if (options.tqcontains("weblinkinstall")) + if (options.contains("weblinkinstall")) { if (puninst.count() == 0) { diff --git a/src/aptcache.cpp b/src/aptcache.cpp index ec5342f..c921920 100644 --- a/src/aptcache.cpp +++ b/src/aptcache.cpp @@ -168,7 +168,7 @@ void AptCache::receiveShow(const TQStringList& lines) parse_pkgfield(data); else { - int new_indent = data.tqfind( TQRegExp("[^\\s]") ); + int new_indent = data.find( TQRegExp("[^\\s]") ); // new_indent > 0 means that we are in a multi-line // field. Those lines always begin with " ", so we want @@ -213,7 +213,7 @@ void AptCache::parse_pkgfield(const TQString& data) if (j != bar.begin()) emit token("data", " | "); TQString pkg, remaining; - int paren = (*j).tqfind('('); + int paren = (*j).find('('); if (paren != -1) { pkg = (*j).left(paren - 1); diff --git a/src/dpkg.cpp b/src/dpkg.cpp index cb19488..9ccf0f1 100644 --- a/src/dpkg.cpp +++ b/src/dpkg.cpp @@ -90,7 +90,7 @@ void Dpkg::receiveSearch( const TQStringList & line ) continue; } - int semicolon = (*i).tqfind(':'); + int semicolon = (*i).find(':'); if (semicolon == -1) { kdDebug(DEBUG_ZONE) << "receiveSearch unmatched line : " << *i << endl; diff --git a/src/parsers/parsers.cpp b/src/parsers/parsers.cpp index 2789355..808150b 100644 --- a/src/parsers/parsers.cpp +++ b/src/parsers/parsers.cpp @@ -56,7 +56,7 @@ namespace Parsers // {} TQString mangle_version(TQString version) - { return "version_" + version.tqreplace(TQRegExp("[-:\\.\\+]"), TQString("_")); } + { return "version_" + version.replace(TQRegExp("[-:\\.\\+]"), TQString("_")); } } diff --git a/src/parsers/show.cpp b/src/parsers/show.cpp index 2d7b0c4..84ace04 100644 --- a/src/parsers/show.cpp +++ b/src/parsers/show.cpp @@ -22,8 +22,8 @@ static const TQString // Converts the special chars in orig into its HTML equivalents static TQString text2html(const TQString& orig) { TQString ret(orig); - ret = ret.tqreplace("<(?!a href)", "<"); - //ret = ret.tqreplace( TQRegExp("\n"), "
\n"); + ret = ret.replace("<(?!a href)", "<"); + //ret = ret.replace( TQRegExp("\n"), "
\n"); return ret; } @@ -185,7 +185,7 @@ void Show::operator() (AptProtocol* slave, const TQString& tag, const TQString& new_paragraph = false; } } - buffer += text2html(TQString(value).tqreplace(TQRegExp("(http://\\S+)"),TQString("\\1"))); + buffer += text2html(TQString(value).replace(TQRegExp("(http://\\S+)"),TQString("\\1"))); } else if (tag == "package_link") buffer += "buildURL("show", value).htmlURL() + "\">" + value + ""; diff --git a/src/regexps.cpp b/src/regexps.cpp index 9251193..32031c0 100644 --- a/src/regexps.cpp +++ b/src/regexps.cpp @@ -28,7 +28,7 @@ bool match_dversion(TQString version) } kdDebug(DEBUG_ZONE) << version << endl; - int rev_pos = version.tqfindRev('-'); + int rev_pos = version.findRev('-'); if (rev_pos > -1) { allowed_vchars += "-";