diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
commit | a374efce3a207b39514be3c52264091400ce297e (patch) | |
tree | 77bdf654b55826d4f59b53a5621310206bcaead1 /kanagram/src/keduvockvtmlreader.cpp | |
parent | f81a494f3957d5cf38c787973415597941934727 (diff) | |
download | tdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip |
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kanagram/src/keduvockvtmlreader.cpp')
-rw-r--r-- | kanagram/src/keduvockvtmlreader.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/kanagram/src/keduvockvtmlreader.cpp b/kanagram/src/keduvockvtmlreader.cpp index fc1441f6..687fdaee 100644 --- a/kanagram/src/keduvockvtmlreader.cpp +++ b/kanagram/src/keduvockvtmlreader.cpp @@ -78,7 +78,7 @@ bool KEduVocKvtmlReader::readLesson(TQDomElement &domElementParent) if (isCurr && no != 0) m_doc->setCurrentLesson(no); - TQDomAttr domAttrQuery = domElementChild.attributeNode(KV_LESS_QUERY); + TQDomAttr domAttrQuery = domElementChild.attributeNode(KV_LESS_TQUERY); if (!domAttrQuery.isNull()) m_doc->lessons_in_query.push_back(domAttrQuery.value().toInt() != 0); else @@ -131,7 +131,7 @@ bool KEduVocKvtmlReader::readArticle(TQDomElement &domElementParent) { if (domElementEntry.tagName() != KV_ART_ENTRY) { - domError(i18n("expected tag <%1>").arg(KV_ART_ENTRY)); + domError(i18n("expected tag <%1>").tqarg(KV_ART_ENTRY)); return false; } @@ -331,7 +331,7 @@ bool KEduVocKvtmlReader::readConjug(TQDomElement &domElementParent, if (type.length() != 0 && type.left(1) == UL_USER_TENSE) { - int num = QMIN(type.mid (1, 40).toInt(), 1000); // paranoia check + int num = TQMIN(type.mid (1, 40).toInt(), 1000); // paranoia check if( num > (int) m_doc->tense_descr.size() ) { // description missing ? @@ -783,7 +783,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrGrade.isNull()) { TQString s = domAttrGrade.value(); - if ((pos = s.find(';')) >= 1) + if ((pos = s.tqfind(';')) >= 1) { grade = s.left(pos).toInt(); rev_grade = s.mid(pos+1, s.length()).toInt(); @@ -798,7 +798,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrCount.isNull()) { TQString s = domAttrCount.value(); - if ((pos = s.find(';')) >= 1) + if ((pos = s.tqfind(';')) >= 1) { count = s.left(pos).toInt(); rev_count = s.mid(pos+1, s.length()).toInt(); @@ -813,7 +813,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrBad.isNull()) { TQString s = domAttrBad.value(); - if ((pos = s.find(';')) >= 1) + if ((pos = s.tqfind(';')) >= 1) { bcount = s.left(pos).toInt(); rev_bcount = s.mid(pos+1, s.length()).toInt(); @@ -828,7 +828,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrDate.isNull()) { TQString s = domAttrDate.value(); - if ((pos = s.find(';')) >= 1) + if ((pos = s.tqfind(';')) >= 1) { date = s.left(pos).toInt(); rev_date = s.mid(pos+1, s.length()).toInt(); @@ -841,7 +841,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrDate2.isNull()) { TQString s = domAttrDate2.value(); - if ((pos = s.find(';')) >= 1) + if ((pos = s.tqfind(';')) >= 1) { date = m_doc->decompressDate(s.left(pos)); rev_date = m_doc->decompressDate(s.mid(pos+1, s.length())); @@ -882,7 +882,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement usage = domAttrUsage.value(); if (usage.length() != 0 && usage.left(1) == UL_USER_USAGE) { - int num = QMIN(usage.mid (1, 40).toInt(), 1000); // paranioa check + int num = TQMIN(usage.mid (1, 40).toInt(), 1000); // paranioa check if( num > (int) m_doc->usage_descr.size() ) { // description missing ? @@ -912,15 +912,15 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement { type = domAttrExprType.value(); if (type == "1") - type = QM_VERB; + type = TQM_VERB; else if (type == "2") // convert from pre-0.5 versions - type = QM_NOUN; + type = TQM_NOUN; else if (type == "3") - type = QM_NAME; + type = TQM_NAME; - if (type.length() != 0 && type.left(1) == QM_USER_TYPE) + if (type.length() != 0 && type.left(1) == TQM_USER_TYPE) { - int num = QMIN(type.mid (1, 40).toInt(), 1000); // paranoia check + int num = TQMIN(type.mid (1, 40).toInt(), 1000); // paranoia check if( num > (int) m_doc->type_descr.size() ) { // description missing ? @@ -941,7 +941,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement pronunce = domAttrPronunce.value(); query_id = ""; - TQDomAttr domAttrQuery = domElementExpressionChild.attributeNode(KV_QUERY); + TQDomAttr domAttrQuery = domElementExpressionChild.attributeNode(KV_TQUERY); if (!domAttrQuery.isNull()) query_id = domAttrQuery.value(); @@ -1010,15 +1010,15 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { exprtype = !domAttrType.value().toInt(); if (exprtype == "1") - exprtype = QM_VERB; + exprtype = TQM_VERB; else if (exprtype == "2") // convert from pre-0.5 versions - exprtype = QM_NOUN; + exprtype = TQM_NOUN; else if (exprtype == "3") - exprtype = QM_NAME; + exprtype = TQM_NAME; - if (exprtype.length() != 0 && exprtype.left(1) == QM_USER_TYPE) + if (exprtype.length() != 0 && exprtype.left(1) == TQM_USER_TYPE) { - int num = QMIN(exprtype.mid (1, 40).toInt(), 1000); // paranoia check + int num = TQMIN(exprtype.mid (1, 40).toInt(), 1000); // paranoia check if( num > (int) m_doc->type_descr.size() ) { // description missing ? @@ -1059,7 +1059,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) if (domElementExpressionChild.tagName() != KV_ORG) { // must be preceded by "original" - domError(i18n("starting tag <%1> is missing").arg(KV_ORG)); + domError(i18n("starting tag <%1> is missing").tqarg(KV_ORG)); return false; } @@ -1139,7 +1139,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bConjug) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bConjug = true; @@ -1152,7 +1152,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bComparison) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bComparison = true; @@ -1165,7 +1165,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bMultipleChoice) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bMultipleChoice = true; @@ -1236,7 +1236,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) if (domElementExpressionChild.tagName() != KV_TRANS) { // "original" must be followed by "translations" - domError(i18n("starting tag <%1> is missing").arg(KV_TRANS)); + domError(i18n("starting tag <%1> is missing").tqarg(KV_TRANS)); return false; } @@ -1317,7 +1317,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bConjug) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bConjug = true; @@ -1330,7 +1330,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bComparison) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bComparison = true; @@ -1343,7 +1343,7 @@ bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent) { if (bMultipleChoice) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementOriginalChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementOriginalChild.tagName())); return false; } bMultipleChoice = true; @@ -1456,7 +1456,7 @@ if (lines != 0) { if (lessgroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } lessgroup = true; @@ -1468,7 +1468,7 @@ if (lines != 0) { if (articlegroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } articlegroup = true; @@ -1480,7 +1480,7 @@ if (lines != 0) { if (conjuggroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } conjuggroup = true; @@ -1492,7 +1492,7 @@ if (lines != 0) { if (optgroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } optgroup = true; @@ -1504,7 +1504,7 @@ if (lines != 0) { if (attrgroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } attrgroup = true; @@ -1516,7 +1516,7 @@ if (lines != 0) { if (tensegroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } tensegroup = true; @@ -1528,7 +1528,7 @@ if (lines != 0) { if (usagegroup) { - domError(i18n("repeated occurrence of tag <%1>").arg(domElementChild.tagName())); + domError(i18n("repeated occurrence of tag <%1>").tqarg(domElementChild.tagName())); return false; } usagegroup = true; @@ -1590,7 +1590,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc) if( domElementKvtml.tagName() != KV_DOCTYPE ) { domError(i18n("Tag <%1> was expected " - "but tag <%2> was read." ).arg(KV_DOCTYPE).arg(domElementKvtml.tagName())); + "but tag <%2> was read." ).tqarg(KV_DOCTYPE).tqarg(domElementKvtml.tagName())); return false; } @@ -1602,7 +1602,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc) if (!domAttrEncoding.isNull()) { // TODO handle old encodings - // Qt DOM API autodetects encoding, so is there anything to do ? + // TQt DOM API autodetects encoding, so is there anything to do ? } TQDomAttr domAttrTitle = domElementKvtml.attributeNode(KV_TITLE); @@ -1633,7 +1633,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc) if (!domAttrGenerator.isNull()) { m_doc->generator = domAttrGenerator.value(); - int pos = m_doc->generator.findRev (KVD_VERS_PREFIX); + int pos = m_doc->generator.tqfindRev (KVD_VERS_PREFIX); if (pos >= 0) { m_doc->doc_version = m_doc->generator; @@ -1667,7 +1667,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc) void KEduVocKvtmlReader::domErrorUnknownElement(const TQString &elem) { - TQString ln = i18n("File:\t%1\n").arg(m_doc->URL().path()); + TQString ln = i18n("File:\t%1\n").tqarg(m_doc->URL().path()); TQString format = i18n( "Your document contains an unknown tag <%1>. " // keep trailing space @@ -1676,7 +1676,7 @@ void KEduVocKvtmlReader::domErrorUnknownElement(const TQString &elem) "Loading is aborted because KVocTrain cannot " "read documents with unknown elements.\n" ); - TQString msg = format.arg(elem); + TQString msg = format.tqarg(elem); TQApplication::setOverrideCursor( arrowCursor, true ); TQString s = kapp->makeStdCaption(i18n("Unknown Element")); KMessageBox::sorry(0, ln+msg, s); @@ -1687,7 +1687,7 @@ void KEduVocKvtmlReader::domError(const TQString &text ) { TQApplication::setOverrideCursor( arrowCursor, true ); TQString s = kapp->makeStdCaption(i18n("Error")); - TQString ln = i18n("File:\t%1\n").arg(m_doc->URL().path()); + TQString ln = i18n("File:\t%1\n").tqarg(m_doc->URL().path()); TQString msg = text; KMessageBox::error(0, ln+msg, s); TQApplication::restoreOverrideCursor(); |