diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/parsers/dtd | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/parsers/dtd')
-rw-r--r-- | quanta/parsers/dtd/dtd.cpp | 128 | ||||
-rw-r--r-- | quanta/parsers/dtd/dtd.h | 34 | ||||
-rw-r--r-- | quanta/parsers/dtd/dtdparser.cpp | 84 | ||||
-rw-r--r-- | quanta/parsers/dtd/dtdparser.h | 22 |
4 files changed, 134 insertions, 134 deletions
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 <qfile.h> -#include <qfileinfo.h> -#include <qregexp.h> -#include <qstringlist.h> -#include <qdom.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqregexp.h> +#include <tqstringlist.h> +#include <tqdom.h> #include <klocale.h> #include <kurl.h> @@ -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 << "<!DOCTYPE TAGS>" << endl << "<TAGS>" << endl << "<tag name=\"" << tag << "\">" << 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("<qt>Cannot download the DTD from <b>%1</b>.</qt>").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("<!--"); end = 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 <qdict.h> +#include <tqdict.h> //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<QString> entities; - QDict<QString> elements; - QStringList tags; - QDict<AttributeList> tagAttributes; + TQDict<TQString> entities; + TQDict<TQString> elements; + TQStringList tags; + TQDict<AttributeList> 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 <qcheckbox.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqcheckbox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqregexp.h> +#include <tqstring.h> //kde includes #include <kconfig.h> @@ -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("<qt>Cannot download the DTD from <b>%1</b>.</qt>").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 += "<br>" + s; - s = QString::fromLatin1(errorPtr->str2); + s = TQString::fromLatin1(errorPtr->str2); if (!s.isEmpty()) errorStr += "<br>" + s; - s = QString::fromLatin1(errorPtr->str2); + s = TQString::fromLatin1(errorPtr->str2); if (!s.isEmpty()) errorStr += "<br>" + 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("<!doctype", false), ""); + m_doctype.replace(TQRegExp("<!doctype", false), ""); m_doctype = m_doctype.left(m_doctype.findRev(">")); 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 << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; DTD::entityStream << "<!DOCTYPE TAGS>" << endl << "<TAGS>" << 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 << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; stream << "<!DOCTYPE TAGS>" << endl << "<TAGS>" << 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 << "<children>" << endl; for( int i = 0; i < childNum; i++ ) { - stream << " <child name=\"" << QString((const char*)list_ptr[i]) << "\""; + stream << " <child name=\"" << TQString((const char*)list_ptr[i]) << "\""; xmlElementPtr child_ptr = xmlGetDtdElementDesc(DTD::dtd_ptr, list_ptr[i]); if (child_ptr && child_ptr->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 << "<children>" << endl; while (content_ptr) { - if (!QString((const char*)content_ptr->name).isEmpty()) + if (!TQString((const char*)content_ptr->name).isEmpty()) { - stream << " <child name=\"" << QString((const char*)content_ptr->name) << "\""; - QString ocur; + stream << " <child name=\"" << TQString((const char*)content_ptr->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 << "<tag name=\"" << name << "\" type=\"entity\" />" << 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 <qdict.h> +#include <tqdict.h> //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<Attribute> m_tags; + TQString m_defaultExtension; + TQDict<Attribute> m_tags; }; #endif |