summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:11 -0600
commit93a6198212819d0cc95ce1bb0d80508523ab32c6 (patch)
treeae892ef46252c6f746f7ed5aeafeb61c50223756 /src
parent9a210ba3a60a3348ede4a57602fd13e240da66aa (diff)
downloadtdeio-apt-93a6198212819d0cc95ce1bb0d80508523ab32c6.tar.gz
tdeio-apt-93a6198212819d0cc95ce1bb0d80508523ab32c6.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 9a210ba3a60a3348ede4a57602fd13e240da66aa.
Diffstat (limited to 'src')
-rw-r--r--src/apt.cpp70
-rw-r--r--src/aptcache.cpp8
-rw-r--r--src/dpkg.cpp14
-rw-r--r--src/parsers/filesearch.cpp2
-rw-r--r--src/parsers/list.cpp2
-rw-r--r--src/parsers/qhtmlstream.h2
-rw-r--r--src/parsers/show.cpp14
7 files changed, 56 insertions, 56 deletions
diff --git a/src/apt.cpp b/src/apt.cpp
index 13160d3..96c2031 100644
--- a/src/apt.cpp
+++ b/src/apt.cpp
@@ -80,14 +80,14 @@ static TQString open_html_head(const TQString& title, bool links, AptProtocol co
if (links) rowspan = "rowspan=\"2\"";
TQString ret =
html_head
- .arg(config.stylesheet())
- .arg(title)
+ .tqarg(config.stylesheet())
+ .tqarg(title)
+ html_head_table
- .arg(config.header_background())
- .arg(rowspan)
- .arg(config.logo())
- .arg(config.logo_alt())
- .arg(title);
+ .tqarg(config.header_background())
+ .tqarg(rowspan)
+ .tqarg(config.logo())
+ .tqarg(config.logo_alt())
+ .tqarg(title);
if (links)
{
@@ -106,7 +106,7 @@ static TQString open_html_head(const TQString& title, bool links, AptProtocol co
static TQString add_html_head_link(const TQString& url, const TQString& name, const TQString& long_desc)
{
static const TQString format("\t\t<td><a href=\"%1\" title=\"%2\">%3</a></td>\n");
- return format.arg(url).arg(long_desc).arg(name);
+ return format.tqarg(url).tqarg(long_desc).tqarg(name);
}
static TQString close_html_head()
{
@@ -132,8 +132,8 @@ TQString AptProtocol::make_html_tail(const TQString& note, bool with_form)
ret = "<hr>\n" + make_html_form();
if (!note.isEmpty())
- ret += html_tail.arg(note + ". " + i18n("Page generated by kio_apt."));
- else ret += html_tail.arg(i18n("Page generated by kio_apt."));
+ ret += html_tail.tqarg(note + ". " + i18n("Page generated by kio_apt."));
+ else ret += html_tail.tqarg(i18n("Page generated by kio_apt."));
return ret;
}
@@ -159,7 +159,7 @@ static const TQString
"</tr>\n");
static TQString make_html_form_line(const TQString& type, const TQString& label)
-{ return html_form_line.arg(type).arg(label).arg(type).arg(type); }
+{ return html_form_line.tqarg(type).tqarg(label).tqarg(type).tqarg(type); }
static TQString make_extform_cmd(bool ext_form, const KURL& query)
@@ -206,7 +206,7 @@ TQString AptProtocol::make_html_form() const
stream << make_html_form_line("fsearch", i18n("File search"));
stream << make_html_form_line("show", i18n("Package info"));
}
- stream << html_form_end.arg( i18n("Search") );
+ stream << html_form_end.tqarg( i18n("Search") );
if (online)
{
@@ -293,7 +293,7 @@ bool AptProtocol::check_validpackage(const TQString& query)
static TQRegExp rx_pkgname(rxs_pkgname);
if (!rx_pkgname.exactMatch(query))
{
- error( ERR_SLAVE_DEFINED, i18n("\"%1\" is not a valid package name").arg(query) );
+ error( ERR_SLAVE_DEFINED, i18n("\"%1\" is not a valid package name").tqarg(query) );
return false;
}
return true;
@@ -487,18 +487,18 @@ void AptProtocol::search( const TQString& query, const QueryOptions& /*options*/
{
mimeType("text/html");
- data(open_html_head(i18n("Package search result for \"%1\"").arg(query), false, *this));
+ data(open_html_head(i18n("Package search result for \"%1\"").tqarg(query), false, *this));
m_parser.reset(new Parsers::Search);
(*m_parser)(this, "begin", query);
if (!m_process.search( query ))
{
- error(ERR_SLAVE_DEFINED, i18n("Error launching the search").arg(query));
+ error(ERR_SLAVE_DEFINED, i18n("Error launching the search").tqarg(query));
return;
}
(*m_parser)(this, "end", TQString());
- data(make_html_tail( i18n("%1 results").arg(m_parser -> result_count())) );
+ data(make_html_tail( i18n("%1 results").tqarg(m_parser -> result_count())) );
data(TQByteArray());
finished();
}
@@ -554,7 +554,7 @@ void AptProtocol::show(const TQString& package, const QueryOptions& options)
{
if (!m_process.policy( package ))
{
- error(ERR_SLAVE_DEFINED, i18n("Can't launch \"apt-cache policy %1\"").arg(package));
+ error(ERR_SLAVE_DEFINED, i18n("Can't launch \"apt-cache policy %1\"").tqarg(package));
return;
}
@@ -565,13 +565,13 @@ void AptProtocol::show(const TQString& package, const QueryOptions& options)
if (can_list)
{
KURL url = buildURL("list", package);
- s << open_html_head(i18n("Package description for \"%1\"").arg(package), true, *this)
+ s << open_html_head(i18n("Package description for \"%1\"").tqarg(package), true, *this)
<< add_html_head_link(url.htmlURL(), i18n("List package files"), "")
<< close_html_head();
}
else
{
- s << open_html_head(i18n("Package description for \"%1\"").arg(package), false, *this);
+ s << open_html_head(i18n("Package description for \"%1\"").tqarg(package), false, *this);
}
data(buffer);
}
@@ -584,12 +584,12 @@ void AptProtocol::show(const TQString& package, const QueryOptions& options)
{
if (!m_process.show(package))
{
- error(ERR_SLAVE_DEFINED, i18n("Can't launch \"apt-cache show %1\"").arg(package));
+ error(ERR_SLAVE_DEFINED, i18n("Can't launch \"apt-cache show %1\"").tqarg(package));
return;
}
if (!m_parser -> result_count())
{
- data("<div class=\"error\">" + i18n("No package found named \"%1\"").arg(package) + "</div>\n");
+ data("<div class=\"error\">" + i18n("No package found named \"%1\"").tqarg(package) + "</div>\n");
data(make_html_tail());
data(TQByteArray());
finished();
@@ -615,7 +615,7 @@ void AptProtocol::show(const TQString& package, const QueryOptions& options)
(*m_parser)(this, "begin", TQString());
if (!m_adept_batch -> list(package))
{
- error(ERR_SLAVE_DEFINED, i18n("Error listing files of %1").arg(package));
+ error(ERR_SLAVE_DEFINED, i18n("Error listing files of %1").tqarg(package));
return;
}
(*m_parser)(this, "end", TQString());
@@ -654,13 +654,13 @@ void AptProtocol::policy( const TQString& query, const QueryOptions& /*options*/
mimeType("text/html");
- data( open_html_head(i18n("Apt policy for \"%1\"").arg(query), false, *this) );
+ data( open_html_head(i18n("Apt policy for \"%1\"").tqarg(query), false, *this) );
m_parser.reset(new Parsers::Policy(query, m_act));
(*m_parser)(this, "begin", TQString());
if (!m_process.policy( query ))
{
- error(ERR_SLAVE_DEFINED, i18n("Can't launch the policy for %1").arg(query));
+ error(ERR_SLAVE_DEFINED, i18n("Can't launch the policy for %1").tqarg(query));
return;
}
(*m_parser)(this, "end", TQString());
@@ -693,18 +693,18 @@ void AptProtocol::searchfile(const TQString& query, const QueryOptions& /*option
if (!can_searchfile(true)) return;
mimeType("text/html");
- data( open_html_head(i18n("File search for \"%1\"").arg(query), false, *this) + html_dpkgs_begin );
+ data( open_html_head(i18n("File search for \"%1\"").tqarg(query), false, *this) + html_dpkgs_begin );
m_parser.reset(new Parsers::FileSearch);
(*m_parser)(this, "begin", TQString());
if (!m_adept_batch -> search( query ))
{
- error(ERR_SLAVE_DEFINED, i18n("Can't launch the package manager").arg(query));
+ error(ERR_SLAVE_DEFINED, i18n("Can't launch the package manager").tqarg(query));
return;
}
(*m_parser)(this, "end", TQString());
- data( html_dpkgs_end + make_html_tail(i18n("%1 files found").arg(m_parser -> result_count())) );
+ data( html_dpkgs_end + make_html_tail(i18n("%1 files found").tqarg(m_parser -> result_count())) );
data(TQByteArray());
finished();
}
@@ -736,7 +736,7 @@ void AptProtocol::listfiles(const TQString& query, const QueryOptions& /*options
TQString buffer;
TQTextOStream stream(&buffer);
stream
- << open_html_head(i18n("Files in \"%1\"").arg(query), true, *this)
+ << open_html_head(i18n("Files in \"%1\"").tqarg(query), true, *this)
<< add_html_head_link(ret_url.htmlURL(), i18n("Show package info"), "")
<< close_html_head()
<< endl;
@@ -746,7 +746,7 @@ void AptProtocol::listfiles(const TQString& query, const QueryOptions& /*options
(*m_parser)(this, "begin", TQString());
if (!m_adept_batch -> list( query ))
{
- error(ERR_SLAVE_DEFINED, i18n("Can't launch the package manager").arg(query));
+ error(ERR_SLAVE_DEFINED, i18n("Can't launch the package manager").tqarg(query));
return;
}
(*m_parser)(this, "end", TQString());
@@ -818,16 +818,16 @@ void AptProtocol::adept_batch(const TQString& query, const QueryOptions& options
if (pcount == 1)
{
if (query == "install")
- ip = SlaveBase::messageBox(QuestionYesNo, i18n("Do you want to install %1 ?").arg(plist[0]), i18n("Package Installation"));
+ ip = SlaveBase::messageBox(QuestionYesNo, i18n("Do you want to install %1 ?").tqarg(plist[0]), i18n("Package Installation"));
else
- ip = SlaveBase::messageBox(QuestionYesNo, i18n("Do you want to remove %1 ?").arg(plist[0]), i18n("Package Removal"));
+ ip = SlaveBase::messageBox(QuestionYesNo, i18n("Do you want to remove %1 ?").tqarg(plist[0]), i18n("Package Removal"));
}
else
{
if (query == "install")
- ip = SlaveBase::messageBox(QuestionYesNo,i18n("Do you want to install the following %1 packages ?\n%2").arg(pcount).arg(options["package"]));
+ ip = SlaveBase::messageBox(QuestionYesNo,i18n("Do you want to install the following %1 packages ?\n%2").tqarg(pcount).tqarg(options["package"]));
else
- ip = SlaveBase::messageBox(QuestionYesNo,i18n("Do you want to remove the following %1 packages ?\n").arg(pcount).arg(options["package"]));
+ ip = SlaveBase::messageBox(QuestionYesNo,i18n("Do you want to remove the following %1 packages ?\n").tqarg(pcount).tqarg(options["package"]));
}
kdDebug(DEBUG_ZONE) << command << endl;
@@ -849,7 +849,7 @@ void AptProtocol::adept_batch(const TQString& query, const QueryOptions& options
{
if (!m_process.policy( plist[i] ))
{
- error(ERR_SLAVE_DEFINED, i18n("Can't launch \"apt-cache policy %1\"").arg(plist[i]));
+ error(ERR_SLAVE_DEFINED, i18n("Can't launch \"apt-cache policy %1\"").tqarg(plist[i]));
return;
}
@@ -874,7 +874,7 @@ void AptProtocol::adept_batch(const TQString& query, const QueryOptions& options
else
{
TQString toto = puninst.join(" ");
- messageBox(Information,i18n("There was a problem installing %1.").arg(toto));
+ messageBox(Information,i18n("There was a problem installing %1.").tqarg(toto));
}
return;
}
diff --git a/src/aptcache.cpp b/src/aptcache.cpp
index f864f2d..c921920 100644
--- a/src/aptcache.cpp
+++ b/src/aptcache.cpp
@@ -37,7 +37,7 @@ AptCache::~AptCache() {}
static TQStringList received(TQString& buffer, char* input, int input_len)
{
- buffer += TQString::fromLatin1(input, input_len);
+ buffer += TQString::tqfromLatin1(input, input_len);
TQStringList ret = TQStringList::split('\n', buffer, true);
if (!buffer.endsWith("\n"))
{
@@ -255,19 +255,19 @@ void AptCache::receivePolicy(const TQStringList& lines)
TQString data( (*l).stripWhiteSpace() );
if (rx_pkgname.exactMatch(*l))
emit token("package", rx_pkgname.cap(1));
- else if (data.startsWith("Installed:", false))
+ else if (data.tqstartsWith("Installed:", false))
{
data = data.right(data.length() - 11);
emit token("installed", data);
m_installed = data;
}
- else if (data.startsWith("Candidate:", false))
+ else if (data.tqstartsWith("Candidate:", false))
{
data = data.right(data.length() - 11);
emit token("candidate", data);
m_candidate = data;
}
- else if (data.startsWith("Version table:", false))
+ else if (data.tqstartsWith("Version table:", false))
emit token("version_table", TQString());
else if (rx_location.search(data) > -1)
emit token("location", data);
diff --git a/src/dpkg.cpp b/src/dpkg.cpp
index 1993276..89ff615 100644
--- a/src/dpkg.cpp
+++ b/src/dpkg.cpp
@@ -86,7 +86,7 @@ void Dpkg::receiveSearch( const TQStringList & line )
if ((*i).isEmpty()) continue;
if (rx_notfound.exactMatch(*i))
{
- emit token("error", i18n("%1 not found").arg(rx_notfound.cap(1)));
+ emit token("error", i18n("%1 not found").tqarg(rx_notfound.cap(1)));
continue;
}
@@ -123,7 +123,7 @@ void Dpkg::receiveList( const TQStringList & line )
for (TQStringList::ConstIterator i = line.begin(); i != line.end(); ++i)
{
if (rx_notfound.search(*i) > -1)
- emit token("error", i18n("Package %1 is not installed").arg(rx_notfound.cap(1)));
+ emit token("error", i18n("Package %1 is not installed").tqarg(rx_notfound.cap(1)));
else if ((*i).startsWith("/"))
emit token("file", *i);
}
@@ -158,16 +158,16 @@ static const TQString html_form_combo("<select name=\"%1\" id=\"%2\">");
static TQString make_form_text(const TQString& type, const TQString& label)
{
return
- html_form_line_begin.arg(type).arg(label)
- + TQString("<input type=\"text\" name=\"%1\" id=\"%2\">").arg(type).arg(type)
+ html_form_line_begin.tqarg(type).tqarg(label)
+ + TQString("<input type=\"text\" name=\"%1\" id=\"%2\">").tqarg(type).tqarg(type)
+ html_form_line_end;
}
static TQString begin_form_combo(const TQString& type, const TQString& label)
{
return
- html_form_line_begin.arg(type).arg(label)
- + TQString("\t<select name=\"%1\" id=\"%2\">\n").arg(type).arg(type);
+ html_form_line_begin.tqarg(type).tqarg(label)
+ + TQString("\t<select name=\"%1\" id=\"%2\">\n").tqarg(type).tqarg(type);
}
static TQString make_form_option(const TQString& name, const TQString& text)
{ return "\t\t<option value=" + name + ">" + text + "</option>\n"; }
@@ -201,7 +201,7 @@ TQString Dpkg::getOnlineForm()
<< make_form_option("warty", "warty")
<< end_form_combo()
- << html_form_end.arg(i18n("Go online!"));
+ << html_form_end.tqarg(i18n("Go online!"));
return buffer;
}
diff --git a/src/parsers/filesearch.cpp b/src/parsers/filesearch.cpp
index e4185f2..281aa63 100644
--- a/src/parsers/filesearch.cpp
+++ b/src/parsers/filesearch.cpp
@@ -33,7 +33,7 @@ void FileSearch::operator() (AptProtocol* slave, const TQString & tag, const TQS
if (m_result_count)
*slave << buffer + html_dpkgs_line_end;
- *slave << html_dpkgs_line_begin.arg(value);
+ *slave << html_dpkgs_line_begin.tqarg(value);
++m_result_count;
buffer = "";
}
diff --git a/src/parsers/list.cpp b/src/parsers/list.cpp
index 1c38cb7..e4cea8e 100644
--- a/src/parsers/list.cpp
+++ b/src/parsers/list.cpp
@@ -62,7 +62,7 @@ namespace Parsers
files.sort();
*slave <<
"<div class=\"filelist\">\n" + files.join("\n<br>") + "\n</div>\n"
- "<div class=\"footer\">" + i18n("%1 files in the package").arg(result_count()) + "</div>\n";
+ "<div class=\"footer\">" + i18n("%1 files in the package").tqarg(result_count()) + "</div>\n";
files.clear();
}
}
diff --git a/src/parsers/qhtmlstream.h b/src/parsers/qhtmlstream.h
index 5f60599..7d27569 100644
--- a/src/parsers/qhtmlstream.h
+++ b/src/parsers/qhtmlstream.h
@@ -10,7 +10,7 @@
#ifndef TQHtmlStream_H
#define TQHtmlStream_H
-#include <textstream.h>
+#include <tqtextstream.h>
#include <tqstringlist.h>
class TQHtmlStream;
diff --git a/src/parsers/show.cpp b/src/parsers/show.cpp
index 5ffbc82..84ace04 100644
--- a/src/parsers/show.cpp
+++ b/src/parsers/show.cpp
@@ -101,16 +101,16 @@ void Show::operator() (AptProtocol* slave, const TQString& tag, const TQString&
{
close_item(indent, buffer);
buffer +=
- html_attribute_begin.arg(value)
+ html_attribute_begin.tqarg(value)
+ "&nbsp;";
close_item(indent, buffer);
- buffer += html_attribute_begin.arg("&nbsp;");
+ buffer += html_attribute_begin.tqarg("&nbsp;");
}
else if (value != "Version" && value != "Package")
{
close_item(indent, buffer);
- buffer += html_attribute_begin.arg(value);
+ buffer += html_attribute_begin.tqarg(value);
}
if (value == "Description")
@@ -141,14 +141,14 @@ void Show::operator() (AptProtocol* slave, const TQString& tag, const TQString&
if (value == m_installed)
{
action.setQuery("remove");
- version = TQString("<div class=\"version-header-installed\" id=\"%1\">").arg(item_id)
- + i18n("Installed version %1").arg(value);
+ version = TQString("<div class=\"version-header-installed\" id=\"%1\">").tqarg(item_id)
+ + i18n("Installed version %1").tqarg(value);
}
else
{
action.setQuery("install");
- version = TQString("<div class=\"version-header\" id=\"%1\">").arg(item_id)
- + i18n("Version %1").arg(value);
+ version = TQString("<div class=\"version-header\" id=\"%1\">").tqarg(item_id)
+ + i18n("Version %1").tqarg(value);
}
action.addQueryItem("package", m_package);