diff options
Diffstat (limited to 'poxml/po2xml.cpp')
-rw-r--r-- | poxml/po2xml.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/poxml/po2xml.cpp b/poxml/po2xml.cpp index c30a340f..314b0b5b 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.find('>'); + int index = xml.tqfind('>'); 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.find(orig); + int index = xml.tqfind(orig); if (index == -1) { - qWarning("can't find\n%s\nin\n%s", orig.latin1(), xml.latin1()); + qWarning("can't tqfind\n%s\nin\n%s", orig.latin1(), xml.latin1()); exit(1); } if (!translation.isEmpty()) - xml.replace(index, orig.length(), translation); + xml.tqreplace(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.find("fuzzy") < 0) + if ((*it).comment.tqfind("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.find('\n', index) + 1; + index = xml_text.tqfind('\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.find("<!--"); + index = xml.tqfind("<!--"); if (index == -1) break; int end_index = index + 4; @@ -147,13 +147,13 @@ int main( int argc, char **argv ) { end_index++; } - xml.replace(index, end_index + 1 - index, " "); + xml.tqreplace(index, end_index + 1 - index, " "); index = end_index; } StructureParser::descape(xml); TQString descaped = StructureParser::descapeLiterals((*it).msgid); - if (translations.contains(descaped)) + if (translations.tqcontains(descaped)) descaped = translations[descaped]; #ifdef POXML_DEBUG @@ -236,21 +236,21 @@ int main( int argc, char **argv ) ts << xml_text.mid(old_pos); - output.replace(TQRegExp("<trans_comment\\s*>"), ""); - output.replace(TQRegExp("</trans_comment\\s*>"), ""); + output.tqreplace(TQRegExp("<trans_comment\\s*>"), ""); + output.tqreplace(TQRegExp("</trans_comment\\s*>"), ""); StructureParser::removeEmptyTags(output); index = 0; while (true) { - index = output.find(TQRegExp(">[^\n]"), index ); + index = output.tqfind(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.replace( index, 1, "\n>" ); + output.tqreplace( index, 1, "\n>" ); index = index + 2; } } |