summaryrefslogtreecommitdiffstats
path: root/poxml/po2xml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'poxml/po2xml.cpp')
-rw-r--r--poxml/po2xml.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/poxml/po2xml.cpp b/poxml/po2xml.cpp
index 314b0b5b..c30a340f 100644
--- a/poxml/po2xml.cpp
+++ b/poxml/po2xml.cpp
@@ -19,7 +19,7 @@ TQString translate(TQString xml, TQString orig, TQString translation)
TQString prefix;
while (xml.at(0) == '<' && orig.at(0) != '<') {
// a XML tag as prefix
- int index = xml.tqfind('>');
+ int index = xml.find('>');
assert(index != -1);
index++;
while (xml.at(index) == ' ')
@@ -28,13 +28,13 @@ TQString translate(TQString xml, TQString orig, TQString translation)
xml = xml.mid(index, xml.length());
}
- int index = xml.tqfind(orig);
+ int index = xml.find(orig);
if (index == -1) {
- qWarning("can't tqfind\n%s\nin\n%s", orig.latin1(), xml.latin1());
+ qWarning("can't find\n%s\nin\n%s", orig.latin1(), xml.latin1());
exit(1);
}
if (!translation.isEmpty())
- xml.tqreplace(index, orig.length(), translation);
+ xml.replace(index, orig.length(), translation);
return prefix + xml;
}
@@ -65,7 +65,7 @@ int main( int argc, char **argv )
{
TQString msgstr;
TQString msgid = escapePO((*it).msgid);
- if ((*it).comment.tqfind("fuzzy") < 0)
+ if ((*it).comment.find("fuzzy") < 0)
msgstr = escapePO((*it).msgstr);
#ifdef POXML_DEBUG
@@ -88,7 +88,7 @@ int main( int argc, char **argv )
line_offsets.append(0);
int index = 0;
while (true) {
- index = xml_text.tqfind('\n', index) + 1;
+ index = xml_text.find('\n', index) + 1;
if (index <= 0)
break;
line_offsets.append(index);
@@ -137,7 +137,7 @@ int main( int argc, char **argv )
TQString xml = xml_text.mid(start_pos, end_pos - start_pos);
int index = 0;
while (true) {
- index = xml.tqfind("<!--");
+ index = xml.find("<!--");
if (index == -1)
break;
int end_index = index + 4;
@@ -147,13 +147,13 @@ int main( int argc, char **argv )
{
end_index++;
}
- xml.tqreplace(index, end_index + 1 - index, " ");
+ xml.replace(index, end_index + 1 - index, " ");
index = end_index;
}
StructureParser::descape(xml);
TQString descaped = StructureParser::descapeLiterals((*it).msgid);
- if (translations.tqcontains(descaped))
+ if (translations.contains(descaped))
descaped = translations[descaped];
#ifdef POXML_DEBUG
@@ -236,21 +236,21 @@ int main( int argc, char **argv )
ts << xml_text.mid(old_pos);
- output.tqreplace(TQRegExp("<trans_comment\\s*>"), "");
- output.tqreplace(TQRegExp("</trans_comment\\s*>"), "");
+ output.replace(TQRegExp("<trans_comment\\s*>"), "");
+ output.replace(TQRegExp("</trans_comment\\s*>"), "");
StructureParser::removeEmptyTags(output);
index = 0;
while (true) {
- index = output.tqfind(TQRegExp(">[^\n]"), index );
+ index = output.find(TQRegExp(">[^\n]"), index );
if ( index == -1 )
break;
if ( output.at( index - 1 ) == '/' || output.at( index - 1 ) == '-' ||
output.at( index - 1 ) == ']' || output.at( index - 1 ) == '?' )
index = index + 1;
else {
- output.tqreplace( index, 1, "\n>" );
+ output.replace( index, 1, "\n>" );
index = index + 2;
}
}