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
v3.5.13-sru
tpearson 13 years ago
parent f22f5c856d
commit 294efafa89

@ -306,7 +306,7 @@ bool AptProtocol::check_validpackage(const TQString& query)
static TQString read_option(TQMap<TQString, TQString>& 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)
{

@ -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);

@ -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;

@ -56,7 +56,7 @@ namespace Parsers
// {}
TQString mangle_version(TQString version)
{ return "version_" + version.tqreplace(TQRegExp("[-:\\.\\+]"), TQString("_")); }
{ return "version_" + version.replace(TQRegExp("[-:\\.\\+]"), TQString("_")); }
}

@ -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)", "&lt;");
//ret = ret.tqreplace( TQRegExp("\n"), "<br />\n");
ret = ret.replace("<(?!a href)", "&lt;");
//ret = ret.replace( TQRegExp("\n"), "<br />\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("<a href=\"\\1\">\\1</a>")));
buffer += text2html(TQString(value).replace(TQRegExp("(http://\\S+)"),TQString("<a href=\"\\1\">\\1</a>")));
}
else if (tag == "package_link")
buffer += "<a href=\"" + slave->buildURL("show", value).htmlURL() + "\">" + value + "</a>";

@ -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 += "-";

Loading…
Cancel
Save