From dc6b8e72fed2586239e3514819238c520636c9d9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:54:04 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/parsers/dtd/dtd.cpp | 128 ++++++++++++++--------------- quanta/parsers/dtd/dtd.h | 34 ++++---- quanta/parsers/dtd/dtdparser.cpp | 84 +++++++++---------- quanta/parsers/dtd/dtdparser.h | 22 ++--- quanta/parsers/node.cpp | 50 ++++++------ quanta/parsers/node.h | 30 +++---- quanta/parsers/parser.cpp | 134 +++++++++++++++--------------- quanta/parsers/parser.h | 28 +++---- quanta/parsers/parsercommon.cpp | 26 +++--- quanta/parsers/parsercommon.h | 12 +-- quanta/parsers/qtag.cpp | 28 +++---- quanta/parsers/qtag.h | 170 +++++++++++++++++++-------------------- quanta/parsers/sagroupparser.cpp | 28 +++---- quanta/parsers/sagroupparser.h | 4 +- quanta/parsers/saparser.cpp | 50 ++++++------ quanta/parsers/saparser.h | 30 +++---- quanta/parsers/tag.cpp | 114 +++++++++++++------------- quanta/parsers/tag.h | 56 ++++++------- 18 files changed, 514 insertions(+), 514 deletions(-) (limited to 'quanta/parsers') diff --git a/quanta/parsers/dtd/dtd.cpp b/quanta/parsers/dtd/dtd.cpp index 18e3d712..964c35fb 100644 --- a/quanta/parsers/dtd/dtd.cpp +++ b/quanta/parsers/dtd/dtd.cpp @@ -16,11 +16,11 @@ ***************************************************************************/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -34,42 +34,42 @@ #include "../qextfileinfo.h" -DTD::DTD(const KURL &dtdURL, const QString &dtepDir) +DTD::DTD(const KURL &dtdURL, const TQString &dtepDir) { m_dtdURL = dtdURL; - m_dtepDir = dtepDir + "/"+QFileInfo(dtdURL.fileName()).baseName(); //TODO: get the dir name from the DTD or from the user + m_dtepDir = dtepDir + "/"+TQFileInfo(dtdURL.fileName()).baseName(); //TODO: get the dir name from the DTD or from the user } DTD::~DTD() { } -QStringList DTD::getTags() +TQStringList DTD::getTags() { return tags; } -AttributeList* DTD::getTagAttributes(QString tag) +AttributeList* DTD::getTagAttributes(TQString tag) { return tagAttributes.find(tag); } -QStringList DTD::getTextCompletion(QString tag) +TQStringList DTD::getTextCompletion(TQString tag) { - return QStringList(); + return TQStringList(); } void DTD::printContents() { - for ( QStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) { - QString tag = *tagIt; + for ( TQStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) { + TQString tag = *tagIt; kdDebug(24000) << tag << endl; AttributeList *attributes = getTagAttributes(tag); for ( uint i = 0; i < attributes->count(); i++) { Attribute *attribute = attributes->at(i); - QString s = " " + attribute->name + ": "; + TQString s = " " + attribute->name + ": "; for (uint j = 0; j < attribute->values.count(); j++) { s += attribute->values[j] + ", "; @@ -81,7 +81,7 @@ void DTD::printContents() void DTD::writeTagFiles() { - QString dirName = m_dtepDir; + TQString dirName = m_dtepDir; KURL u; u.setPath(dirName); if (!QExtFileInfo::createDir(dirName)) { @@ -89,13 +89,13 @@ void DTD::writeTagFiles() return; } dirName.append("/"); - for ( QStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) { - QString tag = *tagIt; + for ( TQStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) { + TQString tag = *tagIt; - QFile file( dirName + tag.lower() + ".tag" ); + TQFile file( dirName + tag.lower() + ".tag" ); if ( file.open( IO_WriteOnly ) ) { - QTextStream stream( &file ); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream( &file ); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << "" << endl << "" << endl << "" << endl << endl; @@ -114,31 +114,31 @@ void DTD::writeTagFiles() KConfig config(dirName + "description.rc"); config.setGroup("General"); - config.writeEntry("Name", QFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the DTD! - config.writeEntry("NickName", QFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the user! + config.writeEntry("Name", TQFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the DTD! + config.writeEntry("NickName", TQFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the user! config.sync(); } bool DTD::parseDTD(const KURL &url) { - QString fileName = QString::null; + TQString fileName = TQString::null; if (!KIO::NetAccess::download(url, fileName)) { KMessageBox::error(0, i18n("Cannot download the DTD from %1.").arg(url.prettyURL(0, KURL::StripFileProtocol))); return false; } - QFile file(fileName); + TQFile file(fileName); if (file.open(IO_ReadOnly)) { - QTextStream fileStream(&file); - fileStream.setEncoding(QTextStream::UnicodeUTF8); - QString entireDTD = fileStream.read(); + TQTextStream fileStream(&file); + fileStream.setEncoding(TQTextStream::UnicodeUTF8); + TQString entireDTD = fileStream.read(); file.close(); removeComments(entireDTD); - QString line; - QStringList lines = QStringList::split("\n",entireDTD); - QStringList::Iterator it = lines.begin(); + TQString line; + TQStringList lines = TQStringList::split("\n",entireDTD); + TQStringList::Iterator it = lines.begin(); while (it != lines.end()) { line = *it; @@ -183,7 +183,7 @@ bool DTD::parseDTD(const KURL &url) parseDTD(entityURL); } else { - kdDebug(24000) << QString("Unknown tag: [%1]").arg(line) << endl; + kdDebug(24000) << TQString("Unknown tag: [%1]").arg(line) << endl; } if (it != lines.end()) ++it; @@ -191,16 +191,16 @@ bool DTD::parseDTD(const KURL &url) } } -void DTD::parseDTDEntity(QString line) { - QString name; - QString *value; +void DTD::parseDTDEntity(TQString line) { + TQString name; + TQString *value; line.replace("\\end", " "); name = line.mid(11); int firstSpace = name.find(' '); name = name.remove(firstSpace, name.length()-firstSpace); - value = new QString(line.mid(11+firstSpace)); + value = new TQString(line.mid(11+firstSpace)); value->remove(0, value->find("\"")+1); value->remove(value->findRev("\""), value->length()); @@ -212,17 +212,17 @@ void DTD::parseDTDEntity(QString line) { //kdDebug() << "Entity --- Name: " << name << " --- Value: " << *value << endl; } -void DTD::parseDTDElement(const QString &l) { - QString name; - QString *value; +void DTD::parseDTDElement(const TQString &l) { + TQString name; + TQString *value; - QString line = l; + TQString line = l; line.replace("\\end", " "); name = line.mid(10); int firstSpace = name.find(' '); name.remove(firstSpace, name.length()-firstSpace); - value = new QString(line.mid(10+firstSpace)); + value = new TQString(line.mid(10+firstSpace)); //value->remove(0, value->find("\"")+1); value->remove(value->find(">"), 10000); @@ -232,8 +232,8 @@ void DTD::parseDTDElement(const QString &l) { if ( name.startsWith("(") && name.endsWith(")") ) { name.remove(0,1); name.remove(name.length()-1,1); - QStringList multipleTags = QStringList::split("|", name); - QStringList::Iterator it = multipleTags.begin(); + TQStringList multipleTags = TQStringList::split("|", name); + TQStringList::Iterator it = multipleTags.begin(); while(it != multipleTags.end()) { name = *it; name = name.stripWhiteSpace(); @@ -249,17 +249,17 @@ void DTD::parseDTDElement(const QString &l) { } } -void DTD::parseDTDAttlist(const QString &l) { - QString name; - QString *value; +void DTD::parseDTDAttlist(const TQString &l) { + TQString name; + TQString *value; - QString line = l; + TQString line = l; line.replace("\\end", " "); name = line.mid(10); int firstSpace = name.find(' '); name.remove(firstSpace, name.length()-firstSpace); - value = new QString(line.mid(10+firstSpace)); + value = new TQString(line.mid(10+firstSpace)); //value->remove(0, value->find("\"")+1); value->remove(value->find(">"), 10000); @@ -269,8 +269,8 @@ void DTD::parseDTDAttlist(const QString &l) { if ( name.startsWith("(") && name.endsWith(")") ) { name.remove(0,1); name.remove(name.length()-1,1); - QStringList multipleTags = QStringList::split("|", name); - QStringList::Iterator it = multipleTags.begin(); + TQStringList multipleTags = TQStringList::split("|", name); + TQStringList::Iterator it = multipleTags.begin(); while(it != multipleTags.end()) { name = *it; name = name.stripWhiteSpace(); @@ -287,16 +287,16 @@ void DTD::parseDTDAttlist(const QString &l) { } -void DTD::parseTagAttributeValues(const QString &name, QString *value) { +void DTD::parseTagAttributeValues(const TQString &name, TQString *value) { AttributeList *attributes = new AttributeList(); - QStringList attrLines = QStringList::split("\\end",*value); - QStringList::Iterator lineIt = attrLines.begin(); + TQStringList attrLines = TQStringList::split("\\end",*value); + TQStringList::Iterator lineIt = attrLines.begin(); while (lineIt != attrLines.end()) //iterate through the attribute lines { //split the attribute line - QStringList all = QStringList::split(" ", *lineIt); - QStringList::Iterator it = all.begin(); + TQStringList all = TQStringList::split(" ", *lineIt); + TQStringList::Iterator it = all.begin(); while(it != all.end()) { Attribute *attr = new Attribute(); @@ -304,14 +304,14 @@ void DTD::parseTagAttributeValues(const QString &name, QString *value) { //kdDebug() << "Inserting for tag " << name << ": " << *it << endl; ++it; - QString values = *it; + TQString values = *it; //list of possible values if ( values.startsWith("(") && values.endsWith(")") ) { values.remove(0,1); values.remove(values.length()-1,1); - attr->values = QStringList::split("|", values); - QString s = (attr->values[0]+attr->values[1]).lower(); + attr->values = TQStringList::split("|", values); + TQString s = (attr->values[0]+attr->values[1]).lower(); stripSpaces(&s); if ((s == "truefalse") || (s == "falsetrue")) { @@ -330,7 +330,7 @@ void DTD::parseTagAttributeValues(const QString &name, QString *value) { if (it != all.end()) { ++it; - QString s=*it; + TQString s=*it; if (s.startsWith("\"") && s.endsWith("\"") && it!=all.end()) { s.remove(0,1); @@ -360,13 +360,13 @@ void DTD::parseTagAttributeValues(const QString &name, QString *value) { tagAttributes.insert(name, attributes); } -void DTD::parseDTDReplace(QString *value) { +void DTD::parseDTDReplace(TQString *value) { int begin, end; begin = value->find("%"); end = value->find(";"); while (begin != -1 && end != -1) { - QString replaceText = value->mid(begin+1, end-begin-1); - QString *replaceValue = entities.find(replaceText); + TQString replaceText = value->mid(begin+1, end-begin-1); + TQString *replaceValue = entities.find(replaceText); if (replaceValue != 0L) { value->replace(begin, end-begin+1, *replaceValue); @@ -380,7 +380,7 @@ void DTD::parseDTDReplace(QString *value) { } } -void DTD::stripSpaces(QString *value) { +void DTD::stripSpaces(TQString *value) { int index=-1; while ( (index=value->find(' ',++index)) != -1 ) { if ( value->findRev('(',index) != -1 && value->find(')',index) != -1) @@ -388,7 +388,7 @@ void DTD::stripSpaces(QString *value) { } } -void DTD::removeComments(QString &value) { +void DTD::removeComments(TQString &value) { int begin, end; begin = value.find("",begin+2); @@ -406,7 +406,7 @@ void DTD::removeComments(QString &value) { end = value.find("--",begin+2); } - value.replace(QRegExp(""), ""); + value.replace(TQRegExp(""), ""); } bool DTD::parseDTD() diff --git a/quanta/parsers/dtd/dtd.h b/quanta/parsers/dtd/dtd.h index 45b0e213..cc0cf238 100644 --- a/quanta/parsers/dtd/dtd.h +++ b/quanta/parsers/dtd/dtd.h @@ -19,7 +19,7 @@ #define DTD_H //qt includes -#include +#include //app includes #include "qtag.h" @@ -30,13 +30,13 @@ class DTD { public: - DTD(const KURL &dtdURL, const QString& dtepDir); + DTD(const KURL &dtdURL, const TQString& dtepDir); ~DTD(); public: - QStringList getTags(); - AttributeList* getTagAttributes(QString tag); - QStringList getTextCompletion(QString tag); + TQStringList getTags(); + AttributeList* getTagAttributes(TQString tag); + TQStringList getTextCompletion(TQString tag); void printContents(); void writeTagFiles(); /** No descriptions */ @@ -44,21 +44,21 @@ public: private: bool parseDTD(const KURL& url); - void parseDTDEntity(const QString &line); - void parseDTDElement(const QString &line); - void parseDTDAttlist(const QString &line); - void parseTagAttributeValues(const QString &name, QString *value); - void parseDTDReplace(QString *value); - void stripSpaces(QString *value); - void removeComments(QString &value); + void parseDTDEntity(const TQString &line); + void parseDTDElement(const TQString &line); + void parseDTDAttlist(const TQString &line); + void parseTagAttributeValues(const TQString &name, TQString *value); + void parseDTDReplace(TQString *value); + void stripSpaces(TQString *value); + void removeComments(TQString &value); - QDict entities; - QDict elements; - QStringList tags; - QDict tagAttributes; + TQDict entities; + TQDict elements; + TQStringList tags; + TQDict tagAttributes; /** From where to load the DTD file. */ KURL m_dtdURL; - QString m_dtepDir; + TQString m_dtepDir; }; #endif diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp index 86060967..0d623978 100644 --- a/quanta/parsers/dtd/dtdparser.cpp +++ b/quanta/parsers/dtd/dtdparser.cpp @@ -14,13 +14,13 @@ ***************************************************************************/ //qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include //kde includes #include @@ -51,15 +51,15 @@ namespace DTD { - QString dirName; + TQString dirName; xmlDtdPtr dtd_ptr; /* Pointer to the parsed DTD */ - QTextStream entityStream; + TQTextStream entityStream; } void saveElement(xmlElementPtr elem, xmlBufferPtr buf); void saveEntity(xmlEntityPtr entity, xmlBufferPtr buf); -DTDParser::DTDParser(const KURL& dtdURL, const QString &dtepDir) +DTDParser::DTDParser(const KURL& dtdURL, const TQString &dtepDir) { m_dtdURL = dtdURL; m_dtepDir = dtepDir; @@ -69,10 +69,10 @@ DTDParser::~DTDParser() { } -bool DTDParser::parse(const QString &targetDir, bool entitiesOnly) +bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly) { bool fineTune = false; - QString fileName = QString::null; + TQString fileName = TQString::null; if (!KIO::NetAccess::download(m_dtdURL, fileName, 0)) { KMessageBox::error(0, i18n("Cannot download the DTD from %1.").arg( m_dtdURL.prettyURL(0, KURL::StripFileProtocol))); @@ -81,24 +81,24 @@ bool DTDParser::parse(const QString &targetDir, bool entitiesOnly) DTD::dtd_ptr = xmlParseDTD(NULL, xmlCharStrndup(fileName.utf8(), fileName.utf8().length())); if( DTD::dtd_ptr == NULL ) { - QString errorStr = i18n("Unknown"); + TQString errorStr = i18n("Unknown"); #ifndef LIBXML_2_5 xmlErrorPtr errorPtr = xmlGetLastError(); if (errorPtr != NULL) { - QString s = QString::fromLatin1(errorPtr->message); + TQString s = TQString::fromLatin1(errorPtr->message); if (!s.isEmpty()) errorStr = s; - s = QString::fromLatin1(errorPtr->str1); + s = TQString::fromLatin1(errorPtr->str1); if (!s.isEmpty()) errorStr += "
" + s; - s = QString::fromLatin1(errorPtr->str2); + s = TQString::fromLatin1(errorPtr->str2); if (!s.isEmpty()) errorStr += "
" + s; - s = QString::fromLatin1(errorPtr->str2); + s = TQString::fromLatin1(errorPtr->str2); if (!s.isEmpty()) errorStr += "
" + s; - errorStr += QString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2); + errorStr += TQString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2); xmlResetError(errorPtr); } #endif @@ -110,20 +110,20 @@ bool DTDParser::parse(const QString &targetDir, bool entitiesOnly) KDialogBase dlg(0L, 0L, true, i18n("DTD - > DTEP Conversion"), KDialogBase::Ok | KDialogBase::Cancel); DTEPCreationDlg w(&dlg); dlg.setMainWidget(&w); - QString name = QString((const char*)DTD::dtd_ptr->name); + TQString name = TQString((const char*)DTD::dtd_ptr->name); if (name == "none") - name = QFileInfo(m_dtdURL.fileName()).baseName(); + name = TQFileInfo(m_dtdURL.fileName()).baseName(); w.dtdName->setText(name); w.nickName->setText(name); - w.directory->setText(QFileInfo(m_dtdURL.fileName()).baseName()); - w.doctype->setText(QString((const char*)DTD::dtd_ptr->ExternalID)); - w.dtdURL->setText(QString((const char*)DTD::dtd_ptr->SystemID)); + w.directory->setText(TQFileInfo(m_dtdURL.fileName()).baseName()); + w.doctype->setText(TQString((const char*)DTD::dtd_ptr->ExternalID)); + w.dtdURL->setText(TQString((const char*)DTD::dtd_ptr->SystemID)); if (!dlg.exec()) return false; m_name = w.dtdName->text(); m_nickName = w.nickName->text(); m_doctype = w.doctype->text(); - m_doctype.replace(QRegExp("")); m_dtdURLLine = w.dtdURL->text(); m_defaultExtension = w.defaultExtension->text(); @@ -141,11 +141,11 @@ bool DTDParser::parse(const QString &targetDir, bool entitiesOnly) DTD::dirName.append("/"); if (DTD::dtd_ptr->entities) { - QFile file( DTD::dirName + "entities.tag" ); + TQFile file( DTD::dirName + "entities.tag" ); if ( file.open( IO_WriteOnly ) ) { DTD::entityStream.setDevice(&file); - DTD::entityStream.setEncoding(QTextStream::UnicodeUTF8); + DTD::entityStream.setEncoding(TQTextStream::UnicodeUTF8); DTD::entityStream << "" << endl; DTD::entityStream << "" << endl << "" << endl; @@ -211,12 +211,12 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) Q_UNUSED(buf); if (elem) { - QString elemName = QString((const char*)elem->name); - QFile file( DTD::dirName + elemName + ".tag" ); + TQString elemName = TQString((const char*)elem->name); + TQFile file( DTD::dirName + elemName + ".tag" ); if ( file.open( IO_WriteOnly ) ) { - QTextStream stream( &file ); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream( &file ); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << "" << endl; stream << "" << endl << "" << endl @@ -232,21 +232,21 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) at_ptr = el_ptr->attributes; while (at_ptr) { Attribute *attr = new Attribute; - attr->name = QString((const char*)at_ptr->name); + attr->name = TQString((const char*)at_ptr->name); switch (at_ptr->def) { case 1: {attr->status = "optional"; break;} //NONE case 2: {attr->status = "required"; break;} //REQUIRED case 3: {attr->status = "implied"; break;} //IMPLIED case 4: {attr->status = "fixed"; break;} //FIXED } - attr->defaultValue = QString((const char*)at_ptr->defaultValue); + attr->defaultValue = TQString((const char*)at_ptr->defaultValue); xmlEnumerationPtr enum_ptr; enum_ptr = at_ptr->tree; while (enum_ptr) { - attr->values += QString((const char*)enum_ptr->name); + attr->values += TQString((const char*)enum_ptr->name); enum_ptr = enum_ptr->next; } - QString attrtype; + TQString attrtype; switch (at_ptr->atype) { case 9: {attrtype = "list"; break;} default: {attrtype = "input"; break;} //TODO handle the rest of types @@ -268,7 +268,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) stream << "" << endl; for( int i = 0; i < childNum; i++ ) { - stream << " content && child_ptr->content->ocur) { @@ -276,7 +276,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) //{ // stream << " usage=\"required\""; // } - QString ocur; + TQString ocur; switch (child_ptr->content->ocur) { case 1: {ocur = "once"; break;} @@ -285,7 +285,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) case 4: {ocur = "plus"; break;} } stream << " usage=\"" << ocur << "\""; - QString name = QString((const char*)child_ptr->content->name); + TQString name = TQString((const char*)child_ptr->content->name); if (name == "#PCDATA") name == "#text"; stream << " name2=\"" << name << "\""; @@ -303,10 +303,10 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) stream << "" << endl; while (content_ptr) { - if (!QString((const char*)content_ptr->name).isEmpty()) + if (!TQString((const char*)content_ptr->name).isEmpty()) { - stream << " name) << "\""; - QString ocur; + stream << " name) << "\""; + TQString ocur; switch (content_ptr->ocur) { case 1: {ocur = "once"; break;} @@ -350,12 +350,12 @@ void saveEntity(xmlEntityPtr entity, xmlBufferPtr buf) Q_UNUSED(buf); if (entity) { - QString name = QString((const char*)entity->name); + TQString name = TQString((const char*)entity->name); DTD::entityStream << "" << endl << endl; } } -QString DTDParser::dirName() +TQString DTDParser::dirName() { return DTD::dirName; } diff --git a/quanta/parsers/dtd/dtdparser.h b/quanta/parsers/dtd/dtdparser.h index b5b66d01..77c608ee 100644 --- a/quanta/parsers/dtd/dtdparser.h +++ b/quanta/parsers/dtd/dtdparser.h @@ -16,7 +16,7 @@ #define DTDPARSER_H //qt includes -#include +#include //forward declarations class KURL; @@ -26,30 +26,30 @@ struct Attribute; /** libxml2 based XML DTD parser and DTEP creation class*/ class DTDParser { public: - DTDParser(const KURL& dtdURL, const QString &dtepDir); + DTDParser(const KURL& dtdURL, const TQString &dtepDir); ~DTDParser(); - QString dirName(); + TQString dirName(); /** * Parse the DTD file. * @param targetDir the directory of the destination DTEP. If empty, a dialog is shown to configure the destination. * @param entitiesOnly if true, only the entities are extracted from the DTD into the entities.tag file * @return true on success, false if some error happened */ - bool parse(const QString &targetDir = QString::null, bool entitiesOnly = false); + bool parse(const TQString &targetDir = TQString::null, bool entitiesOnly = false); protected: void writeDescriptionRC(); private: KURL m_dtdURL; - QString m_dtepDir; - QString m_name; - QString m_nickName; - QString m_doctype; - QString m_dtdURLLine; + TQString m_dtepDir; + TQString m_name; + TQString m_nickName; + TQString m_doctype; + TQString m_dtdURLLine; bool m_caseSensitive; - QString m_defaultExtension; - QDict m_tags; + TQString m_defaultExtension; + TQDict m_tags; }; #endif diff --git a/quanta/parsers/node.cpp b/quanta/parsers/node.cpp index 0831a67c..219716e9 100644 --- a/quanta/parsers/node.cpp +++ b/quanta/parsers/node.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ //qt includes -#include -#include +#include +#include #include @@ -27,7 +27,7 @@ #include "structtreetag.h" #include "kafkacommon.h" -QMap nodes; //list of all created nodes. Used to do some own memory management and avoid double deletes, for whatever reason they happen... +TQMap nodes; //list of all created nodes. Used to do some own memory management and avoid double deletes, for whatever reason they happen... int NN = 0; //for debugging purposes: count the Node objects @@ -112,10 +112,10 @@ Node::~Node() NN--; } -void Node::save(QDomElement& element) const +void Node::save(TQDomElement& element) const { //kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl; - QDomElement child_element; + TQDomElement child_element; if(next) { child_element = element.ownerDocument().createElement("nodeNext"); @@ -150,26 +150,26 @@ void Node::save(QDomElement& element) const element.setAttribute("specialInsideXml", specialInsideXml); // bool element.setAttribute("fileName", fileName); // QString -/* QString s_element; - QTextStream stream(&s_element, IO_WriteOnly); +/* TQString s_element; + TQTextStream stream(&s_element, IO_WriteOnly); element.save(stream, 3);*/ //kdDebug(25001) << "Load:\n" << s_element << endl; //kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl; } -bool Node::load(QDomElement const& element) +bool Node::load(TQDomElement const& element) { -/* QString s_element; - QTextStream stream(&s_element, IO_WriteOnly); +/* TQString s_element; + TQTextStream stream(&s_element, IO_WriteOnly); element.save(stream, 3);*/ //kdDebug(25001) << "Load:\n" << s_element << endl; - QDomNodeList list = element.childNodes(); + TQDomNodeList list = element.childNodes(); for(unsigned int i = 0; i != list.count(); ++i) { if(list.item(i).isElement()) { - QDomElement e = list.item(i).toElement(); + TQDomElement e = list.item(i).toElement(); if(e.tagName() == "nodeNext") { next = new Node(0); @@ -196,11 +196,11 @@ bool Node::load(QDomElement const& element) } } - closesPrevious = QString(element.attribute("closesPrevious")).toInt(); // bool - opened = QString(element.attribute("opened")).toInt(); // bool - removeAll = QString(element.attribute("removeAll")).toInt(); // bool - insideSpecial = QString(element.attribute("insideSpecial")).toInt(); // bool - specialInsideXml = QString(element.attribute("specialInsideXml")).toInt(); // bool + closesPrevious = TQString(element.attribute("closesPrevious")).toInt(); // bool + opened = TQString(element.attribute("opened")).toInt(); // bool + removeAll = TQString(element.attribute("removeAll")).toInt(); // bool + insideSpecial = TQString(element.attribute("insideSpecial")).toInt(); // bool + specialInsideXml = TQString(element.attribute("specialInsideXml")).toInt(); // bool fileName = element.attribute("fileName"); // QString //kafkaCommon::coutTree(this, 3); @@ -287,21 +287,21 @@ Node *Node::nextNotChild() } } -QString Node::nodeName() +TQString Node::nodeName() { if(tag) return tag->name; - return QString::null; + return TQString::null; } -QString Node::nodeValue() +TQString Node::nodeValue() { if(tag) return tag->tagStr(); - return QString::null; + return TQString::null; } -void Node::setNodeValue(const QString &value) +void Node::setNodeValue(const TQString &value) { if(!tag) tag = new Tag(); @@ -500,7 +500,7 @@ Node *Node::getOpeningNode() int Node::size() { int l = tag->size(); - l += 5*sizeof(Node*) + sizeof(QListViewItem*) + 2*sizeof(Tag*) + 2*sizeof(DOM::Node); + l += 5*sizeof(Node*) + sizeof(TQListViewItem*) + 2*sizeof(Tag*) + 2*sizeof(DOM::Node); return l; } @@ -530,7 +530,7 @@ void Node::detachNode() //kdDebug(24000) << &m_groupElements << " " << this << endl; //Remove the references to this node from the list of group elements. //They are actually stored in globalGroupMap. - for (QValueListIterator it = m_groupElements.begin(); it != m_groupElements.end(); ++it) + for (TQValueListIterator it = m_groupElements.begin(); it != m_groupElements.end(); ++it) { GroupElement *groupElement = (*it); groupElement->node = 0L; @@ -546,7 +546,7 @@ void Node::detachNode() kdDebug(24001) << count << " GroupElement scheduled for deletion. " << &m_groupElements << endl; #endif - QValueListIterator listItem; + TQValueListIterator listItem; for ( listItem = listItems.begin(); listItem != listItems.end(); ++listItem) { static_cast(*listItem)->node = 0L; diff --git a/quanta/parsers/node.h b/quanta/parsers/node.h index e3587c05..87d54141 100644 --- a/quanta/parsers/node.h +++ b/quanta/parsers/node.h @@ -18,9 +18,9 @@ #ifndef NODE_H #define NODE_H -#include -#include -#include +#include +#include +#include #include class QDomElement; @@ -40,12 +40,12 @@ struct GroupElement{ Node *parentNode; bool global; bool deleted; - QString type; + TQString type; XMLStructGroup *group; /// GroupElementList; -typedef QMap GroupElementMapList; +typedef TQValueList GroupElementList; +typedef TQMap GroupElementMapList; /** * A Node is a basic unit of a Tree. It keeps track of his parent, his left neighbour, his right neighbour @@ -79,8 +79,8 @@ public: void operator =(Node* node); /** For Kafka copy/paste */ - void save(QDomElement& element) const; - bool load(QDomElement const& element); + void save(TQDomElement& element) const; + bool load(TQDomElement const& element); Node *next; Node *prev; @@ -96,9 +96,9 @@ public: Node *nextNotChild(); /** DOM like functions cf dom/dom_node.h */ - QString nodeName(); - QString nodeValue(); - void setNodeValue(const QString &value); + TQString nodeName(); + TQString nodeValue(); + void setNodeValue(const TQString &value); Node* parentNode() {return parent;} Node* firstChild() {return child;} Node* lastChild(); @@ -162,15 +162,15 @@ public: */ Tag *tag; - QValueList listItems; /// listItems; /// - QString fileName; //the node is in this file. If empty, it's in the current document - QValueList m_groupElements; ///< all the group elements pointing to this node + TQString fileName; //the node is in this file. If empty, it's in the current document + TQValueList m_groupElements; ///< all the group elements pointing to this node private: /** diff --git a/quanta/parsers/parser.cpp b/quanta/parsers/parser.cpp index 7559f1ec..1225aaa3 100644 --- a/quanta/parsers/parser.cpp +++ b/quanta/parsers/parser.cpp @@ -14,18 +14,18 @@ ***************************************************************************/ //qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //standard library includes #include @@ -65,10 +65,10 @@ #include extern GroupElementMapList globalGroupMap; -static const QChar space(' '); +static const TQChar space(' '); extern int NN; -extern QMap nodes; +extern TQMap nodes; Parser::Parser() { @@ -79,10 +79,10 @@ Parser::Parser() m_parsingNeeded = true; m_parseIncludedFiles = true; m_saParser = new SAParser(); - connect(m_saParser, SIGNAL(rebuildStructureTree(bool)), SIGNAL(rebuildStructureTree(bool))); - connect(m_saParser, SIGNAL(cleanGroups()), SLOT(cleanGroups())); + connect(m_saParser, TQT_SIGNAL(rebuildStructureTree(bool)), TQT_SIGNAL(rebuildStructureTree(bool))); + connect(m_saParser, TQT_SIGNAL(cleanGroups()), TQT_SLOT(cleanGroups())); ParserCommon::includeWatch = new KDirWatch(); - connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&))); + connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&))); } Parser::~Parser() @@ -94,7 +94,7 @@ Parser::~Parser() Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, Node **lastNode, Node *a_node) { //first parse as an XML document - QString textLine; + TQString textLine; textLine.fill(space, startCol); int line = startLine; int col = 0; @@ -147,7 +147,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No currentNode = ParserCommon::createTextNode(write, currentNode, line, specialStartPos, parentNode); if (!rootNode) rootNode = currentNode; - QString foundText = m_dtd->specialAreaStartRx.cap(); + TQString foundText = m_dtd->specialAreaStartRx.cap(); //create a toplevel node for the special area AreaStruct area(line, specialStartPos, line, specialStartPos + foundText.length() - 1); Node *node = ParserCommon::createScriptTagNode(write, area, foundText, m_dtd, parentNode, currentNode); @@ -247,7 +247,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No //build an xml tag node here AreaStruct area(tagStartLine, tagStartPos, tagEndLine, tagEndCol); tag = new Tag(area, write, m_dtd, true); - QString tagStr = tag->tagStr(); + TQString tagStr = tag->tagStr(); tag->type = Tag::XmlTag; tag->validXMLTag = (openNum == 0); tag->single = QuantaCommon::isSingleTag(m_dtd->name, tag->name); @@ -282,15 +282,15 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No if (!rootNode) rootNode = node; //find the DTD that needs to be used for the special area - QString tmpStr = m_dtd->specialTags[tag->name.lower()]; + TQString tmpStr = m_dtd->specialTags[tag->name.lower()]; int defPos = tmpStr.find('['); - QString defValue; + TQString defValue; if (defPos != 0) { defValue = tmpStr.mid(defPos+1, tmpStr.findRev(']')-defPos-1).stripWhiteSpace(); tmpStr = tmpStr.left(defPos); } - QString s = tag->attributeValue(tmpStr); + TQString s = tag->attributeValue(tmpStr); if (s.isEmpty()) s = defValue; const DTDStruct *dtd = DTDs::ref()->find(s); @@ -325,7 +325,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No qTag = QuantaCommon::tagFromDTD(m_dtd, parentNode->tag->name); if ( qTag ) { - QString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper(); + TQString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper(); searchFor.remove('/'); if ( qTag->stoppingTags.contains(searchFor)) { @@ -364,7 +364,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No { //handle the case when a tag is a stopping tag for parent, and grandparent and so on. Node *n = parentNode; - QString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper(); + TQString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper(); while (qTag && n) { qTag = QuantaCommon::tagFromDTD(m_dtd, n->tag->name); @@ -505,7 +505,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No from Nodes */ Node *Parser::parse(Document *w, bool force) { - QTime t; + TQTime t; t.start(); QuantaView *view = ViewManager::ref()->activeView(); //If VPL is loaded, there shouldn't be any rebuild @@ -527,8 +527,8 @@ Node *Parser::parse(Document *w, bool force) Node::deleteNode(baseNode); baseNode = 0L; kdDebug(24000) << "Node objects after delete = " << NN << " ; list count = " << nodes.count() << endl; -/* QMap nList = nodes; - for (QValueList::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it) +/* TQMap nList = nodes; + for (TQValueList::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it) Node::deleteNode(*it); kdDebug(24000) << "Node objects after cleanup = " << NN << " ; list count = " << nodes.count() << endl; */ } @@ -567,7 +567,7 @@ Node *Parser::parse(Document *w, bool force) emit nodeTreeChanged(); if (saParserEnabled) - QTimer::singleShot(0, this, SLOT(slotParseInDetail())); + TQTimer::singleShot(0, this, TQT_SLOT(slotParseInDetail())); return m_node; } @@ -702,8 +702,8 @@ bool Parser::invalidArea(Document *w, AreaStruct &area, Node **firstNode, Node * w->viewCursorIf->cursorPositionReal(&line, &col); Node *node = nodeAt(line, col, false); int bl, bc, el, ec; - QString text; - QString tagStr; + TQString text; + TQString tagStr; area.bLine = area.bCol = 0; area.eLine = maxLines; area.eCol = w->editIf->lineLength(maxLines) - 1; @@ -976,7 +976,7 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) Node *Parser::rebuild(Document *w) { kdDebug(24000) << "Rebuild started. " << endl; - QTime t; + TQTime t; t.start(); bool saParserEnabled = m_saParser->parsingEnabled(); @@ -1002,8 +1002,8 @@ Node *Parser::rebuild(Document *w) m_saParser->setParsingEnabled(false); m_saParser->init(0L, w); parsingEnabled = true; - QString text; - QString tagStr; + TQString text; + TQString tagStr; Node *firstNode = 0L; Node *lastNode = 0L; @@ -1020,7 +1020,7 @@ Node *Parser::rebuild(Document *w) return n; } - kdDebug(24000) << QString("Invalid area: %1,%2,%3,%4").arg(area.bLine).arg(area.bCol).arg(area.eLine).arg(area.eCol) << "\n"; + kdDebug(24000) << TQString("Invalid area: %1,%2,%3,%4").arg(area.bLine).arg(area.bCol).arg(area.eLine).arg(area.eCol) << "\n"; // kdDebug(24000) << "lastNode1: " << lastNode << " " << lastNode->tag << endl; deleteNodes(firstNode->nextSibling(), lastNode, modifs); @@ -1082,7 +1082,7 @@ Node *Parser::rebuild(Document *w) lastNode->tag->endPos(area.eLine, area.eCol); Tag *_tag = new Tag(*(lastNode->tag)); lastNode->tag->setTagPosition(area); - QString s = write->text(area); + TQString s = write->text(area); lastNode->tag->setStr(s); if (!s.simplifyWhiteSpace().isEmpty()) { @@ -1141,7 +1141,7 @@ Node *Parser::rebuild(Document *w) qTag = QuantaCommon::tagFromDTD(m_dtd, node->parent->tag->name); if ( qTag ) { - QString searchFor = (m_dtd->caseSensitive)?lastNode->tag->name:lastNode->tag->name.upper(); + TQString searchFor = (m_dtd->caseSensitive)?lastNode->tag->name:lastNode->tag->name.upper(); searchFor.remove('/'); if ( qTag->stoppingTags.contains( searchFor ) ) { @@ -1172,7 +1172,7 @@ Node *Parser::rebuild(Document *w) { //handle the case when a tag is a stopping tag for parent, and grandparent and so on. I'm not sure it's needed here, but anyway... Node *n = node->parent; - QString searchFor = (m_dtd->caseSensitive) ? lastNode->tag->name : lastNode->tag->name.upper(); + TQString searchFor = (m_dtd->caseSensitive) ? lastNode->tag->name : lastNode->tag->name.upper(); while (qTag && n) { qTag = QuantaCommon::tagFromDTD(m_dtd, n->tag->name); @@ -1226,7 +1226,7 @@ Node *Parser::rebuild(Document *w) return n; } /* if (lastNode) - QString s = lastNode->tag->tagStr();*/ + TQString s = lastNode->tag->tagStr();*/ } } /* kdDebug(24000)<< "END"<< endl; @@ -1244,7 +1244,7 @@ Node *Parser::rebuild(Document *w) m_saParser->init(m_node, w); if (saParserEnabled) - QTimer::singleShot(0, this, SLOT(slotParseInDetail())); + TQTimer::singleShot(0, this, TQT_SLOT(slotParseInDetail())); emit nodeTreeChanged(); m_parsingNeeded = false; return m_node; @@ -1297,7 +1297,7 @@ void Parser::clearGroups() ParserCommon::includedFilesDTD.clear(); delete ParserCommon::includeWatch; ParserCommon::includeWatch = new KDirWatch(); - connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&))); + connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&))); m_parseIncludedFiles = true; } @@ -1345,7 +1345,7 @@ void Parser::cleanGroups() { delete ParserCommon::includeWatch; ParserCommon::includeWatch = new KDirWatch(); - connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&))); + connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&))); parseIncludedFiles(); } } @@ -1404,33 +1404,33 @@ struct GroupElementPosition{ int endPos; }; -void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) +void Parser::parseIncludedFile(const TQString& fileName, const DTDStruct *dtd) { #ifdef DEBUG_PARSER kdDebug(24000) << "parseIncludedFile: " << fileName << endl; #endif StructTreeGroup group; - QString content; - QFile file(fileName); + TQString content; + TQFile file(fileName); if (file.open(IO_ReadOnly)) { IncludedGroupElements *elements = &includedMap[fileName]; - QTextStream str(&file); - QString encoding; + TQTextStream str(&file); + TQString encoding; KTextEditor::EncodingInterface* encodingIf = dynamic_cast(write->doc()); if (encodingIf) encoding = encodingIf->encoding(); if (encoding.isEmpty()) encoding = "utf8"; //final fallback - str.setCodec(QTextCodec::codecForName(encoding)); + str.setCodec(TQTextCodec::codecForName(encoding)); content = str.read(); file.close(); if (dtd->specialAreas.count()) { int areaPos = 0; int lastAreaPos = 0; - QString foundStr; - QString specialEndStr; + TQString foundStr; + TQString specialEndStr; while (areaPos != -1) { areaPos = content.find(dtd->specialAreaStartRx, lastAreaPos); @@ -1452,7 +1452,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) QuantaCommon::removeCommentsAndQuotes(foundStr, dtd); //gather the starting position of structures - QValueList structPositions; + TQValueList structPositions; int structPos = 0; while (structPos !=-1) { @@ -1464,10 +1464,10 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) } } - QValueList gPositions; + TQValueList gPositions; //go through the list of found structures and search for groups int structStartPosition = 0; //from where to start the group search. This is before the structure begin position - QString savedStr = foundStr; + TQString savedStr = foundStr; for (uint i = 0; i < structPositions.count(); i++) { foundStr = savedStr; @@ -1492,7 +1492,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) pos = foundStr.length(); int structEndPos = pos; foundStr = foundStr.left(pos); - QString spaces; + TQString spaces; spaces.fill(' ', pos - structPos + 1); foundStr.replace(structPos, pos - structPos + 1, spaces); @@ -1522,7 +1522,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) //now check which groups are present in this area structPos = pos + 1; - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for (it = dtd->structTreeGroups.begin(); it != dtd->structTreeGroups.end(); ++it) { group = *it; @@ -1535,7 +1535,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) if (pos != -1) { int l; - QString ss = group.definitionRx.cap(); + TQString ss = group.definitionRx.cap(); if (group.definitionRx.pos(1) > pos) { pos = group.definitionRx.pos(1); @@ -1546,7 +1546,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) { l = group.definitionRx.cap().length(); } - QString s = content.mid(areaPos + pos, l); + TQString s = content.mid(areaPos + pos, l); pos += l; if (!(*elements)[group.name].contains(s)) { @@ -1554,7 +1554,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) tag->name = s; tag->setDtd(dtd); tag->setWrite(write); - QString s2 = content.left(areaPos + pos); + TQString s2 = content.left(areaPos + pos); int newLineNum = s2.contains('\n'); int tmpCol = s2.length() - s2.findRev('\n') - 1; tag->setTagPosition(newLineNum, tmpCol - s.length(), newLineNum, tmpCol); @@ -1565,7 +1565,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) groupElement->node = node; groupElement->parentNode = 0L; int minPos = areaPos + pos + 1; - for (QValueList::Iterator gPosIt = gPositions.begin(); gPosIt != gPositions.end(); ++gPosIt) + for (TQValueList::Iterator gPosIt = gPositions.begin(); gPosIt != gPositions.end(); ++gPosIt) { GroupElementPosition gPos = (*gPosIt); if ( (areaPos + pos > gPos.startPos) && (areaPos + pos < gPos.endPos) && (gPos.startPos < minPos)) @@ -1604,7 +1604,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) } } -void Parser::slotIncludedFileChanged(const QString& fileName) +void Parser::slotIncludedFileChanged(const TQString& fileName) { int pos = ParserCommon::includedFiles.findIndex(fileName); if (pos != -1) @@ -1640,8 +1640,8 @@ void Parser::parseForXMLGroup(Node *node) { XMLStructGroup group = xmlGroupIt.data(); Tag *newTag = new Tag(*node->tag); - QString title = ""; - QStringList::Iterator it; + TQString title = ""; + TQStringList::Iterator it; for (it = group.attributes.begin(); it != group.attributes.end(); ++it) { if (newTag->hasAttribute(*it)) @@ -1674,10 +1674,10 @@ bool Parser::parseScriptInsideTag(Node *startNode) const DTDStruct *dtd = startNode->tag->dtd(); if (dtd->specialAreas.count()) { - QString foundText; - QString s; - QString specialEndStr; - QString text = startNode->tag->tagStr(); + TQString foundText; + TQString s; + TQString specialEndStr; + TQString text = startNode->tag->tagStr(); int pos = 0; int col = startNode->tag->structBeginStr.length(); @@ -1751,7 +1751,7 @@ void Parser::synchParseInDetail() void Parser::setSAParserEnabled(bool enabled) { m_saParser->setParsingEnabled(enabled); - //kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers); //this makes sure that the parsing is really disabled + //kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); //this makes sure that the parsing is really disabled } #include "parser.moc" diff --git a/quanta/parsers/parser.h b/quanta/parsers/parser.h index db797df0..94f24aff 100644 --- a/quanta/parsers/parser.h +++ b/quanta/parsers/parser.h @@ -16,13 +16,13 @@ #ifndef PARSER_H #define PARSER_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include +#include #include "node.h" #include "tag.h" @@ -38,11 +38,11 @@ class QRegExp; class NodeModifsSet; class SAParser; -typedef QMap IncludedGroupElements; -typedef QMap IncludedGroupElementsMap; +typedef TQMap IncludedGroupElements; +typedef TQMap IncludedGroupElementsMap; -class Parser: public QObject { +class Parser: public TQObject { Q_OBJECT @@ -95,7 +95,7 @@ public slots: void cleanGroups(); private slots: - void slotIncludedFileChanged(const QString& fileName); + void slotIncludedFileChanged(const TQString& fileName); signals: void nodeTreeChanged(); @@ -103,19 +103,19 @@ signals: private: Node* m_node; //the internal Node pointer - QString m_dtdName; //the DTD name of write + TQString m_dtdName; //the DTD name of write const DTDStruct* m_dtd; //the dtd used for main parsing - QGuardedPtr write; //pointer to the parsed document + TQGuardedPtr write; //pointer to the parsed document int maxLines; // how many lines are in the current document int oldMaxLines; int treeSize; - QMap::ConstIterator xmlGroupIt; + TQMap::ConstIterator xmlGroupIt; bool m_parsingEnabled; bool m_parsingNeeded; /** Clears the group elements found in the included files */ void clearIncludedGroupElements(); - void parseIncludedFile(const QString &fileName, const DTDStruct *dtd); + void parseIncludedFile(const TQString &fileName, const DTDStruct *dtd); /** Searches for scripts inside the text from startNode. It looks only for the script begin/and delimiters, and not for the