summaryrefslogtreecommitdiffstats
path: root/src/fetch/z3950connection.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:57:51 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:57:51 -0600
commit2781e27b871150395a5a82e221684108641002b2 (patch)
tree57f4d7c01a48faef1a840fbe0de8f4ec1e5f606f /src/fetch/z3950connection.cpp
parent031454e56009d576589c28757f6c6fcf4884095e (diff)
downloadtellico-2781e27b871150395a5a82e221684108641002b2.tar.gz
tellico-2781e27b871150395a5a82e221684108641002b2.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 031454e56009d576589c28757f6c6fcf4884095e.
Diffstat (limited to 'src/fetch/z3950connection.cpp')
-rw-r--r--src/fetch/z3950connection.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/fetch/z3950connection.cpp b/src/fetch/z3950connection.cpp
index 7817762..5bf77ac 100644
--- a/src/fetch/z3950connection.cpp
+++ b/src/fetch/z3950connection.cpp
@@ -149,7 +149,7 @@ void Z3950Connection::run() {
// if syntax is mods, set esn to mods too
TQCString type = "raw";
if(m_syntax == Latin1Literal("mods")) {
- m_syntax = TQString::fromLatin1("xml");
+ m_syntax = TQString::tqfromLatin1("xml");
ZOOM_resultset_option_set(resultSet, "elementSetName", "mods");
type = "xml";
} else {
@@ -170,7 +170,7 @@ void Z3950Connection::run() {
ZOOM_query_destroy(query);
m_connected = false;
- TQString s = i18n("Connection search error %1: %2").arg(errcode).arg(toString(errmsg));
+ TQString s = i18n("Connection search error %1: %2").tqarg(errcode).tqarg(toString(errmsg));
if(!TQCString(addinfo).isEmpty()) {
s += " (" + toString(addinfo) + ")";
}
@@ -190,10 +190,10 @@ void Z3950Connection::run() {
// want raw unless it's mods
ZOOM_record_get(rec, type, &len);
if(len > 0 && m_syntax.isEmpty()) {
- newSyntax = TQString::fromLatin1(ZOOM_record_get(rec, "syntax", &len)).lower();
+ newSyntax = TQString::tqfromLatin1(ZOOM_record_get(rec, "syntax", &len)).lower();
myLog() << "Z3950Connection::run() - syntax guess is " << newSyntax << endl;
if(newSyntax == Latin1Literal("mods") || newSyntax == Latin1Literal("xml")) {
- m_syntax = TQString::fromLatin1("xml");
+ m_syntax = TQString::tqfromLatin1("xml");
ZOOM_resultset_option_set(resultSet, "elementSetName", "mods");
} else if(newSyntax == Latin1Literal("grs-1")) {
// if it's defaulting to grs-1, go ahead and change it to try to get a marc
@@ -208,7 +208,7 @@ void Z3950Connection::run() {
newSyntax != Latin1Literal("unimarc") &&
newSyntax != Latin1Literal("grs-1")) {
myLog() << "Z3950Connection::run() - changing z39.50 syntax to MODS" << endl;
- newSyntax = TQString::fromLatin1("xml");
+ newSyntax = TQString::tqfromLatin1("xml");
ZOOM_resultset_option_set(resultSet, "elementSetName", "mods");
ZOOM_resultset_option_set(resultSet, "preferredRecordSyntax", newSyntax.latin1());
rec = ZOOM_resultset_record(resultSet, 0);
@@ -216,28 +216,28 @@ void Z3950Connection::run() {
if(len == 0) {
// change set name back
ZOOM_resultset_option_set(resultSet, "elementSetName", m_esn.latin1());
- newSyntax = TQString::fromLatin1("usmarc"); // try usmarc
+ newSyntax = TQString::tqfromLatin1("usmarc"); // try usmarc
myLog() << "Z3950Connection::run() - changing z39.50 syntax to USMARC" << endl;
ZOOM_resultset_option_set(resultSet, "preferredRecordSyntax", newSyntax.latin1());
rec = ZOOM_resultset_record(resultSet, 0);
ZOOM_record_get(rec, "raw", &len);
}
if(len == 0) {
- newSyntax = TQString::fromLatin1("marc21"); // try marc21
+ newSyntax = TQString::tqfromLatin1("marc21"); // try marc21
myLog() << "Z3950Connection::run() - changing z39.50 syntax to MARC21" << endl;
ZOOM_resultset_option_set(resultSet, "preferredRecordSyntax", newSyntax.latin1());
rec = ZOOM_resultset_record(resultSet, 0);
ZOOM_record_get(rec, "raw", &len);
}
if(len == 0) {
- newSyntax = TQString::fromLatin1("unimarc"); // try unimarc
+ newSyntax = TQString::tqfromLatin1("unimarc"); // try unimarc
myLog() << "Z3950Connection::run() - changing z39.50 syntax to UNIMARC" << endl;
ZOOM_resultset_option_set(resultSet, "preferredRecordSyntax", newSyntax.latin1());
rec = ZOOM_resultset_record(resultSet, 0);
ZOOM_record_get(rec, "raw", &len);
}
if(len == 0) {
- newSyntax = TQString::fromLatin1("grs-1"); // try grs-1
+ newSyntax = TQString::tqfromLatin1("grs-1"); // try grs-1
myLog() << "Z3950Connection::run() - changing z39.50 syntax to GRS-1" << endl;
ZOOM_resultset_option_set(resultSet, "preferredRecordSyntax", newSyntax.latin1());
rec = ZOOM_resultset_record(resultSet, 0);
@@ -256,10 +256,10 @@ void Z3950Connection::run() {
// go back to fooling ourselves and calling it mods
if(m_syntax == Latin1Literal("xml")) {
- m_syntax = TQString::fromLatin1("mods");
+ m_syntax = TQString::tqfromLatin1("mods");
}
if(newSyntax == Latin1Literal("xml")) {
- newSyntax = TQString::fromLatin1("mods");
+ newSyntax = TQString::tqfromLatin1("mods");
}
// save syntax change for next time
if(m_syntax != newSyntax) {
@@ -268,7 +268,7 @@ void Z3950Connection::run() {
}
if(m_sourceCharSet.isEmpty()) {
- m_sourceCharSet = TQString::fromLatin1("marc-8");
+ m_sourceCharSet = TQString::tqfromLatin1("marc-8");
}
const size_t realLimit = TQMIN(numResults, m_limit);
@@ -291,7 +291,7 @@ void Z3950Connection::run() {
#if 0
kdWarning() << "Remove debug from z3950connection.cpp" << endl;
{
- TQFile f1(TQString::fromLatin1("/tmp/z3950.raw"));
+ TQFile f1(TQString::tqfromLatin1("/tmp/z3950.raw"));
if(f1.open(IO_WriteOnly)) {
TQDataStream t(&f1);
t << ZOOM_record_get(rec, "raw", &len);
@@ -342,7 +342,7 @@ bool Z3950Connection::makeConnection() {
ZOOM_connection_destroy(d->conn);
m_connected = false;
- TQString s = i18n("Connection error %1: %2").arg(errcode).arg(toString(errmsg));
+ TQString s = i18n("Connection error %1: %2").tqarg(errcode).tqarg(toString(errmsg));
if(!TQCString(addinfo).isEmpty()) {
s += " (" + toString(addinfo) + ")";
}
@@ -378,12 +378,12 @@ void Z3950Connection::checkPendingEvents() {
inline
TQCString Z3950Connection::toCString(const TQString& text_) {
- return iconvRun(text_.utf8(), TQString::fromLatin1("utf-8"), m_sourceCharSet);
+ return iconvRun(text_.utf8(), TQString::tqfromLatin1("utf-8"), m_sourceCharSet);
}
inline
TQString Z3950Connection::toString(const TQCString& text_) {
- return TQString::fromUtf8(iconvRun(text_, m_sourceCharSet, TQString::fromLatin1("utf-8")));
+ return TQString::fromUtf8(iconvRun(text_, m_sourceCharSet, TQString::tqfromLatin1("utf-8")));
}
// static
@@ -403,9 +403,9 @@ TQCString Z3950Connection::iconvRun(const TQCString& text_, const TQString& from
TQString charSetLower = fromCharSet_.lower();
charSetLower.remove('-').remove(' ');
if(charSetLower == Latin1Literal("iso5426")) {
- return iconvRun(Iso5426Converter::toUtf8(text_).utf8(), TQString::fromLatin1("utf-8"), toCharSet_);
+ return iconvRun(Iso5426Converter::toUtf8(text_).utf8(), TQString::tqfromLatin1("utf-8"), toCharSet_);
} else if(charSetLower == Latin1Literal("iso6937")) {
- return iconvRun(Iso6937Converter::toUtf8(text_).utf8(), TQString::fromLatin1("utf-8"), toCharSet_);
+ return iconvRun(Iso6937Converter::toUtf8(text_).utf8(), TQString::tqfromLatin1("utf-8"), toCharSet_);
}
kdWarning() << "Z3950Connection::iconvRun() - conversion from " << fromCharSet_
<< " to " << toCharSet_ << " is unsupported" << endl;
@@ -453,9 +453,9 @@ TQString Z3950Connection::toXML(const TQCString& marc_, const TQString& charSet_
TQString charSetLower = charSet_.lower();
charSetLower.remove('-').remove(' ');
if(charSetLower == Latin1Literal("iso5426")) {
- return toXML(Iso5426Converter::toUtf8(marc_).utf8(), TQString::fromLatin1("utf-8"));
+ return toXML(Iso5426Converter::toUtf8(marc_).utf8(), TQString::tqfromLatin1("utf-8"));
} else if(charSetLower == Latin1Literal("iso6937")) {
- return toXML(Iso6937Converter::toUtf8(marc_).utf8(), TQString::fromLatin1("utf-8"));
+ return toXML(Iso6937Converter::toUtf8(marc_).utf8(), TQString::tqfromLatin1("utf-8"));
}
kdWarning() << "Z3950Connection::toXML() - conversion from " << charSet_ << " is unsupported" << endl;
return TQString();
@@ -488,7 +488,7 @@ TQString Z3950Connection::toXML(const TQCString& marc_, const TQString& charSet_
return TQString();
}
- TQString output = TQString::fromLatin1("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ TQString output = TQString::tqfromLatin1("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
output += TQString::fromUtf8(TQCString(result, len+1), len+1);
// myDebug() << TQCString(result) << endl;
// myDebug() << "-------------------------------------------" << endl;