summaryrefslogtreecommitdiffstats
path: root/src/translators
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit0254ebaa5e056092461fd585b6851d15faa43035 (patch)
tree2bf41a1c189b92dc1b9ab89e3ce392f8132214c4 /src/translators
parentfa071926f015f39711632b3fb9fe16004d93d0ec (diff)
downloadtellico-0254ebaa5e056092461fd585b6851d15faa43035.tar.gz
tellico-0254ebaa5e056092461fd585b6851d15faa43035.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/translators')
-rw-r--r--src/translators/alexandriaexporter.cpp2
-rw-r--r--src/translators/alexandriaimporter.cpp10
-rw-r--r--src/translators/amcimporter.cpp10
-rw-r--r--src/translators/audiofileimporter.cpp2
-rw-r--r--src/translators/bibtexexporter.cpp6
-rw-r--r--src/translators/bibtexhandler.cpp22
-rw-r--r--src/translators/bibteximporter.cpp6
-rw-r--r--src/translators/btparse/btparse.h4
-rw-r--r--src/translators/btparse/parse_auxiliary.c6
-rw-r--r--src/translators/btparse/postprocess.c20
-rw-r--r--src/translators/btparse/sym.c2
-rw-r--r--src/translators/csvexporter.cpp6
-rw-r--r--src/translators/csvimporter.cpp2
-rw-r--r--src/translators/dcimporter.cpp2
-rw-r--r--src/translators/freedbimporter.cpp6
-rw-r--r--src/translators/gcfilmsexporter.cpp2
-rw-r--r--src/translators/gcfilmsimporter.cpp4
-rwxr-xr-xsrc/translators/griffith2tellico.py6
-rw-r--r--src/translators/grs1importer.cpp4
-rw-r--r--src/translators/htmlexporter.cpp12
-rw-r--r--src/translators/pilotdbexporter.cpp6
-rw-r--r--src/translators/risimporter.cpp6
-rw-r--r--src/translators/tellico_xml.cpp2
-rw-r--r--src/translators/tellicoimporter.cpp8
-rw-r--r--src/translators/tellicoxmlexporter.cpp8
-rw-r--r--src/translators/xslthandler.cpp6
-rw-r--r--src/translators/xsltimporter.cpp2
27 files changed, 86 insertions, 86 deletions
diff --git a/src/translators/alexandriaexporter.cpp b/src/translators/alexandriaexporter.cpp
index c00b54b..f59cefe 100644
--- a/src/translators/alexandriaexporter.cpp
+++ b/src/translators/alexandriaexporter.cpp
@@ -35,7 +35,7 @@ namespace {
using Tellico::Export::AlexandriaExporter;
TQString& AlexandriaExporter::escapeText(TQString& str_) {
- str_.tqreplace('"', TQString::tqfromLatin1("\\\""));
+ str_.replace('"', TQString::tqfromLatin1("\\\""));
return str_;
}
diff --git a/src/translators/alexandriaimporter.cpp b/src/translators/alexandriaimporter.cpp
index 1df5116..c3a9db1 100644
--- a/src/translators/alexandriaimporter.cpp
+++ b/src/translators/alexandriaimporter.cpp
@@ -118,7 +118,7 @@ Tellico::Data::CollPtr AlexandriaImporter::collection() {
TQStringList authors;
line = ts.readLine();
TQRegExp begin(TQString::tqfromLatin1("^\\s*-\\s+"));
- while(!line.isNull() && line.tqfind(begin) > -1) {
+ while(!line.isNull() && line.find(begin) > -1) {
line.remove(begin);
authors += clean(line);
line = ts.readLine();
@@ -211,8 +211,8 @@ TQWidget* AlexandriaImporter::widget(TQWidget* parent_, const char* name_/*=0*/)
TQString& AlexandriaImporter::cleanLine(TQString& str_) {
static TQRegExp escRx(TQString::tqfromLatin1("\\\\x(\\w\\w)"), false);
str_.remove(TQString::tqfromLatin1("\\r"));
- str_.tqreplace(TQString::tqfromLatin1("\\n"), TQString::tqfromLatin1("\n"));
- str_.tqreplace(TQString::tqfromLatin1("\\t"), TQString::tqfromLatin1("\t"));
+ str_.replace(TQString::tqfromLatin1("\\n"), TQString::tqfromLatin1("\n"));
+ str_.replace(TQString::tqfromLatin1("\\t"), TQString::tqfromLatin1("\t"));
// YAML uses escape sequences like \xC3
int pos = escRx.search(str_);
@@ -230,7 +230,7 @@ TQString& AlexandriaImporter::cleanLine(TQString& str_) {
pos = escRx.search(str_, pos+1);
}
if(!bytes.isEmpty()) {
- str_.tqreplace(origPos, bytes.length()*4, TQString::fromUtf8(bytes.data()));
+ str_.replace(origPos, bytes.length()*4, TQString::fromUtf8(bytes.data()));
}
return str_;
}
@@ -245,7 +245,7 @@ TQString AlexandriaImporter::clean(TQString& str_) {
}
// we ignore YAML tags, this is not actually a good parser, but will do for now
str_.remove(TQRegExp(TQString::tqfromLatin1("^![^\\s]*\\s+")));
- return str_.tqreplace(quote, TQChar('"'));
+ return str_.replace(quote, TQChar('"'));
}
void AlexandriaImporter::slotCancel() {
diff --git a/src/translators/amcimporter.cpp b/src/translators/amcimporter.cpp
index d988d55..0209ddc 100644
--- a/src/translators/amcimporter.cpp
+++ b/src/translators/amcimporter.cpp
@@ -65,7 +65,7 @@ Tellico::Data::CollPtr AMCImporter::collection() {
m_ds.readRawBytes(buffer.data(), l);
TQString version = TQString::fromLocal8Bit(buffer, l);
TQRegExp versionRx(TQString::tqfromLatin1(".+AMC_(\\d+)\\.(\\d+).+"));
- if(version.tqfind(versionRx) == -1) {
+ if(version.find(versionRx) == -1) {
myDebug() << "AMCImporter::collection() - no file id match" << endl;
return 0;
}
@@ -198,7 +198,7 @@ void AMCImporter::readEntry() {
s = readString();
TQRegExp roleRx(TQString::tqfromLatin1("(.+) \\(([^(]+)\\)"));
roleRx.setMinimal(true);
- if(s.tqfind(roleRx) > -1) {
+ if(s.find(roleRx) > -1) {
TQString role = roleRx.cap(2).lower();
if(role == Latin1Literal("story") || role == Latin1Literal("written by")) {
e->setField(TQString::tqfromLatin1("writer"), roleRx.cap(1));
@@ -209,7 +209,7 @@ void AMCImporter::readEntry() {
e->setField(TQString::tqfromLatin1("producer"), s);
}
e->setField(TQString::tqfromLatin1("nationality"), readString());
- e->setField(TQString::tqfromLatin1("genre"), readString().tqreplace(TQString::tqfromLatin1(", "), TQString::tqfromLatin1("; ")));
+ e->setField(TQString::tqfromLatin1("genre"), readString().replace(TQString::tqfromLatin1(", "), TQString::tqfromLatin1("; ")));
e->setField(TQString::tqfromLatin1("cast"), parseCast(readString()).join(TQString::tqfromLatin1("; ")));
@@ -218,7 +218,7 @@ void AMCImporter::readEntry() {
e->setField(TQString::tqfromLatin1("comments"), readString());
s = readString(); // video format
TQRegExp regionRx(TQString::tqfromLatin1("Region \\d"));
- if(s.tqfind(regionRx) > -1) {
+ if(s.find(regionRx) > -1) {
e->setField(TQString::tqfromLatin1("region"), regionRx.cap(0));
}
e->setField(TQString::tqfromLatin1("audio-track"), readString()); // audio format
@@ -242,7 +242,7 @@ TQStringList AMCImporter::parseCast(const TQString& text_) {
TQRegExp castRx(TQString::tqfromLatin1("[,()]"));
TQString person, role;
int oldPos = 0;
- for(int pos = text_.tqfind(castRx); pos > -1; pos = text_.tqfind(castRx, pos+1)) {
+ for(int pos = text_.find(castRx); pos > -1; pos = text_.find(castRx, pos+1)) {
if(text_.at(pos) == ',' && nPar%2 == 0) {
// we're done with this one
person += text_.mid(oldPos, pos-oldPos).stripWhiteSpace();
diff --git a/src/translators/audiofileimporter.cpp b/src/translators/audiofileimporter.cpp
index 539c03e..e962b18 100644
--- a/src/translators/audiofileimporter.cpp
+++ b/src/translators/audiofileimporter.cpp
@@ -405,7 +405,7 @@ int AudioFileImporter::discNumber(const TagLib::FileRef& ref_) const {
}
if(!disc.isEmpty()) {
- int pos = disc.tqfind('/');
+ int pos = disc.find('/');
int n;
bool ok;
if(pos == -1) {
diff --git a/src/translators/bibtexexporter.cpp b/src/translators/bibtexexporter.cpp
index 867dda3..d51e061 100644
--- a/src/translators/bibtexexporter.cpp
+++ b/src/translators/bibtexexporter.cpp
@@ -287,11 +287,11 @@ void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& field
// insert "and" in between them (e.g. author and editor)
if(fIt->formatFlag() == Data::Field::FormatName
&& fIt->flags() & Data::Field::AllowMultiple) {
- value.tqreplace(Data::Field::delimiter(), TQString::tqfromLatin1(" and "));
+ value.replace(Data::Field::delimiter(), TQString::tqfromLatin1(" and "));
} else if(fIt->flags() & Data::Field::AllowMultiple) {
TQString bibsep = fIt->property(bibtexSep);
if(!bibsep.isEmpty()) {
- value.tqreplace(Data::Field::delimiter(), bibsep);
+ value.replace(Data::Field::delimiter(), bibsep);
}
} else if(fIt->type() == Data::Field::Para) {
// strip HTML from bibtex export
@@ -301,7 +301,7 @@ void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& field
} else if(fIt->property(bibtex) == Latin1Literal("pages")) {
TQRegExp rx(TQString::tqfromLatin1("(\\d)-(\\d)"));
for(int pos = rx.search(value); pos > -1; pos = rx.search(value, pos+2)) {
- value.tqreplace(pos, 3, rx.cap(1)+"--"+rx.cap(2));
+ value.replace(pos, 3, rx.cap(1)+"--"+rx.cap(2));
}
}
diff --git a/src/translators/bibtexhandler.cpp b/src/translators/bibtexhandler.cpp
index e6c07fa..873dc27 100644
--- a/src/translators/bibtexhandler.cpp
+++ b/src/translators/bibtexhandler.cpp
@@ -103,7 +103,7 @@ TQString BibtexHandler::bibtexKey(const TQString& author_, const TQString& title
TQString key;
// if no comma, take the last word
if(!author_.isEmpty()) {
- if(author_.tqfind(',') == -1) {
+ if(author_.find(',') == -1) {
key += author_.section(' ', -1).lower() + '-';
} else {
// if there is a comma, take the string up to the first comma
@@ -116,7 +116,7 @@ TQString BibtexHandler::bibtexKey(const TQString& author_, const TQString& title
}
key += year_;
// bibtex key may only contain [0-9a-zA-Z-]
- return key.tqreplace(s_badKeyChars, TQString());
+ return key.replace(s_badKeyChars, TQString());
}
void BibtexHandler::loadTranslationMaps() {
@@ -155,7 +155,7 @@ TQString BibtexHandler::importText(char* text_) {
TQString str = TQString::fromUtf8(text_);
for(StringListMap::Iterator it = s_utf8LatexMap->begin(); it != s_utf8LatexMap->end(); ++it) {
for(TQStringList::Iterator sit = it.data().begin(); sit != it.data().end(); ++sit) {
- str.tqreplace(*sit, it.key());
+ str.replace(*sit, it.key());
}
}
@@ -166,7 +166,7 @@ TQString BibtexHandler::importText(char* text_) {
TQRegExp rx(TQString::tqfromLatin1("\\{([A-Z]+)\\}"));
rx.setMinimal(true);
- str.tqreplace(rx, TQString::tqfromLatin1("\\1"));
+ str.replace(rx, TQString::tqfromLatin1("\\1"));
return str;
}
@@ -191,7 +191,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma
TQString text = text_;
for(StringListMap::Iterator it = s_utf8LatexMap->begin(); it != s_utf8LatexMap->end(); ++it) {
- text.tqreplace(it.key(), it.data()[0]);
+ text.replace(it.key(), it.data()[0]);
}
if(macros_.isEmpty()) {
@@ -209,7 +209,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma
TQStringList tokens = TQStringList::split('#', text, true);
for(TQStringList::Iterator it = tokens.begin(); it != tokens.end(); ++it) {
// check to see if token is a macro
- if(macros_.tqfindIndex((*it).stripWhiteSpace()) == -1) {
+ if(macros_.findIndex((*it).stripWhiteSpace()) == -1) {
// the token is NOT a macro, add braces around whole words and also around capitals
list << lquote + addBraces(*it) + rquote;
} else {
@@ -219,7 +219,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma
const TQChar octo = '#';
text = list.join(octo);
- text.tqreplace(TQString(rquote)+octo+lquote, octo);
+ text.replace(TQString(rquote)+octo+lquote, octo);
return text;
}
@@ -264,7 +264,7 @@ bool BibtexHandler::setFieldValue(Data::EntryPtr entry_, const TQString& bibtexF
// special case keywords, replace commas with semi-colons so they get separated
TQString value = value_;
if(field->property(TQString::tqfromLatin1("bibtex")).startsWith(TQString::tqfromLatin1("keyword"))) {
- value.tqreplace(',', ';');
+ value.replace(',', ';');
// special case refbase bibtex export, with multiple keywords fields
TQString oValue = entry_->field(field);
if(!oValue.isEmpty()) {
@@ -279,9 +279,9 @@ TQString& BibtexHandler::cleanText(TQString& text_) {
// TQRegExp rx(TQString::tqfromLatin1("(?=[^\\\\])\\\\.+\\{"));
TQRegExp rx(TQString::tqfromLatin1("\\\\.+\\{"));
rx.setMinimal(true);
- text_.tqreplace(rx, TQString());
- text_.tqreplace(TQRegExp(TQString::tqfromLatin1("[{}]")), TQString());
- text_.tqreplace('~', ' ');
+ text_.replace(rx, TQString());
+ text_.replace(TQRegExp(TQString::tqfromLatin1("[{}]")), TQString());
+ text_.replace('~', ' ');
return text_;
}
diff --git a/src/translators/bibteximporter.cpp b/src/translators/bibteximporter.cpp
index 97ab55c..0b4775b 100644
--- a/src/translators/bibteximporter.cpp
+++ b/src/translators/bibteximporter.cpp
@@ -197,7 +197,7 @@ Tellico::Data::CollPtr BibtexImporter::readCollection(const TQString& text, int
}
TQString fieldName = TQString::fromUtf8(name);
if(fieldName == Latin1Literal("author") || fieldName == Latin1Literal("editor")) {
- str.tqreplace(TQRegExp(TQString::tqfromLatin1("\\sand\\s")), TQString::tqfromLatin1("; "));
+ str.replace(TQRegExp(TQString::tqfromLatin1("\\sand\\s")), TQString::tqfromLatin1("; "));
}
BibtexHandler::setFieldValue(entry, fieldName, str);
}
@@ -242,7 +242,7 @@ void BibtexImporter::parseText(const TQString& text) {
bool needsCleanup = false;
int brace = 0;
int startpos = 0;
- int pos = text.tqfind(rx, 0);
+ int pos = text.find(rx, 0);
while(pos > 0 && !m_cancelled) {
if(text[pos] == '{') {
++brace;
@@ -266,7 +266,7 @@ void BibtexImporter::parseText(const TQString& text) {
}
startpos = pos+1;
}
- pos = text.tqfind(rx, pos+1);
+ pos = text.find(rx, pos+1);
}
if(needsCleanup) {
// clean up some structures
diff --git a/src/translators/btparse/btparse.h b/src/translators/btparse/btparse.h
index df5206c..841d3ee 100644
--- a/src/translators/btparse/btparse.h
+++ b/src/translators/btparse/btparse.h
@@ -297,8 +297,8 @@ AST * bt_parse_file (char * filename,
/* postprocess.c */
void bt_postprocess_string (char * s, ushort options);
-char * bt_postprocess_value (AST * value, ushort options, boolean tqreplace);
-char * bt_postprocess_field (AST * field, ushort options, boolean tqreplace);
+char * bt_postprocess_value (AST * value, ushort options, boolean replace);
+char * bt_postprocess_field (AST * field, ushort options, boolean replace);
void bt_postprocess_entry (AST * entry, ushort options);
/* error.c */
diff --git a/src/translators/btparse/parse_auxiliary.c b/src/translators/btparse/parse_auxiliary.c
index 105e84e..401e322 100644
--- a/src/translators/btparse/parse_auxiliary.c
+++ b/src/translators/btparse/parse_auxiliary.c
@@ -71,7 +71,7 @@ void
fix_token_names (void)
{
int i;
- int num_tqreplace;
+ int num_replace;
#ifdef CLEVER_TOKEN_STUFF /* clever, but it doesn't work... */
/* arg! this doesn't work because I don't know how to find out the
@@ -91,8 +91,8 @@ fix_token_names (void)
}
#endif
- num_tqreplace = (sizeof(new_tokens) / sizeof(*new_tokens));
- for (i = 0; i < num_tqreplace; i++)
+ num_replace = (sizeof(new_tokens) / sizeof(*new_tokens));
+ for (i = 0; i < num_replace; i++)
{
const char *new = new_tokens[i].new_name;
const char **old = zztokens + new_tokens[i].token;
diff --git a/src/translators/btparse/postprocess.c b/src/translators/btparse/postprocess.c
index 127342c..ad8c764 100644
--- a/src/translators/btparse/postprocess.c
+++ b/src/translators/btparse/postprocess.c
@@ -156,7 +156,7 @@ bt_postprocess_string (char * s, ushort options)
sub-strings, which would be bad if you intend to concatenate
them later in the BibTeX sense.)
- The 'tqreplace' parameter is used to govern whether the
+ The 'replace' parameter is used to govern whether the
existing strings in the AST should be replaced with their
post-processed versions. This can extend as far as
collapsing a series of simple values into a single BTAST_STRING
@@ -171,7 +171,7 @@ bt_postprocess_string (char * s, ushort options)
rather than the tqparent of that list
-------------------------------------------------------------------------- */
char *
-bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
+bt_postprocess_value (AST * value, ushort options, boolean replace)
{
AST * simple_value; /* current simple value */
boolean pasting;
@@ -300,7 +300,7 @@ bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
bt_postprocess_string (tmp_string, string_opts);
}
- if (tqreplace)
+ if (replace)
{
simple_value->nodetype = BTAST_STRING;
if (simple_value->text)
@@ -312,12 +312,12 @@ bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
/*
* If the current simple value is a literal string, then just
- * post-process it. This will be done in-place if 'tqreplace' is
+ * post-process it. This will be done in-place if 'replace' is
* true, otherwise a copy of the string will be post-processed.
*/
else if (simple_value->nodetype == BTAST_STRING && simple_value->text)
{
- if (tqreplace)
+ if (replace)
{
tmp_string = simple_value->text;
}
@@ -340,12 +340,12 @@ bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
*/
if (simple_value->nodetype == BTAST_NUMBER)
{
- if (tqreplace && (options & BTO_CONVERT))
+ if (replace && (options & BTO_CONVERT))
simple_value->nodetype = BTAST_STRING;
if (simple_value->text)
{
- if (tqreplace)
+ if (replace)
tmp_string = simple_value->text;
else
{
@@ -395,7 +395,7 @@ bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
* `field', and replace text for first child with new_string.
*/
- if (tqreplace)
+ if (replace)
{
assert (value->right != NULL); /* there has to be > 1 simple value! */
zzfree_ast (value->right); /* free from second simple value on */
@@ -428,14 +428,14 @@ bt_postprocess_value (AST * value, ushort options, boolean tqreplace)
@MODIFIED :
-------------------------------------------------------------------------- */
char *
-bt_postprocess_field (AST * field, ushort options, boolean tqreplace)
+bt_postprocess_field (AST * field, ushort options, boolean replace)
{
if (field == NULL) return NULL;
if (field->nodetype != BTAST_FIELD)
usage_error ("bt_postprocess_field: invalid AST node (not a field)");
strlwr (field->text); /* downcase field name */
- return bt_postprocess_value (field->down, options, tqreplace);
+ return bt_postprocess_value (field->down, options, replace);
} /* bt_postprocess_field() */
diff --git a/src/translators/btparse/sym.c b/src/translators/btparse/sym.c
index b1eabd9..2426dea 100644
--- a/src/translators/btparse/sym.c
+++ b/src/translators/btparse/sym.c
@@ -80,7 +80,7 @@
* a = zzs_new("Truck"); zzs_add(a->symbol, a);
*
* p = zzs_get("Plum");
- * if ( p == NULL ) fprintf(stderr, "Hmmm...Can't tqfind 'Plum'\n");
+ * if ( p == NULL ) fprintf(stderr, "Hmmm...Can't find 'Plum'\n");
*
* p = zzs_rmscope(&scope1)
* for (; p!=NULL; p=p->scope) {printf("Scope1: %s\n", p->symbol);}
diff --git a/src/translators/csvexporter.cpp b/src/translators/csvexporter.cpp
index ef608b7..6936ef0 100644
--- a/src/translators/csvexporter.cpp
+++ b/src/translators/csvexporter.cpp
@@ -46,13 +46,13 @@ TQString CSVExporter::fileFilter() const {
TQString& CSVExporter::escapeText(TQString& text_) {
bool quotes = false;
- if(text_.tqfind('"') != -1) {
+ if(text_.find('"') != -1) {
quotes = true;
// quotation marks will be escaped by using a double pair
- text_.tqreplace('"', TQString::tqfromLatin1("\"\""));
+ text_.replace('"', TQString::tqfromLatin1("\"\""));
}
// if the text contains quotes or the delimiter, it needs to be surrounded by quotes
- if(quotes || text_.tqfind(m_delimiter) != -1) {
+ if(quotes || text_.find(m_delimiter) != -1) {
text_.prepend('"');
text_.append('"');
}
diff --git a/src/translators/csvimporter.cpp b/src/translators/csvimporter.cpp
index b23dd93..532fbcf 100644
--- a/src/translators/csvimporter.cpp
+++ b/src/translators/csvimporter.cpp
@@ -157,7 +157,7 @@ Tellico::Data::CollPtr CSVImporter::collection() {
m_parser->skipLine();
}
- const uint numLines = text().tqcontains('\n');
+ const uint numLines = text().contains('\n');
const uint stepSize = TQMAX(s_stepSize, numLines/100);
const bool showProgress = options() & ImportProgress;
diff --git a/src/translators/dcimporter.cpp b/src/translators/dcimporter.cpp
index 55d9716..5839255 100644
--- a/src/translators/dcimporter.cpp
+++ b/src/translators/dcimporter.cpp
@@ -70,7 +70,7 @@ Tellico::Data::CollPtr DCImporter::collection() {
useNS = UseNS;
}
TQString s = nodeList.item(0).toElement().text();
- s.tqreplace('\n', ' ');
+ s.replace('\n', ' ');
s = s.simplifyWhiteSpace();
e->setField(TQString::tqfromLatin1("title"), s);
diff --git a/src/translators/freedbimporter.cpp b/src/translators/freedbimporter.cpp
index 155f79e..fa864b6 100644
--- a/src/translators/freedbimporter.cpp
+++ b/src/translators/freedbimporter.cpp
@@ -263,7 +263,7 @@ void FreeDBImporter::readCDROM() {
}
entry->setField(TQString::tqfromLatin1("keyword"), info.category);
TQString extd = info.extd;
- extd.tqreplace('\n', TQString::tqfromLatin1("<br/>"));
+ extd.replace('\n', TQString::tqfromLatin1("<br/>"));
entry->setField(TQString::tqfromLatin1("comments"), extd);
TQStringList trackList;
@@ -381,7 +381,7 @@ void FreeDBImporter::readCache() {
}
entry->setField(TQString::tqfromLatin1("keyword"), info.category);
TQString extd = info.extd;
- extd.tqreplace('\n', TQString::tqfromLatin1("<br/>"));
+ extd.replace('\n', TQString::tqfromLatin1("<br/>"));
entry->setField(TQString::tqfromLatin1("comments"), extd);
// step through trackList
@@ -541,7 +541,7 @@ TQWidget* FreeDBImporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
}
void FreeDBImporter::slotClicked(int id_) {
- TQButton* button = m_buttonGroup->tqfind(id_);
+ TQButton* button = m_buttonGroup->find(id_);
if(!button) {
return;
}
diff --git a/src/translators/gcfilmsexporter.cpp b/src/translators/gcfilmsexporter.cpp
index 5bf3285..279a3ab 100644
--- a/src/translators/gcfilmsexporter.cpp
+++ b/src/translators/gcfilmsexporter.cpp
@@ -225,7 +225,7 @@ void GCfilmsExporter::push(TQTextOStream& ts_, TQCString fieldName_, Data::Entry
}
TQString s = entry_->field(TQString::tqfromLatin1(fieldName_), format_);
if(f->flags() & Data::Field::AllowMultiple) {
- ts_ << s.tqreplace(TQString::tqfromLatin1("; "), TQChar(','));
+ ts_ << s.replace(TQString::tqfromLatin1("; "), TQChar(','));
} else {
ts_ << s;
}
diff --git a/src/translators/gcfilmsimporter.cpp b/src/translators/gcfilmsimporter.cpp
index 5b66691..027a233 100644
--- a/src/translators/gcfilmsimporter.cpp
+++ b/src/translators/gcfilmsimporter.cpp
@@ -59,7 +59,7 @@ Tellico::Data::CollPtr GCfilmsImporter::collection() {
readGCfilms(str);
} else {
// need to reparse the string if it's in utf-8
- if(line.lower().tqfind(TQString::tqfromLatin1("utf-8")) > 0) {
+ if(line.lower().find(TQString::tqfromLatin1("utf-8")) > 0) {
str = TQString::fromUtf8(str.local8Bit());
}
readGCstar(str);
@@ -114,7 +114,7 @@ void GCfilmsImporter::readGCfilms(const TQString& text_) {
if(values.size() > 2 && values[2] == Latin1Literal("UTF8")) {
// if locale encoding isn't utf8, need to do a reconversion
TQTextCodec* codec = TQTextCodec::codecForLocale();
- if(TQCString(codec->name()).tqfind("utf-8", 0, false) == -1) {
+ if(TQCString(codec->name()).find("utf-8", 0, false) == -1) {
convertUTF8 = true;
}
}
diff --git a/src/translators/griffith2tellico.py b/src/translators/griffith2tellico.py
index 19bf583..24bfb41 100755
--- a/src/translators/griffith2tellico.py
+++ b/src/translators/griffith2tellico.py
@@ -246,12 +246,12 @@ class GriffithParser:
except:
value = str(row[i])
- col = columns[i].tqreplace('[','').tqreplace(']','')
+ col = columns[i].replace('[','').replace(']','')
if col == 'genre' or col == 'studio':
values = value.split('/')
elif col == 'plot' or col == 'notes':
- value = value.tqreplace('\n', '\n<br/>')
+ value = value.replace('\n', '\n<br/>')
values = (value,)
elif col == 'cast':
values = []
@@ -272,7 +272,7 @@ class GriffithParser:
values = (value,)
else:
values = (value,)
- col = col.tqreplace('"','')
+ col = col.replace('"','')
data[col] = values
# get medium
diff --git a/src/translators/grs1importer.cpp b/src/translators/grs1importer.cpp
index 6b6c8d2..30c9a69 100644
--- a/src/translators/grs1importer.cpp
+++ b/src/translators/grs1importer.cpp
@@ -105,9 +105,9 @@ Tellico::Data::CollPtr GRS1Importer::collection() {
if(field == Latin1Literal("title")) {
val = val.section('/', 0, 0).stripWhiteSpace(); // only take portion of title before slash
} else if(field == Latin1Literal("author")) {
- val.tqreplace(dateRx, TQString());
+ val.replace(dateRx, TQString());
} else if(field == Latin1Literal("publisher")) {
- int pos = val.tqfind(pubRx);
+ int pos = val.find(pubRx);
if(pos > -1) {
e->setField(TQString::tqfromLatin1("address"), pubRx.cap(1));
val = pubRx.cap(2);
diff --git a/src/translators/htmlexporter.cpp b/src/translators/htmlexporter.cpp
index 77a09c0..8ea2218 100644
--- a/src/translators/htmlexporter.cpp
+++ b/src/translators/htmlexporter.cpp
@@ -292,7 +292,7 @@ void HTMLExporter::setFormattingOptions(Data::CollPtr coll) {
}
// the third sort column may be same as first
- if(!m_sort3.isEmpty() && sortTitles.tqfindIndex(m_sort3) == -1) {
+ if(!m_sort3.isEmpty() && sortTitles.findIndex(m_sort3) == -1) {
sortTitles << m_sort3;
}
@@ -539,7 +539,7 @@ const xmlChar* HTMLExporter::handleLink(const xmlChar* link_) {
}
TQString HTMLExporter::handleLink(const TQString& link_) {
- if(m_links.tqcontains(link_)) {
+ if(m_links.contains(link_)) {
return m_links[link_];
}
// assume that if the link_ is not relative, then we don't need to copy it
@@ -593,20 +593,20 @@ TQString HTMLExporter::analyzeInternalCSS(const TQString& str_) {
int start = 0;
int end = 0;
const TQString url = TQString::tqfromLatin1("url(");
- for(int pos = str.tqfind(url); pos >= 0; pos = str.tqfind(url, pos+1)) {
+ for(int pos = str.find(url); pos >= 0; pos = str.find(url, pos+1)) {
pos += 4; // url(
if(str[pos] == '"' || str[pos] == '\'') {
++pos;
}
start = pos;
- pos = str.tqfind(')', start);
+ pos = str.find(')', start);
end = pos;
if(str[pos-1] == '"' || str[pos-1] == '\'') {
--end;
}
- str.tqreplace(start, end-start, handleLink(str.mid(start, end-start)));
+ str.replace(start, end-start, handleLink(str.mid(start, end-start)));
}
return str;
}
@@ -704,7 +704,7 @@ bool HTMLExporter::writeEntryFiles() {
if(multipleTitles) {
file = file.section(';', 0, 0);
}
- file.tqreplace(badChars, TQChar('_'));
+ file.replace(badChars, TQChar('_'));
file += TQChar('-') + TQString::number(entryIt->id()) + html;
outputFile.setFileName(file);
diff --git a/src/translators/pilotdbexporter.cpp b/src/translators/pilotdbexporter.cpp
index caab986..f5ec13b 100644
--- a/src/translators/pilotdbexporter.cpp
+++ b/src/translators/pilotdbexporter.cpp
@@ -143,7 +143,7 @@ bool PilotDBExporter::exec() {
lv.name = codec->fromUnicode(i18n("View Columns")).data();
for(TQStringList::ConstIterator it = m_columns.begin(); it != m_columns.end(); ++it) {
PalmLib::FlatFile::ListViewColumn col;
- col.field = coll->fieldTitles().tqfindIndex(*it);
+ col.field = coll->fieldTitles().findIndex(*it);
lv.push_back(col);
}
db.appendListView(lv);
@@ -182,8 +182,8 @@ bool PilotDBExporter::exec() {
TQDate date(y, m, d);
value = date.toString(TQString::tqfromLatin1("yyyy/MM/dd"));
} else if(fIt->type() == Data::Field::Para) {
- value.tqreplace(br, TQChar('\n'));
- value.tqreplace(tags, TQString());
+ value.replace(br, TQChar('\n'));
+ value.replace(tags, TQString());
}
// the number of fields in the record must match the number of fields in the database
record.appendField(PilotDB::string2field(db.field_type(i),
diff --git a/src/translators/risimporter.cpp b/src/translators/risimporter.cpp
index e0a75a3..bcf4db5 100644
--- a/src/translators/risimporter.cpp
+++ b/src/translators/risimporter.cpp
@@ -201,7 +201,7 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
}
// myDebug() << tag << ": " << value << endl;
// if the next line is not empty and does not match start regexp, append to value
- while(!nextLine.isEmpty() && nextLine.tqfind(rx) == -1) {
+ while(!nextLine.isEmpty() && nextLine.find(rx) == -1) {
value += nextLine.stripWhiteSpace();
nextLine = t.readLine();
}
@@ -212,7 +212,7 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
entry = new Data::Entry(m_coll);
needToAddFinal = false;
continue;
- } else if(tag == Latin1Literal("TY") && s_typeMap->tqcontains(value)) {
+ } else if(tag == Latin1Literal("TY") && s_typeMap->contains(value)) {
// for entry-type, switch it to normalized type name
value = (*s_typeMap)[value];
} else if(tag == Latin1Literal("SN")) {
@@ -248,7 +248,7 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
// the lookup scheme is:
// 1. any field has an RIS property that matches the tag name
// 2. default field mapping tag -> field name
- Data::FieldPtr f = risFields_.tqfind(tag);
+ Data::FieldPtr f = risFields_.find(tag);
if(!f) {
// special case for BT
// primary title for books, secondary for everything else
diff --git a/src/translators/tellico_xml.cpp b/src/translators/tellico_xml.cpp
index cddae3b..d1ad3c1 100644
--- a/src/translators/tellico_xml.cpp
+++ b/src/translators/tellico_xml.cpp
@@ -70,7 +70,7 @@ bool Tellico::XML::validXMLElementName(const TQString& name_) {
TQString Tellico::XML::elementName(const TQString& name_) {
TQString name = name_;
// change white space to dashes
- name.tqreplace(TQRegExp(TQString::tqfromLatin1("\\s+")), TQString::tqfromLatin1("-"));
+ name.replace(TQRegExp(TQString::tqfromLatin1("\\s+")), TQString::tqfromLatin1("-"));
// first cut, if it passes, we're done
if(XML::validXMLElementName(name)) {
return name;
diff --git a/src/translators/tellicoimporter.cpp b/src/translators/tellicoimporter.cpp
index 3f97074..c7ac869 100644
--- a/src/translators/tellicoimporter.cpp
+++ b/src/translators/tellicoimporter.cpp
@@ -389,7 +389,7 @@ void TellicoImporter::readField(uint syntaxVersion_, const TQDomElement& elem_)
if(elem_.hasAttribute(TQString::tqfromLatin1("category"))) {
// at one point, the categories had keyboard accels
TQString cat = elem_.attribute(TQString::tqfromLatin1("category"));
- if(syntaxVersion_ < 9 && cat.tqfind('&') > -1) {
+ if(syntaxVersion_ < 9 && cat.find('&') > -1) {
cat.remove('&');
}
if(isI18n) {
@@ -637,7 +637,7 @@ void TellicoImporter::readEntry(uint syntaxVersion_, const TQDomElement& entryEl
value += TQString::tqfromLatin1("::");
value += entry->field(TQString::tqfromLatin1("artist"));
}
- if(values.tqfindIndex(value) == -1) {
+ if(values.findIndex(value) == -1) {
values += value;
}
}
@@ -703,9 +703,9 @@ void TellicoImporter::readFilter(const TQDomElement& elem_) {
}
TQString function = e.attribute(TQString::tqfromLatin1("function")).lower();
FilterRule::Function func;
- if(function == Latin1Literal("tqcontains")) {
+ if(function == Latin1Literal("contains")) {
func = FilterRule::FuncContains;
- } else if(function == Latin1Literal("nottqcontains")) {
+ } else if(function == Latin1Literal("notcontains")) {
func = FilterRule::FuncNotContains;
} else if(function == Latin1Literal("equals")) {
func = FilterRule::FuncEquals;
diff --git a/src/translators/tellicoxmlexporter.cpp b/src/translators/tellicoxmlexporter.cpp
index 011d991..9d9d033 100644
--- a/src/translators/tellicoxmlexporter.cpp
+++ b/src/translators/tellicoxmlexporter.cpp
@@ -378,7 +378,7 @@ void TellicoXMLExporter::exportImageXML(TQDomDocument& dom_, TQDomElement& paren
}
void TellicoXMLExporter::exportGroupXML(TQDomDocument& dom_, TQDomElement& parent_) const {
- Data::EntryVec vec = entries(); // need a copy for ::tqcontains();
+ Data::EntryVec vec = entries(); // need a copy for ::contains();
bool exportAll = collection()->entries().count() == vec.count();
// iterate over each group, which are the first tqchildren
for(GroupIterator gIt = Controller::self()->groupIterator(); gIt.group(); ++gIt) {
@@ -390,7 +390,7 @@ void TellicoXMLExporter::exportGroupXML(TQDomDocument& dom_, TQDomElement& paren
// now iterate over all entry items in the group
Data::EntryVec sorted = Data::Document::self()->sortEntries(*gIt.group());
for(Data::EntryVec::Iterator eIt = sorted.begin(); eIt != sorted.end(); ++eIt) {
- if(!exportAll && !vec.tqcontains(eIt)) {
+ if(!exportAll && !vec.contains(eIt)) {
continue;
}
TQDomElement entryRefElem = dom_.createElement(TQString::tqfromLatin1("entryRef"));
@@ -416,10 +416,10 @@ void TellicoXMLExporter::exportFilterXML(TQDomDocument& dom_, TQDomElement& pare
ruleElem.setAttribute(TQString::tqfromLatin1("pattern"), it.current()->pattern());
switch(it.current()->function()) {
case FilterRule::FuncContains:
- ruleElem.setAttribute(TQString::tqfromLatin1("function"), TQString::tqfromLatin1("tqcontains"));
+ ruleElem.setAttribute(TQString::tqfromLatin1("function"), TQString::tqfromLatin1("contains"));
break;
case FilterRule::FuncNotContains:
- ruleElem.setAttribute(TQString::tqfromLatin1("function"), TQString::tqfromLatin1("nottqcontains"));
+ ruleElem.setAttribute(TQString::tqfromLatin1("function"), TQString::tqfromLatin1("notcontains"));
break;
case FilterRule::FuncEquals:
ruleElem.setAttribute(TQString::tqfromLatin1("function"), TQString::tqfromLatin1("equals"));
diff --git a/src/translators/xslthandler.cpp b/src/translators/xslthandler.cpp
index bdbe8f2..853f6a6 100644
--- a/src/translators/xslthandler.cpp
+++ b/src/translators/xslthandler.cpp
@@ -151,8 +151,8 @@ void XSLTHandler::setXSLTDoc(const TQDomDocument& dom_, const TQCString& xsltFil
for(uint j = 0; j < childs.count(); ++j) {
if(childs.item(j).isProcessingInstruction()) {
TQDomProcessingInstruction pi = childs.item(j).toProcessingInstruction();
- if(pi.data().lower().tqcontains(TQString::tqfromLatin1("encoding"))) {
- if(!pi.data().lower().tqcontains(TQString::tqfromLatin1("utf-8"))) {
+ if(pi.data().lower().contains(TQString::tqfromLatin1("encoding"))) {
+ if(!pi.data().lower().contains(TQString::tqfromLatin1("utf-8"))) {
utf8 = false;
// } else {
// myDebug() << "XSLTHandler::setXSLTDoc() - PI = " << pi.data() << endl;
@@ -188,7 +188,7 @@ void XSLTHandler::setXSLTDoc(const TQDomDocument& dom_, const TQCString& xsltFil
void XSLTHandler::addStringParam(const TQCString& name_, const TQCString& value_) {
TQCString value = value_;
- value.tqreplace('\'', "&apos;");
+ value.replace('\'', "&apos;");
addParam(name_, TQCString("'") + value + TQCString("'"));
}
diff --git a/src/translators/xsltimporter.cpp b/src/translators/xsltimporter.cpp
index eb4cd2a..3edbcf6 100644
--- a/src/translators/xsltimporter.cpp
+++ b/src/translators/xsltimporter.cpp
@@ -41,7 +41,7 @@ static bool isUTF8(const KURL& url_) {
ref->open();
TQTextStream stream(ref->file());
TQString line = stream.readLine().lower();
- return line.tqfind(TQString::tqfromLatin1("utf-8")) > 0;
+ return line.find(TQString::tqfromLatin1("utf-8")) > 0;
}
}