summaryrefslogtreecommitdiffstats
path: root/poxml
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
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')
-rw-r--r--poxml/antlr/antlr/AST.hpp2
-rw-r--r--poxml/antlr/antlr/ASTFactory.hpp2
-rw-r--r--poxml/antlr/antlr/BaseAST.hpp4
-rw-r--r--poxml/antlr/antlr/TokenStreamBasicFilter.hpp2
-rw-r--r--poxml/antlr/antlr/TokenStreamHiddenTokenFilter.hpp2
-rw-r--r--poxml/antlr/src/ASTFactory.cpp6
-rw-r--r--poxml/antlr/src/BaseAST.cpp10
-rw-r--r--poxml/antlr/src/CharScanner.cpp2
-rw-r--r--poxml/antlr/src/Makefile.am2
-rw-r--r--poxml/antlr/src/TokenStreamBasicFilter.cpp4
-rw-r--r--poxml/antlr/src/TokenStreamHiddenTokenFilter.cpp4
-rw-r--r--poxml/lauri.po6
-rw-r--r--poxml/lauri.xml6
-rw-r--r--poxml/parser.cpp136
-rw-r--r--poxml/parser.h2
-rw-r--r--poxml/po2xml.cpp26
-rw-r--r--poxml/split.cpp10
-rw-r--r--poxml/transxx.cpp12
-rw-r--r--poxml/xml2pot.cpp6
19 files changed, 122 insertions, 122 deletions
diff --git a/poxml/antlr/antlr/AST.hpp b/poxml/antlr/antlr/AST.hpp
index a36ffd15..7eb883c2 100644
--- a/poxml/antlr/antlr/AST.hpp
+++ b/poxml/antlr/antlr/AST.hpp
@@ -59,7 +59,7 @@ public:
virtual ANTLR_USE_NAMESPACE(std)vector<RefAST> findAll(RefAST t)=0;
virtual ANTLR_USE_NAMESPACE(std)vector<RefAST> findAllPartial(RefAST t)=0;
- /** Get the first child of this node; null if no children */
+ /** Get the first child of this node; null if no tqchildren */
virtual RefAST getFirstChild() const=0;
/** Get the next sibling in line after this one */
virtual RefAST getNextSibling() const=0;
diff --git a/poxml/antlr/antlr/ASTFactory.hpp b/poxml/antlr/antlr/ASTFactory.hpp
index 584cee6d..f83bec10 100644
--- a/poxml/antlr/antlr/ASTFactory.hpp
+++ b/poxml/antlr/antlr/ASTFactory.hpp
@@ -90,7 +90,7 @@ public:
RefAST dupTree(RefAST t);
/** Make a tree from a list of nodes. The first element in the
* array is the root. If the root is null, then the tree is
- * a simple list not a tree. Handles null children nodes correctly.
+ * a simple list not a tree. Handles null tqchildren nodes correctly.
* For example, build(a, b, null, c) yields tree (a b c). build(null,a,b)
* yields tree (nil a b).
*/
diff --git a/poxml/antlr/antlr/BaseAST.hpp b/poxml/antlr/antlr/BaseAST.hpp
index 7b93c1ef..bf1e1629 100644
--- a/poxml/antlr/antlr/BaseAST.hpp
+++ b/poxml/antlr/antlr/BaseAST.hpp
@@ -70,7 +70,7 @@ public:
virtual ANTLR_USE_NAMESPACE(std)vector<RefAST> findAll(RefAST t);
virtual ANTLR_USE_NAMESPACE(std)vector<RefAST> findAllPartial(RefAST t);
- /** Get the first child of this node; null if no children */
+ /** Get the first child of this node; null if no tqchildren */
virtual RefAST getFirstChild() const;
/** Get the next sibling in line after this one */
virtual RefAST getNextSibling() const;
@@ -80,7 +80,7 @@ public:
/** Get the token type for this node */
virtual int getType() const;
- /** Remove all children */
+ /** Remove all tqchildren */
virtual void removeChildren();
/** Set the first child of a node. */
diff --git a/poxml/antlr/antlr/TokenStreamBasicFilter.hpp b/poxml/antlr/antlr/TokenStreamBasicFilter.hpp
index 5438878b..9857a122 100644
--- a/poxml/antlr/antlr/TokenStreamBasicFilter.hpp
+++ b/poxml/antlr/antlr/TokenStreamBasicFilter.hpp
@@ -25,7 +25,7 @@ public:
void discard(int ttype);
- void discard(const BitSet& mask);
+ void discard(const BitSet& tqmask);
RefToken nextToken();
};
diff --git a/poxml/antlr/antlr/TokenStreamHiddenTokenFilter.hpp b/poxml/antlr/antlr/TokenStreamHiddenTokenFilter.hpp
index 47aad001..b7904ce3 100644
--- a/poxml/antlr/antlr/TokenStreamHiddenTokenFilter.hpp
+++ b/poxml/antlr/antlr/TokenStreamHiddenTokenFilter.hpp
@@ -60,7 +60,7 @@ public:
void hide(int m);
- void hide(const BitSet& mask);
+ void hide(const BitSet& tqmask);
protected:
RefToken LA(int i);
diff --git a/poxml/antlr/src/ASTFactory.cpp b/poxml/antlr/src/ASTFactory.cpp
index e44386f7..66902522 100644
--- a/poxml/antlr/src/ASTFactory.cpp
+++ b/poxml/antlr/src/ASTFactory.cpp
@@ -144,7 +144,7 @@ RefAST ASTFactory::dupList(RefAST t)
RefAST ASTFactory::dupTree(RefAST t)
{
RefAST result = dup(t); // make copy of root
- // copy all children of root.
+ // copy all tqchildren of root.
if (t) {
result->setFirstChild( dupList(t->getFirstChild()) );
}
@@ -152,7 +152,7 @@ RefAST ASTFactory::dupTree(RefAST t)
}
/** Make a tree from a list of nodes. The first element in the
* array is the root. If the root is null, then the tree is
- * a simple list not a tree. Handles null children nodes correctly.
+ * a simple list not a tree. Handles null tqchildren nodes correctly.
* For example, build(a, b, null, c) yields tree (a b c). build(null,a,b)
* yields tree (nil a b).
*/
@@ -165,7 +165,7 @@ RefAST ASTFactory::make(ANTLR_USE_NAMESPACE(std)vector<RefAST> nodes)
if (root) {
root->setFirstChild(RefAST(nullASTptr)); // don't leave any old pointers set
}
- // link in children;
+ // link in tqchildren;
for (unsigned int i=1; i<nodes.size(); i++) {
if ( !nodes[i] ) continue; // ignore null nodes
if ( !root ) {
diff --git a/poxml/antlr/src/BaseAST.cpp b/poxml/antlr/src/BaseAST.cpp
index 4080e0e8..d4b7368b 100644
--- a/poxml/antlr/src/BaseAST.cpp
+++ b/poxml/antlr/src/BaseAST.cpp
@@ -64,7 +64,7 @@ void BaseAST::doWorkForFindAll(
(!partialMatch && sibling->equalsTree(target)) ) {
v.push_back(sibling);
}
- // regardless of match or not, check any children for matches
+ // regardless of match or not, check any tqchildren for matches
if ( sibling->getFirstChild() ) {
RefBaseAST(sibling->getFirstChild())->doWorkForFindAll(v, target, partialMatch);
}
@@ -96,7 +96,7 @@ bool BaseAST::equalsList(RefAST t) const
// as a quick optimization, check roots first.
if (!sibling->equals(t))
return false;
- // if roots match, do full list match test on children.
+ // if roots match, do full list match test on tqchildren.
if (sibling->getFirstChild()) {
if (!sibling->getFirstChild()->equalsList(t->getFirstChild()))
return false;
@@ -129,7 +129,7 @@ bool BaseAST::equalsListPartial(RefAST sub) const
// as a quick optimization, check roots first.
if (!sibling->equals(sub))
return false;
- // if roots match, do partial list match test on children.
+ // if roots match, do partial list match test on tqchildren.
if (sibling->getFirstChild())
if (!sibling->getFirstChild()->equalsListPartial(sub->getFirstChild()))
return false;
@@ -151,7 +151,7 @@ bool BaseAST::equalsTree(RefAST t) const
// check roots first
if (!equals(t))
return false;
- // if roots match, do full list match test on children.
+ // if roots match, do full list match test on tqchildren.
if (getFirstChild()) {
if (!getFirstChild()->equalsList(t->getFirstChild()))
return false;
@@ -175,7 +175,7 @@ bool BaseAST::equalsTreePartial(RefAST sub) const
// check roots first
if (!equals(sub))
return false;
- // if roots match, do full list partial match test on children.
+ // if roots match, do full list partial match test on tqchildren.
if (getFirstChild())
if (!getFirstChild()->equalsListPartial(sub->getFirstChild()))
return false;
diff --git a/poxml/antlr/src/CharScanner.cpp b/poxml/antlr/src/CharScanner.cpp
index ff40138d..93080338 100644
--- a/poxml/antlr/src/CharScanner.cpp
+++ b/poxml/antlr/src/CharScanner.cpp
@@ -55,7 +55,7 @@ ANTLR_C_USING(exit)
ANTLR_C_USING(tolower)
#ifdef ANTLR_REALLY_NO_STRCASECMP
-// Apparently, neither strcasecmp nor stricmp is standard, and Codewarrior
+// Aptqparently, neither strcasecmp nor stricmp is standard, and Codewarrior
// on the mac has neither...
inline int strcasecmp(const char *s1, const char *s2)
{
diff --git a/poxml/antlr/src/Makefile.am b/poxml/antlr/src/Makefile.am
index 7a5d2426..99008d3b 100644
--- a/poxml/antlr/src/Makefile.am
+++ b/poxml/antlr/src/Makefile.am
@@ -1,6 +1,6 @@
# Make #include <antlr/xxx> work..
-INCLUDES=-I$(srcdir)/..
+INCLUDES=-I$(srcdir)/.. $(all_includes)
KDE_CXXFLAGS = $(USE_EXCEPTIONS)
noinst_LTLIBRARIES = libantlr.la
diff --git a/poxml/antlr/src/TokenStreamBasicFilter.cpp b/poxml/antlr/src/TokenStreamBasicFilter.cpp
index 71257f46..82922967 100644
--- a/poxml/antlr/src/TokenStreamBasicFilter.cpp
+++ b/poxml/antlr/src/TokenStreamBasicFilter.cpp
@@ -16,9 +16,9 @@ void TokenStreamBasicFilter::discard(int ttype)
discardMask.add(ttype);
}
-void TokenStreamBasicFilter::discard(const BitSet& mask)
+void TokenStreamBasicFilter::discard(const BitSet& tqmask)
{
- discardMask = mask;
+ discardMask = tqmask;
}
RefToken TokenStreamBasicFilter::nextToken()
diff --git a/poxml/antlr/src/TokenStreamHiddenTokenFilter.cpp b/poxml/antlr/src/TokenStreamHiddenTokenFilter.cpp
index 827ca382..5325fed2 100644
--- a/poxml/antlr/src/TokenStreamHiddenTokenFilter.cpp
+++ b/poxml/antlr/src/TokenStreamHiddenTokenFilter.cpp
@@ -86,9 +86,9 @@ void TokenStreamHiddenTokenFilter::hide(int m)
hideMask.add(m);
}
-void TokenStreamHiddenTokenFilter::hide(const BitSet& mask)
+void TokenStreamHiddenTokenFilter::hide(const BitSet& tqmask)
{
- hideMask = mask;
+ hideMask = tqmask;
}
RefToken TokenStreamHiddenTokenFilter::LA(int i)
diff --git a/poxml/lauri.po b/poxml/lauri.po
index 9dd0d025..553253d5 100644
--- a/poxml/lauri.po
+++ b/poxml/lauri.po
@@ -299,7 +299,7 @@ msgstr "Der schlimme Teil"
msgid "Ending Text:"
msgstr "Ende:"
-#. Tag: literallayout
+#. Tag: literaltqlayout
#: lauri.xml:143
#, no-c-format
msgid ""
@@ -407,7 +407,7 @@ msgid ""
"-&gt; int penWidth()\n"
"-&gt; { return pen.width(); }\n"
"\n"
-" public slots:\n"
+" public Q_SLOTS:\n"
" void updateAllViews(KScribbleView *sender);\n"
" \n"
" protected:\n"
@@ -429,7 +429,7 @@ msgstr ""
" \n"
"-&gt; int penWidth()\n"
"-&gt; { return pen.width(); }\n"
-" public slots:\n"
+" public Q_SLOTS:\n"
" void updateAllViews(KScribbleView *sender);\n"
" \n"
" protected:\n"
diff --git a/poxml/lauri.xml b/poxml/lauri.xml
index 27715981..35448f0c 100644
--- a/poxml/lauri.xml
+++ b/poxml/lauri.xml
@@ -165,7 +165,7 @@ editor.</action></para>
<para>
Ending Text:
-<literallayout>
+<literaltqlayout>
Matthias Hoelzer
KDE-Verein i.G.
Account-Nr. 2798296
@@ -180,7 +180,7 @@ SWIFT-Address: BYLA DE 77
print "$b4 /path/to/KDE/libs/libpng.a $af\n"; \
you see it here
whereever
-</literallayout>
+</literaltqlayout>
</para>
<para>
<screen>
@@ -221,7 +221,7 @@ Send ppp
-&gt; int penWidth()
-&gt; { return pen.width(); }
- public slots:
+ public Q_SLOTS:
void updateAllViews(KScribbleView *sender);
protected:
diff --git a/poxml/parser.cpp b/poxml/parser.cpp
index 2f0f7e16..80810eeb 100644
--- a/poxml/parser.cpp
+++ b/poxml/parser.cpp
@@ -44,7 +44,7 @@ static const char *cuttingtags[] = {"bridgehead", "trans_comment", "para", "titl
"revdescription", "glossentry", "partinfo",
"segmentedlist", "segtitle", "seg", "seglistitem", "screenco",
0};
-static const char *literaltags[] = {"literallayout", "synopsis", "screen",
+static const char *literaltags[] = {"literaltqlayout", "synopsis", "screen",
"programlisting", 0};
bool StructureParser::fatalError ( const TQXmlParseException &e )
@@ -99,7 +99,7 @@ bool StructureParser::isLiteralTag(const TQString &qName)
bool StructureParser::skippedEntity ( const TQString & name )
{
if (inside)
- message += TQString("&%1;").arg(name);
+ message += TQString("&%1;").tqarg(name);
return true;
}
@@ -113,7 +113,7 @@ bool StructureParser::startElement( const TQString& , const TQString& ,
if (isCuttingTag(tname)) {
if (!inside) {
- message = TQString::null;
+ message = TQString();
list.pc.increasePara();
startline = locator->lineNumber();
startcol = locator->columnNumber();
@@ -126,10 +126,10 @@ bool StructureParser::startElement( const TQString& , const TQString& ,
{
TQString tmp = "<" + tname;
for (int i = 0; i < attr.length(); i++) {
- tmp += TQString(" %1=\"%2\"").arg(attr.qName(i)).arg(attr.value(i));
+ tmp += TQString(" %1=\"%2\"").tqarg(attr.qName(i)).tqarg(attr.value(i));
}
- tmp += TQString(" poxml_line=\"%1\"").arg(locator->lineNumber());
- tmp += TQString(" poxml_col=\"%1\"").arg(locator->columnNumber());
+ tmp += TQString(" poxml_line=\"%1\"").tqarg(locator->lineNumber());
+ tmp += TQString(" poxml_col=\"%1\"").tqarg(locator->columnNumber());
if (isSingleTag(qName))
tmp += "/>";
@@ -180,8 +180,8 @@ bool StructureParser::closureTag(const TQString& message, const TQString &tag)
uint index = 0;
while (true)
{
- int nextclose = message.find(TQRegExp(TQString::fromLatin1("</%1[\\s>]").arg(tag)), index);
- int nextstart = message.find(TQRegExp(TQString::fromLatin1("<%1[>\\s]").arg(tag)), index);
+ int nextclose = message.tqfind(TQRegExp(TQString::tqfromLatin1("</%1[\\s>]").tqarg(tag)), index);
+ int nextstart = message.tqfind(TQRegExp(TQString::tqfromLatin1("<%1[>\\s]").tqarg(tag)), index);
// qDebug("finding %d %d %d %d", nextstart, nextclose, index, inside);
if (nextclose == -1) {
#ifdef POXML_DEBUG
@@ -223,7 +223,7 @@ void StructureParser::descape(TQString &message)
bool lastws = false;
while (index < message.length()) {
- switch (message.at(index).latin1()) {
+ switch (message.tqat(index).latin1()) {
case '\n':
case '\t':
case '\r':
@@ -254,7 +254,7 @@ void StructureParser::descape(TQString &message)
index++;
}
- message.replace(TQRegExp("\010"), "");
+ message.tqreplace(TQRegExp("\010"), "");
}
bool StructureParser::formatMessage(MsgBlock &msg) const
@@ -278,7 +278,7 @@ bool StructureParser::formatMessage(MsgBlock &msg) const
{
int slen = strlen(singletags[index]);
- if (msg.msgid.left(slen + 1) == TQString::fromLatin1("<%1").arg(singletags[index]) &&
+ if (msg.msgid.left(slen + 1) == TQString::tqfromLatin1("<%1").tqarg(singletags[index]) &&
!msg.msgid.at( slen + 1 ).isLetterOrNumber() )
{
#ifdef POXML_DEBUG
@@ -327,8 +327,8 @@ bool StructureParser::formatMessage(MsgBlock &msg) const
TQString orig = msg.msgid;
TQString endtag = msg.msgid.mid(endindex + 2, msg.msgid.length() - (endindex + 2) - 1);
- TQString endtag_attr = endtag.mid(endtag.find(' '), endtag.length());
- endtag.replace(infos_reg, "");
+ TQString endtag_attr = endtag.mid(endtag.tqfind(' '), endtag.length());
+ endtag.tqreplace(infos_reg, "");
if (endtag == starttag) {
if (!closureTag(msg.msgid, starttag))
break;
@@ -418,9 +418,9 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
#endif
// the exception for poxml_* attributes is made in the closing tag
- int closing_index = message.find(TQRegExp(TQString::fromLatin1("</%1[\\s>]").arg(tag)),
+ int closing_index = message.tqfind(TQRegExp(TQString::tqfromLatin1("</%1[\\s>]").tqarg(tag)),
strindex);
- int starting_index = message.find(TQRegExp(TQString::fromLatin1("<%1[\\s>]").arg(tag)),
+ int starting_index = message.tqfind(TQRegExp(TQString::tqfromLatin1("<%1[\\s>]").tqarg(tag)),
strindex);
#ifdef POXML_DEBUG
@@ -510,8 +510,8 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
while (endindex >= 0 && (message.at(endindex) != '<' || message.at(endindex + 1) != '/'))
endindex--;
TQString tag = message.mid(endindex + 2, message.length() - endindex - 3);
- if (tag.find(' ') > 0 ) {
- tag = tag.left(tag.find(' '));
+ if (tag.tqfind(' ') > 0 ) {
+ tag = tag.left(tag.tqfind(' '));
}
#ifdef POXML_DEBUG
qDebug("behind tag %s", tag.latin1());
@@ -529,9 +529,9 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
qDebug("inside %s %d", message.mid(strindex, 35).latin1(), inside);
#endif
- int closing_index = message.findRev(TQRegExp(TQString::fromLatin1("</%1[\\s>]").arg(tag)),
+ int closing_index = message.tqfindRev(TQRegExp(TQString::tqfromLatin1("</%1[\\s>]").tqarg(tag)),
strindex - 1);
- int starting_index = message.findRev(TQRegExp(TQString::fromLatin1("<%1[\\s>]").arg(tag)),
+ int starting_index = message.tqfindRev(TQRegExp(TQString::tqfromLatin1("<%1[\\s>]").tqarg(tag)),
strindex - 1);
#ifdef POXML_DEBUG
@@ -601,9 +601,9 @@ bool StructureParser::endElement( const TQString& , const TQString&, const TQStr
if (inside) {
if (!isSingleTag(qName)) {
- message += TQString("</%1").arg(tname);
- message += TQString(" poxml_line=\"%1\"").arg(locator->lineNumber());
- message += TQString(" poxml_col=\"%1\"").arg(locator->columnNumber());
+ message += TQString("</%1").tqarg(tname);
+ message += TQString(" poxml_line=\"%1\"").tqarg(locator->lineNumber());
+ message += TQString(" poxml_col=\"%1\"").tqarg(locator->columnNumber());
message += ">";
}
}
@@ -640,7 +640,7 @@ bool StructureParser::endElement( const TQString& , const TQString&, const TQStr
(*it).lines.first().offset = 0;
}
}
- (*it).msgid.replace(infos_reg, TQString::null);
+ (*it).msgid.tqreplace(infos_reg, TQString());
if (!(*it).msgid.isEmpty())
list.append(*it);
@@ -663,11 +663,11 @@ bool StructureParser::comment ( const TQString &c )
TQString StructureParser::escapeLiterals( const TQString &_contents) {
TQString contents = _contents;
- contents.replace(TQRegExp("\n"), "&POXML_LINEFEED;");
- contents.replace(TQRegExp("<"), "&POXML_LT;");
- contents.replace(TQRegExp(">"), "&POXML_GT;");
- contents.replace(TQRegExp("\t"), " ");
- contents.replace(TQRegExp(" "), "&POXML_SPACE;");
+ contents.tqreplace(TQRegExp("\n"), "&POXML_LINEFEED;");
+ contents.tqreplace(TQRegExp("<"), "&POXML_LT;");
+ contents.tqreplace(TQRegExp(">"), "&POXML_GT;");
+ contents.tqreplace(TQRegExp("\t"), " ");
+ contents.tqreplace(TQRegExp(" "), "&POXML_SPACE;");
return contents;
}
@@ -675,11 +675,11 @@ TQString StructureParser::escapeLiterals( const TQString &_contents) {
TQString StructureParser::descapeLiterals( const TQString &_contents) {
TQString contents = _contents;
- contents.replace(TQRegExp("&POXML_LINEFEED;"), "\n");
- contents.replace(TQRegExp("&POXML_LT;"), "<");
- contents.replace(TQRegExp("&POXML_GT;"), ">");
- contents.replace(TQRegExp("&POXML_SPACE;"), " ");
- contents.replace(TQRegExp("!POXML_AMP!"), "&");
+ contents.tqreplace(TQRegExp("&POXML_LINEFEED;"), "\n");
+ contents.tqreplace(TQRegExp("&POXML_LT;"), "<");
+ contents.tqreplace(TQRegExp("&POXML_GT;"), ">");
+ contents.tqreplace(TQRegExp("&POXML_SPACE;"), " ");
+ contents.tqreplace(TQRegExp("!POXML_AMP!"), "&");
return contents;
}
@@ -710,23 +710,23 @@ void StructureParser::stripWhiteSpace( TQString &contents)
void StructureParser::cleanupTags( TQString &contents )
{
- contents.replace(TQRegExp("&"), "!POXML_AMP!");
+ contents.tqreplace(TQRegExp("&"), "!POXML_AMP!");
for (int index = 0; literaltags[index]; index++) {
- TQRegExp start(TQString("<%1[\\s>]").arg(literaltags[index]));
- TQRegExp end(TQString("</%1[\\s>]").arg(literaltags[index]));
+ TQRegExp start(TQString("<%1[\\s>]").tqarg(literaltags[index]));
+ TQRegExp end(TQString("</%1[\\s>]").tqarg(literaltags[index]));
int strindex = 0;
while (true) {
- strindex = contents.find(start, strindex);
+ strindex = contents.tqfind(start, strindex);
if (strindex < 0)
break;
while (contents.at(strindex) != '>')
strindex++;
strindex++; // one more
- int endindex = contents.find(end, strindex);
+ int endindex = contents.tqfind(end, strindex);
TQString part = contents.mid(strindex, endindex - strindex);
TQString newpart = escapeLiterals(part);
- contents.replace(strindex, part.length(), newpart);
+ contents.tqreplace(strindex, part.length(), newpart);
// this assumes that literal tags to not overlap
strindex = strindex + newpart.length();
}
@@ -739,7 +739,7 @@ void StructureParser::cleanupTags( TQString &contents )
if (index < 0)
break;
TQString tag = unclosed.cap(1);
- contents.replace(index, unclosed.matchedLength(), TQString("</%1>").arg(tag));
+ contents.tqreplace(index, unclosed.matchedLength(), TQString("</%1>").tqarg(tag));
}
TQRegExp start("<((\\s*[^<>\\s])*)\\s\\s*(/*)>");
@@ -753,7 +753,7 @@ void StructureParser::cleanupTags( TQString &contents )
TQString tag = start.cap(1);
TQString cut = start.capturedTexts().last();
// qDebug("UNCLO %s %d -%s- -%s-", start.cap(0).latin1(), index, tag.latin1(), cut.latin1());
- contents.replace(index, start.matchedLength(), TQString("<%1%2>").arg(tag).arg(cut));
+ contents.tqreplace(index, start.matchedLength(), TQString("<%1%2>").tqarg(tag).tqarg(cut));
}
TQRegExp singletag("<(\\w*)\\s([^><]*)/>");
@@ -764,7 +764,7 @@ void StructureParser::cleanupTags( TQString &contents )
break;
TQString tag = singletag.cap(1);
if (!StructureParser::isSingleTag(tag)) {
- contents.replace(index, singletag.matchedLength(), TQString("<%1 %2></%3>").arg(tag).arg(singletag.cap(2)).arg(tag));
+ contents.tqreplace(index, singletag.matchedLength(), TQString("<%1 %2></%3>").tqarg(tag).tqarg(singletag.cap(2)).tqarg(tag));
}
}
@@ -775,7 +775,7 @@ void StructureParser::cleanupTags( TQString &contents )
if (index < 0)
break;
TQString msgid = trans_comment.cap(1);
- contents.replace(index, trans_comment.matchedLength(), TQString("<trans_comment>%1</trans_comment>").arg(msgid));
+ contents.tqreplace(index, trans_comment.matchedLength(), TQString("<trans_comment>%1</trans_comment>").tqarg(msgid));
}
#ifdef POXML_DEBUG
@@ -788,14 +788,14 @@ static bool removeEmptyTag( TQString &contents, const TQString & tag)
{
// qDebug("cont %s %s", contents.latin1(), tag.latin1());
- TQRegExp empty(TQString("<%1[^>]*>[\\s\n][\\s\n]*</%2\\s*>").arg(tag).arg(tag));
+ TQRegExp empty(TQString("<%1[^>]*>[\\s\n][\\s\n]*</%2\\s*>").tqarg(tag).tqarg(tag));
int strindex = 0;
while (true) {
- strindex = contents.find(empty, strindex);
+ strindex = contents.tqfind(empty, strindex);
if (strindex < 0)
break;
qDebug("found empty tag %s", tag.latin1());
- contents.replace(strindex, empty.matchedLength(), " ");
+ contents.tqreplace(strindex, empty.matchedLength(), " ");
strindex++;
return true;
}
@@ -831,8 +831,8 @@ bool StructureParser::characters(const TQString &ch)
TQString escape(TQString message)
{
- message.replace(TQRegExp("\\\\"), "\\\\");
- message.replace(TQRegExp("\""), "\\\"");
+ message.tqreplace(TQRegExp("\\\\"), "\\\\");
+ message.tqreplace(TQRegExp("\""), "\\\"");
return message;
}
@@ -871,46 +871,46 @@ TQString escapePO(TQString msgid)
{
int index = 0;
while (true) {
- index = msgid.find("\\n", index);
+ index = msgid.tqfind("\\n", index);
if (index == -1)
break;
if (index >= 1 && msgid.at(index - 1) == '\\' && msgid.at(index - 2) != '\\') {
- msgid.replace(index - 1, 3, "&POXML_LITERALLINEFEED;");
+ msgid.tqreplace(index - 1, 3, "&POXML_LITERALLINEFEED;");
index += 3;
} else
- msgid.replace(index, 2, "\n");
+ msgid.tqreplace(index, 2, "\n");
}
index = 0;
while (true) {
- index = msgid.find("\\\"", index);
+ index = msgid.tqfind("\\\"", index);
if (index == -1)
break;
if (index > 1 && msgid.at(index - 1) == '\\' && msgid.at(index - 2) != '\\')
- msgid.replace(index - 1, 3, "&POXML_LITERALQUOTE;");
+ msgid.tqreplace(index - 1, 3, "&POXML_LITERALTQUOTE;");
else
- msgid.replace(index, 2, "\"");
+ msgid.tqreplace(index, 2, "\"");
}
index = 0;
while (true) {
- index = msgid.find("\\t", index);
+ index = msgid.tqfind("\\t", index);
if (index == -1)
break;
if (msgid.at(index - 1) == '\\')
- msgid.replace(index - 1, 3, "\\t");
+ msgid.tqreplace(index - 1, 3, "\\t");
else
- msgid.replace(index, 2, "\t");
+ msgid.tqreplace(index, 2, "\t");
}
index = 0;
while (true) {
- index = msgid.find("\\\\", index);
+ index = msgid.tqfind("\\\\", index);
if (index == -1)
break;
- msgid.replace(index, 2, "\\");
+ msgid.tqreplace(index, 2, "\\");
index += 1;
}
- msgid.replace(TQRegExp("&POXML_LITERALLINEFEED;"), "\\n");
- msgid.replace(TQRegExp("&POXML_LITERALQUOTE;"), "\\");
+ msgid.tqreplace(TQRegExp("&POXML_LITERALLINEFEED;"), "\\n");
+ msgid.tqreplace(TQRegExp("&POXML_LITERALTQUOTE;"), "\\");
return msgid;
}
@@ -930,7 +930,7 @@ MsgList parseXML(const char *filename)
StructureParser::cleanupTags(contents);
while (true) {
- int index = contents.find("<!ENTITY");
+ int index = contents.tqfind("<!ENTITY");
if (index < 0)
break;
int inside = 0;
@@ -938,7 +938,7 @@ MsgList parseXML(const char *filename)
TQString replacement = "";
while (contents.at(endindex) != '>' || inside)
{
- switch (contents.at(endindex).latin1()) {
+ switch (contents.tqat(endindex).latin1()) {
case '<':
inside++; break;
case '>':
@@ -952,7 +952,7 @@ MsgList parseXML(const char *filename)
endindex++;
}
endindex++;
- contents.replace(index, endindex - index, replacement);
+ contents.tqreplace(index, endindex - index, replacement);
}
TQTextStream ts(contents.utf8(), IO_ReadOnly);
@@ -975,10 +975,10 @@ MsgList parseXML(const char *filename)
for (MsgList::Iterator it = english.begin();
it != english.end(); it++)
{
- TQMap<TQString,TQString>::Iterator found = msgids.find((*it).msgid);
+ TQMap<TQString,TQString>::Iterator found = msgids.tqfind((*it).msgid);
if ((*it).msgid.length() < 4) {
- (*it).msgid = TQString("<%1>").arg((*it).tag) + (*it).msgid +
- TQString("</%1>").arg((*it).tag);
+ (*it).msgid = TQString("<%1>").tqarg((*it).tag) + (*it).msgid +
+ TQString("</%1>").tqarg((*it).tag);
changed = true;
break;
}
@@ -993,7 +993,7 @@ MsgList parseXML(const char *filename)
it2 != english.end(); it2++)
{
if ((*it2).msgid == msgid)
- (*it2).msgid = TQString("<%1>").arg((*it2).tag) + msgid + TQString("</%1>").arg((*it2).tag);
+ (*it2).msgid = TQString("<%1>").tqarg((*it2).tag) + msgid + TQString("</%1>").tqarg((*it2).tag);
}
break;
}
diff --git a/poxml/parser.h b/poxml/parser.h
index 923723c5..2a2ebab0 100644
--- a/poxml/parser.h
+++ b/poxml/parser.h
@@ -73,7 +73,7 @@ public:
ParaCounter pc;
};
-class StructureParser : public QXmlDefaultHandler
+class StructureParser : public TQXmlDefaultHandler
{
public:
bool startDocument();
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;
}
}
diff --git a/poxml/split.cpp b/poxml/split.cpp
index 29104d3e..fa8faab1 100644
--- a/poxml/split.cpp
+++ b/poxml/split.cpp
@@ -36,7 +36,7 @@ int main( int argc, char **argv )
if (report_mismatches && errors.count()) {
for (TQMap<int, TQString>::ConstIterator it = errors.begin(); it != errors.end(); ++it)
{
- if (translated.pc.anchors.contains(it.data()))
+ if (translated.pc.anchors.tqcontains(it.data()))
fprintf(stderr, "id=\"%s\" not in the same paragraphs (%d vs %d)\n", it.data().latin1(),
english.pc.anchors[it.data()], translated.pc.anchors[it.data()]);
else {
@@ -65,7 +65,7 @@ int main( int argc, char **argv )
it != english.end(); )
{
if ((*it).msgid == "ROLES_OF_TRANSLATORS") {
- if ((*it).msgstr.length() && !(*it).msgstr.contains("ROLES_OF_TRANSLATORS")) {
+ if ((*it).msgstr.length() && !(*it).msgstr.tqcontains("ROLES_OF_TRANSLATORS")) {
have_roles_of_translators = true;
}
else {
@@ -77,7 +77,7 @@ int main( int argc, char **argv )
}
if ((*it).msgid == "CREDIT_FOR_TRANSLATORS") {
- if ((*it).msgstr.length() && !(*it).msgstr.contains("CREDIT_FOR_TRANSLATORS")) {
+ if ((*it).msgstr.length() && !(*it).msgstr.tqcontains("CREDIT_FOR_TRANSLATORS")) {
have_credit_for_translators = true;
}
else {
@@ -88,7 +88,7 @@ int main( int argc, char **argv )
continue;
}
- if (msgids.contains((*it).msgid)) {
+ if (msgids.tqcontains((*it).msgid)) {
english[msgids[(*it).msgid]].lines += (*it).lines;
if (english[msgids[(*it).msgid]].msgstr != (*it).msgstr) {
fprintf(stderr, "two different translations for \"%s\" (\"%s\" and \"%s\") - choosing first one\n",
@@ -112,7 +112,7 @@ int main( int argc, char **argv )
while (tit != translated.end())
{
MsgBlock mb;
- mb.msgid = TQString::fromLatin1("appended paragraph %1").arg(counter++);
+ mb.msgid = TQString::tqfromLatin1("appended paragraph %1").tqarg(counter++);
mb.msgstr = (*tit).msgid;
mb.lines += (*tit).lines;
english.append(mb);
diff --git a/poxml/transxx.cpp b/poxml/transxx.cpp
index d876d56c..92004372 100644
--- a/poxml/transxx.cpp
+++ b/poxml/transxx.cpp
@@ -42,7 +42,7 @@ int main(int argc, char **argv)
return 1;
}
- const bool is_desktop = filename.find( "desktop_") >= 0;
+ const bool is_desktop = filename.tqfind( "desktop_") >= 0;
// The header is the last item (due too the sorting)
MsgList::const_iterator header = --translated.end();
@@ -62,7 +62,7 @@ int main(int argc, char **argv)
headerLines.gres( TQRegExp( "^Last-Translator:.*" ), "Last-Translator: transxx program <null@kde.org>" );
headerLines.gres( TQRegExp( "^Language-Team:.*" ), "Language-Team: Test Language <kde-i18n-doc@kde.org>" );
TQString revisionDate ( "PO-Revision-Date: " );
- const TQDateTime dt = TQDateTime::currentDateTime( Qt::UTC );
+ const TQDateTime dt = TQDateTime::tqcurrentDateTime( Qt::UTC );
revisionDate += dt.toString( "yyyy-MM-dd hh:mm+0000" );
headerLines.gres( TQRegExp( "^PO-Revision-Date:.*" ), revisionDate );
headerLines << "Plural-Forms: nplurals=1; plural=0;";
@@ -85,22 +85,22 @@ int main(int argc, char **argv)
TQString msgstr;
- if ( msgid.find( "Definition of PluralForm" ) != -1 ) {
+ if ( msgid.tqfind( "Definition of PluralForm" ) != -1 ) {
outputMsg("msgstr", "NoPlural");
cout << "\n";
continue;
}
if ( is_desktop ) {
- msgstr = msgid.left( msgid.find( '=' ) + 1);
- msgstr += translation + msgid.mid( msgid.find( '=' ) + 1) + translation;
+ msgstr = msgid.left( msgid.tqfind( '=' ) + 1);
+ msgstr += translation + msgid.mid( msgid.tqfind( '=' ) + 1) + translation;
outputMsg( "msgstr", escapePO(msgstr) );
cout << "\n";
continue;
}
if (msgid.startsWith("_n: ") || msgid.startsWith("_: ") ) { // KDE extentions
- msgid = msgid.mid(msgid.find("\\n") + 2, msgid.length());
+ msgid = msgid.mid(msgid.tqfind("\\n") + 2, msgid.length());
}
if (msgid.endsWith("%"))
diff --git a/poxml/xml2pot.cpp b/poxml/xml2pot.cpp
index 340d4689..d73542d7 100644
--- a/poxml/xml2pot.cpp
+++ b/poxml/xml2pot.cpp
@@ -21,7 +21,7 @@ int main( int argc, char **argv )
for (MsgList::Iterator it = english.begin();
it != english.end(); )
{
- if (msgids.contains((*it).msgid)) {
+ if (msgids.tqcontains((*it).msgid)) {
english[msgids[(*it).msgid]].lines += (*it).lines;
MsgList::Iterator tmp = it;
it++;
@@ -33,7 +33,7 @@ int main( int argc, char **argv )
}
}
- const TQDateTime now = TQDateTime::currentDateTime( Qt::UTC );
+ const TQDateTime now = TQDateTime::tqcurrentDateTime( Qt::UTC );
cout << "# SOME DESCRIPTIVE TITLE.\n";
cout << "# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n";
@@ -57,7 +57,7 @@ int main( int argc, char **argv )
for (MsgList::ConstIterator it = english.begin();
it != english.end(); ++it)
{
- cout << "#. Tag: " << (*it).tag.utf8() << endl;
+ cout << "#. Tag: " << (*it).tag.utf8().data() << endl;
cout << "#: ";
for (TQValueList<BlockInfo>::ConstIterator it2 =
(*it).lines.begin(); it2 != (*it).lines.end(); it2++) {