summaryrefslogtreecommitdiffstats
path: root/poxml/po2xml.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /poxml/po2xml.cpp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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 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;
}
}