summaryrefslogtreecommitdiffstats
path: root/bibletime/backend/bt_gbfhtml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bibletime/backend/bt_gbfhtml.cpp')
-rw-r--r--bibletime/backend/bt_gbfhtml.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/bibletime/backend/bt_gbfhtml.cpp b/bibletime/backend/bt_gbfhtml.cpp
index 33d31a9..34c7879 100644
--- a/bibletime/backend/bt_gbfhtml.cpp
+++ b/bibletime/backend/bt_gbfhtml.cpp
@@ -24,8 +24,8 @@
#include <utilxml.h>
//Qt includes
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqregexp.h>
+#include <tqstring.h>
using namespace Filters;
@@ -97,13 +97,13 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
//Am Anfang<WH07225> schuf<WH01254><WTH8804> Gott<WH0430> Himmel<WH08064> und<WT> Erde<WH0776>.
//A simple word<WT> means: No entry for this word "word"
- QString result;
+ TQString result;
- QString t = QString::fromUtf8(buf.c_str());
+ TQString t = TQString::fromUtf8(buf.c_str());
- QRegExp tag("([.,;:]?<W[HGT][^>]*>\\s*)+");
+ TQRegExp tag("([.,;:]?<W[HGT][^>]*>\\s*)+");
- QStringList list;
+ TQStringList list;
int lastMatchEnd = 0;
@@ -129,11 +129,11 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
//list is now a list of words with 1-n Strongs at the end, which belong to this word.
//now create the necessary HTML in list entries and concat them to the result
- tag = QRegExp("<W([HGT])([^>]*)>");
+ tag = TQRegExp("<W([HGT])([^>]*)>");
tag.setMinimal(true);
- for (QStringList::iterator it = list.begin(); it != list.end(); ++it) {
- QString e = (*it); //current entry to process
+ for (TQStringList::iterator it = list.begin(); it != list.end(); ++it) {
+ TQString e = (*it); //current entry to process
//qWarning(e.latin1());
//check if there is a word to which the strongs info belongs to.
@@ -141,7 +141,7 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
//If not, leave out the strongs info, because it can't be tight to a text
//Comparing the first char with < is not enough, because the tokenReplace is done already
//so there might be html tags already.
- const bool textPresent = (e.stripWhiteSpace().remove(QRegExp("[.,;:]")).left(2) != "<W");
+ const bool textPresent = (e.stripWhiteSpace().remove(TQRegExp("[.,;:]")).left(2) != "<W");
if (!textPresent) {
result += (*it);
@@ -153,7 +153,7 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
bool hasLemmaAttr = false;
bool hasMorphAttr = false;
- QString value = QString::null;
+ TQString value = TQString::null;
int tagAttributeStart = -1;
while (pos != -1) { //work on all strong/lemma tags in this section, should be between 1-3 loops
@@ -170,14 +170,14 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
pos += 7;
//skip blanks, commas, dots and stuff at the beginning, it doesn't belong to the morph code
- QString rep("<span ");
+ TQString rep("<span ");
rep.append(isMorph ? "morph" : "lemma").append("=\"").append(value).append("\">");
hasMorphAttr = isMorph;
hasLemmaAttr = !isMorph;
int startPos = 0;
- QChar c = e[startPos];
+ TQChar c = e[startPos];
while ((startPos < pos) && (c.isSpace() || c.isPunct())) {
++startPos;
@@ -198,12 +198,12 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
if ((!isMorph && hasLemmaAttr) || (isMorph && hasMorphAttr)) { //we append another attribute value, e.g. 3000 gets 3000|5000
//search the existing attribute start
- QRegExp attrRegExp( isMorph ? "morph=\".+(?=\")" : "lemma=\".+(?=\")" );
+ TQRegExp attrRegExp( isMorph ? "morph=\".+(?=\")" : "lemma=\".+(?=\")" );
attrRegExp.setMinimal(true);
const int foundPos = e.find(attrRegExp, tagAttributeStart);
if (foundPos != -1) {
- e.insert(foundPos + attrRegExp.matchedLength(), QString("|").append(value));
+ e.insert(foundPos + attrRegExp.matchedLength(), TQString("|").append(value));
pos += value.length() + 1;
hasLemmaAttr = !isMorph;
@@ -211,7 +211,7 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
}
}
else { //attribute was not yet inserted
- QString attr;
+ TQString attr;
attr.setLatin1(isMorph ? "morph" : "lemma").append("=\"").append(value).append("\" ");
e.insert(tagAttributeStart, attr);
@@ -272,7 +272,7 @@ bool BT_GBFHTML::handleToken(sword::SWBuf &buf, const char *token, sword::BasicF
buf.append('/');
buf.append(myUserData->key->getShortText());
buf.append('/');
- buf.append( QString::number(myUserData->swordFootnote++).latin1() );
+ buf.append( TQString::number(myUserData->swordFootnote++).latin1() );
buf.append("\">*</span> ");
userData->suspendTextPassThru = true;