diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-01 13:36:05 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-01 13:36:05 -0600 |
commit | dd844d7919e7f0f95c010378e7af1434ea904fff (patch) | |
tree | 50727ca63550e4397ff76e4d039c162e225d59fc /poxml | |
parent | 7df4eaa9f8fa84d2b859cc59d21134cc2334651c (diff) | |
download | tdesdk-dd844d7919e7f0f95c010378e7af1434ea904fff.tar.gz tdesdk-dd844d7919e7f0f95c010378e7af1434ea904fff.zip |
Rename additional global TQt functions
Diffstat (limited to 'poxml')
-rw-r--r-- | poxml/parser.cpp | 56 | ||||
-rw-r--r-- | poxml/po2xml.cpp | 12 | ||||
-rw-r--r-- | poxml/split.cpp | 2 | ||||
-rw-r--r-- | poxml/swappo.cpp | 2 | ||||
-rw-r--r-- | poxml/transxx.cpp | 4 | ||||
-rw-r--r-- | poxml/xml2pot.cpp | 2 |
6 files changed, 39 insertions, 39 deletions
diff --git a/poxml/parser.cpp b/poxml/parser.cpp index be06d80a..fc19468d 100644 --- a/poxml/parser.cpp +++ b/poxml/parser.cpp @@ -173,7 +173,7 @@ bool StructureParser::isClosure(const TQString &message) bool StructureParser::closureTag(const TQString& message, const TQString &tag) { #ifdef POXML_DEBUG - qDebug("closureTag %s %s", message.latin1(), tag.latin1()); + tqDebug("closureTag %s %s", message.latin1(), tag.latin1()); #endif int inside = 0; @@ -182,10 +182,10 @@ bool StructureParser::closureTag(const TQString& message, const TQString &tag) { int nextclose = message.find(TQRegExp(TQString::fromLatin1("</%1[\\s>]").arg(tag)), index); int nextstart = message.find(TQRegExp(TQString::fromLatin1("<%1[>\\s]").arg(tag)), index); - // qDebug("finding %d %d %d %d", nextstart, nextclose, index, inside); + // tqDebug("finding %d %d %d %d", nextstart, nextclose, index, inside); if (nextclose == -1) { #ifdef POXML_DEBUG - qDebug("ending on no close anymore %d %d %d %d", (!inside && index >= message.length()), inside, index, message.length()); + tqDebug("ending on no close anymore %d %d %d %d", (!inside && index >= message.length()), inside, index, message.length()); #endif return !inside && index >= message.length(); } @@ -206,7 +206,7 @@ bool StructureParser::closureTag(const TQString& message, const TQString &tag) index++; if (!inside) { #ifdef POXML_DEBUG - qDebug("ending on exit %d", index >= message.length()); + tqDebug("ending on exit %d", index >= message.length()); #endif return index >= message.length(); } @@ -260,7 +260,7 @@ void StructureParser::descape(TQString &message) bool StructureParser::formatMessage(MsgBlock &msg) const { #ifdef POXML_DEBUG - qDebug("formatMessage %s", msg.msgid.latin1()); + tqDebug("formatMessage %s", msg.msgid.latin1()); #endif int offset = 0; @@ -282,7 +282,7 @@ bool StructureParser::formatMessage(MsgBlock &msg) const !msg.msgid.at( slen + 1 ).isLetterOrNumber() ) { #ifdef POXML_DEBUG - qDebug("removing single tag %s", singletags[index]); + tqDebug("removing single tag %s", singletags[index]); #endif int strindex = strlen(singletags[index]) + 1; while (msg.msgid.at(strindex) != '>') @@ -321,7 +321,7 @@ bool StructureParser::formatMessage(MsgBlock &msg) const while (msg.msgid.at(endindex) != '<' && msg.msgid.at(endindex + 1) != '/') endindex--; #ifdef POXML_DEBUG - qDebug("endIndex %d", endindex); + tqDebug("endIndex %d", endindex); #endif strindex = endindex; TQString orig = msg.msgid; @@ -349,7 +349,7 @@ bool StructureParser::formatMessage(MsgBlock &msg) const msg.lines.first().start_line = infos_reg.cap(1).toInt(); msg.lines.first().start_col = infos_reg.cap(2).toInt(); #ifdef POXML_DEBUG - qDebug("col %s %s %d", attr.latin1(), msg.msgid.latin1(), msg.lines.first().start_col); + tqDebug("col %s %s %d", attr.latin1(), msg.msgid.latin1(), msg.lines.first().start_col); #endif offset = 0; @@ -369,7 +369,7 @@ bool StructureParser::formatMessage(MsgBlock &msg) const } #ifdef POXML_DEBUG - qDebug("formatMessage result %s %d %d", msg.msgid.latin1(), changed && recurse, msg.lines.first().start_col); + tqDebug("formatMessage result %s %d %d", msg.msgid.latin1(), changed && recurse, msg.lines.first().start_col); #endif msg.lines.first().offset += offset; @@ -392,7 +392,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) TQString message = mb.msgid; #ifdef POXML_DEBUG - qDebug("splitMessage %s", message.latin1()); + tqDebug("splitMessage %s", message.latin1()); #endif if (message.at(0) == '<') { @@ -414,7 +414,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) int inside = 1; while (true) { #ifdef POXML_DEBUG - qDebug("inside %s %d", message.mid(strindex, 35).latin1(), inside); + tqDebug("inside %s %d", message.mid(strindex, 35).latin1(), inside); #endif // the exception for poxml_* attributes is made in the closing tag @@ -424,7 +424,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) strindex); #ifdef POXML_DEBUG - qDebug("index1 %d %d %d", closing_index, starting_index, strindex); + tqDebug("index1 %d %d %d", closing_index, starting_index, strindex); #endif // when a new start was found, we set the start_index after the next match @@ -437,7 +437,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) } #ifdef POXML_DEBUG - qDebug("index %d %d %d", closing_index, starting_index, strindex); + tqDebug("index %d %d %d", closing_index, starting_index, strindex); #endif assert(closing_index != -1); @@ -448,7 +448,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) if (starting_index == -1) { strindex = closing_index; #ifdef POXML_DEBUG - qDebug("set strindex %d", strindex); + tqDebug("set strindex %d", strindex); #endif inside--; if (!inside) @@ -469,7 +469,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) } #ifdef POXML_DEBUG - qDebug("split into %s -AAAAAANNNNNNDDDDDD- %s", message.left(strindex).latin1(), message.mid(strindex).latin1()); + tqDebug("split into %s -AAAAAANNNNNNDDDDDD- %s", message.left(strindex).latin1(), message.mid(strindex).latin1()); #endif msg1.msgid = message.left(strindex); bool leave = formatMessage(msg1); @@ -487,7 +487,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) } #ifdef POXML_DEBUG - qDebug("splited %d-%d(%s) and %d-%d(%s)", msg1.lines.first().end_line,msg1.lines.first().end_col, + tqDebug("splited %d-%d(%s) and %d-%d(%s)", msg1.lines.first().end_line,msg1.lines.first().end_col, msg1.msgid.latin1(), msg2.lines.first().start_line,msg2.lines.first().start_col, msg2.msgid.latin1()); #endif @@ -514,7 +514,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) tag = tag.left(tag.find(' ')); } #ifdef POXML_DEBUG - qDebug("behind tag %s", tag.latin1()); + tqDebug("behind tag %s", tag.latin1()); #endif if (isCuttingTag(tag)) @@ -526,7 +526,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) int inside = 1; while (true) { #ifdef POXML_DEBUG - qDebug("inside %s %d", message.mid(strindex, 35).latin1(), inside); + tqDebug("inside %s %d", message.mid(strindex, 35).latin1(), inside); #endif int closing_index = message.findRev(TQRegExp(TQString::fromLatin1("</%1[\\s>]").arg(tag)), @@ -535,7 +535,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) strindex - 1); #ifdef POXML_DEBUG - qDebug("index1 %d %d %d", closing_index, starting_index, strindex); + tqDebug("index1 %d %d %d", closing_index, starting_index, strindex); #endif if (starting_index == -1) { @@ -558,7 +558,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) #ifdef POXML_DEBUG - qDebug("split2 into \"%s\" -AAAAAANNNNNNNNNDDDDDDDDDDD- \"%s\"", message.left(strindex).latin1(), message.mid(strindex).latin1()); + tqDebug("split2 into \"%s\" -AAAAAANNNNNNNNNDDDDDDDDDDD- \"%s\"", message.left(strindex).latin1(), message.mid(strindex).latin1()); #endif msg1.msgid = message.left(strindex); @@ -577,7 +577,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb) } #ifdef POXML_DEBUG - qDebug("splited %d-%d(%s) and %d-%d(%s)", msg1.lines.first().end_line,msg1.lines.first().end_col, + tqDebug("splited %d-%d(%s) and %d-%d(%s)", msg1.lines.first().end_line,msg1.lines.first().end_col, msg1.msgid.latin1(), msg2.lines.first().start_line,msg2.lines.first().start_col, msg2.msgid.latin1()); #endif @@ -597,7 +597,7 @@ bool StructureParser::endElement( const TQString& , const TQString&, const TQStr { TQString tname = qName.lower(); - // qDebug("endElement %s - %s %d", tname.latin1(), message.latin1(), inside); + // tqDebug("endElement %s - %s %d", tname.latin1(), message.latin1(), inside); if (inside) { if (!isSingleTag(qName)) { @@ -629,7 +629,7 @@ bool StructureParser::endElement( const TQString& , const TQString&, const TQStr it != messages.end(); ++it) { #ifdef POXML_DEBUG - qDebug("parser '%s' %d '%s' %d:%d", (*it).msgid.latin1(), (*it).lines.first().offset, message.mid((*it).lines.first().offset, 15).latin1(), (*it).lines.first().start_line, (*it).lines.first().start_col); + tqDebug("parser '%s' %d '%s' %d:%d", (*it).msgid.latin1(), (*it).lines.first().offset, message.mid((*it).lines.first().offset, 15).latin1(), (*it).lines.first().start_line, (*it).lines.first().start_col); #endif // if the remaining text still starts with a tag, the poxml_ info // is most probably more correct @@ -752,7 +752,7 @@ void StructureParser::cleanupTags( TQString &contents ) break; 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()); + // tqDebug("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)); } TQRegExp singletag("<(\\w*)\\s([^><]*)/>"); @@ -779,14 +779,14 @@ void StructureParser::cleanupTags( TQString &contents ) } #ifdef POXML_DEBUG - qDebug("final %s", contents.latin1()); + tqDebug("final %s", contents.latin1()); #endif } static bool removeEmptyTag( TQString &contents, const TQString & tag) { -// qDebug("cont %s %s", contents.latin1(), tag.latin1()); +// tqDebug("cont %s %s", contents.latin1(), tag.latin1()); TQRegExp empty(TQString("<%1[^>]*>[\\s\n][\\s\n]*</%2\\s*>").arg(tag).arg(tag)); int strindex = 0; @@ -794,7 +794,7 @@ static bool removeEmptyTag( TQString &contents, const TQString & tag) strindex = contents.find(empty, strindex); if (strindex < 0) break; - qDebug("found empty tag %s", tag.latin1()); + tqDebug("found empty tag %s", tag.latin1()); contents.replace(strindex, empty.matchedLength(), " "); strindex++; return true; @@ -985,7 +985,7 @@ MsgList parseXML(const char *filename) if (found != msgids.end()) { if (found.data() != (*it).tag) { #ifdef POXML_DEBUG - qDebug("same msgid for '%s' and '%s'", found.data().latin1(), (*it).tag.latin1()); + tqDebug("same msgid for '%s' and '%s'", found.data().latin1(), (*it).tag.latin1()); #endif changed = true; TQString msgid = (*it).msgid; diff --git a/poxml/po2xml.cpp b/poxml/po2xml.cpp index c30a340f..e43f464a 100644 --- a/poxml/po2xml.cpp +++ b/poxml/po2xml.cpp @@ -30,7 +30,7 @@ TQString translate(TQString xml, TQString orig, TQString translation) int index = xml.find(orig); if (index == -1) { - qWarning("can't find\n%s\nin\n%s", orig.latin1(), xml.latin1()); + tqWarning("can't find\n%s\nin\n%s", orig.latin1(), xml.latin1()); exit(1); } if (!translation.isEmpty()) @@ -41,7 +41,7 @@ TQString translate(TQString xml, TQString orig, TQString translation) int main( int argc, char **argv ) { if (argc != 3) { - qWarning("usage: %s english-XML translated-PO", argv[0]); + tqWarning("usage: %s english-XML translated-PO", argv[0]); ::exit(1); } @@ -69,7 +69,7 @@ int main( int argc, char **argv ) msgstr = escapePO((*it).msgstr); #ifdef POXML_DEBUG - qDebug("inserting translations '%s' -> '%s'", msgid.latin1(),msgstr.latin1()); + tqDebug("inserting translations '%s' -> '%s'", msgid.latin1(),msgstr.latin1()); #endif translations.insert(msgid, msgstr); } @@ -181,7 +181,7 @@ int main( int argc, char **argv ) if (!descaped.isEmpty()) { if (descaped.at(0) != '<') { - qWarning("the translation of '%s' doesn't start with a tag.", omsgid.latin1()); + tqWarning("the translation of '%s' doesn't start with a tag.", omsgid.latin1()); exit(1); } index = 0; @@ -201,7 +201,7 @@ int main( int argc, char **argv ) } #ifdef POXML_DEBUG - qDebug("english \"%s\" ORIG \"%s\" %d(%d-%d) %d(%d-%d) %d %d TRANS \"%s\" %d '%s'", xml.latin1(), (*it).msgid.latin1(), + tqDebug("english \"%s\" ORIG \"%s\" %d(%d-%d) %d(%d-%d) %d %d TRANS \"%s\" %d '%s'", xml.latin1(), (*it).msgid.latin1(), start_pos, bi.start_line, bi.start_col, end_pos, bi.end_line, bi.end_col, (*it).lines.first().offset, @@ -223,7 +223,7 @@ int main( int argc, char **argv ) } else { if (start_pos != old_pos) { if (start_pos < old_pos) { - qDebug("so far: '%s'", output.latin1()); + tqDebug("so far: '%s'", output.latin1()); } assert(start_pos > old_pos); ts << xml_text.mid(old_pos, start_pos - old_pos); diff --git a/poxml/split.cpp b/poxml/split.cpp index 29104d3e..cf09debe 100644 --- a/poxml/split.cpp +++ b/poxml/split.cpp @@ -9,7 +9,7 @@ int main( int argc, char **argv ) bool report_mismatches = qstrcmp(getenv("REPORT_MISMATCHES"), "no"); if (argc != 3) { - qWarning("usage: %s english-XML translated-XML", argv[0]); + tqWarning("usage: %s english-XML translated-XML", argv[0]); exit(1); } diff --git a/poxml/swappo.cpp b/poxml/swappo.cpp index 94c308ae..8e2e8344 100644 --- a/poxml/swappo.cpp +++ b/poxml/swappo.cpp @@ -7,7 +7,7 @@ using namespace std; int main(int argc, char **argv) { if ( argc != 2 ) { - qWarning( "usage: %s pofile", argv[0] ); + tqWarning( "usage: %s pofile", argv[0] ); return -1; } diff --git a/poxml/transxx.cpp b/poxml/transxx.cpp index bfc2e9cf..ef451fe0 100644 --- a/poxml/transxx.cpp +++ b/poxml/transxx.cpp @@ -11,7 +11,7 @@ using namespace std; int main(int argc, char **argv) { if ( argc != 2 && argc != 4 ) { - qWarning( "usage: %s [--text translation] potfile", argv[0] ); + tqWarning( "usage: %s [--text translation] potfile", argv[0] ); return -1; } @@ -20,7 +20,7 @@ int main(int argc, char **argv) if( argc == 4 ) { if( argv[1]!=TQString("--text") ) { - qWarning( "usage: %s [--text translation] potfile", argv[0] ); + tqWarning( "usage: %s [--text translation] potfile", argv[0] ); return -1; } translation = TQString::fromLocal8Bit(argv[2]); diff --git a/poxml/xml2pot.cpp b/poxml/xml2pot.cpp index 345a53e6..d3af9a0e 100644 --- a/poxml/xml2pot.cpp +++ b/poxml/xml2pot.cpp @@ -9,7 +9,7 @@ using namespace std; int main( int argc, char **argv ) { if (argc != 2) { - qWarning("usage: %s english-XML", argv[0]); + tqWarning("usage: %s english-XML", argv[0]); exit(1); } |