summaryrefslogtreecommitdiffstats
path: root/quanta/parsers/dtd/dtdparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/parsers/dtd/dtdparser.cpp')
-rw-r--r--quanta/parsers/dtd/dtdparser.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp
index 0d623978..577d2734 100644
--- a/quanta/parsers/dtd/dtdparser.cpp
+++ b/quanta/parsers/dtd/dtdparser.cpp
@@ -72,10 +72,10 @@ DTDParser::~DTDParser()
bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
{
bool fineTune = false;
- TQString fileName = TQString::null;
+ TQString fileName = TQString();
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)));
+ KMessageBox::error(0, i18n("<qt>Cannot download the DTD from <b>%1</b>.</qt>").tqarg( m_dtdURL.prettyURL(0, KURL::StripFileProtocol)));
return false;
}
DTD::dtd_ptr = xmlParseDTD(NULL, xmlCharStrndup(fileName.utf8(), fileName.utf8().length()));
@@ -86,23 +86,23 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
xmlErrorPtr errorPtr = xmlGetLastError();
if (errorPtr != NULL)
{
- TQString s = TQString::fromLatin1(errorPtr->message);
+ TQString s = TQString::tqfromLatin1(errorPtr->message);
if (!s.isEmpty())
errorStr = s;
- s = TQString::fromLatin1(errorPtr->str1);
+ s = TQString::tqfromLatin1(errorPtr->str1);
if (!s.isEmpty())
errorStr += "<br>" + s;
- s = TQString::fromLatin1(errorPtr->str2);
+ s = TQString::tqfromLatin1(errorPtr->str2);
if (!s.isEmpty())
errorStr += "<br>" + s;
- s = TQString::fromLatin1(errorPtr->str2);
+ s = TQString::tqfromLatin1(errorPtr->str2);
if (!s.isEmpty())
errorStr += "<br>" + s;
- errorStr += TQString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2);
+ errorStr += TQString("(%1, %2)").tqarg(errorPtr->line).tqarg(errorPtr->int2);
xmlResetError(errorPtr);
}
#endif
- KMessageBox::error(0, i18n("<qt>Error while parsing the DTD.<br>The error message is:<br><i>%1</i></qt>").arg(errorStr));
+ KMessageBox::error(0, i18n("<qt>Error while parsing the DTD.<br>The error message is:<br><i>%1</i></qt>").tqarg(errorStr));
return false;
}
if (targetDir.isEmpty())
@@ -123,8 +123,8 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
m_name = w.dtdName->text();
m_nickName = w.nickName->text();
m_doctype = w.doctype->text();
- m_doctype.replace(TQRegExp("<!doctype", false), "");
- m_doctype = m_doctype.left(m_doctype.findRev(">"));
+ m_doctype.tqreplace(TQRegExp("<!doctype", false), "");
+ m_doctype = m_doctype.left(m_doctype.tqfindRev(">"));
m_dtdURLLine = w.dtdURL->text();
m_defaultExtension = w.defaultExtension->text();
m_caseSensitive = w.caseSensitive->isChecked();
@@ -134,7 +134,7 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
DTD::dirName = targetDir;
KURL u;
u.setPath(DTD::dirName);
- if (!QExtFileInfo::createDir(u, 0L)) {
+ if (!TQExtFileInfo::createDir(u, 0L)) {
QuantaCommon::dirCreationError(0L, u);
return false;
}
@@ -144,7 +144,7 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
TQFile file( DTD::dirName + "entities.tag" );
if ( file.open( IO_WriteOnly ) )
{
- DTD::entityStream.setDevice(&file);
+ DTD::entityStream.setDevice(TQT_TQIODEVICE(&file));
DTD::entityStream.setEncoding(TQTextStream::UnicodeUTF8);
DTD::entityStream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
DTD::entityStream << "<!DOCTYPE TAGS>" << endl
@@ -154,8 +154,8 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
file.close();
} else
{
- KMessageBox::error(0L, i18n("<qt>Cannot create the <br><b>%1</b> file.<br>Check that you have write permission in the parent folder.</qt>")
- .arg(file.name()));
+ KMessageBox::error(0L, i18n("<qt>Cannot create the <br><b>%1</b> file.<br>Check that you have write permission in the tqparent folder.</qt>")
+ .tqarg(file.name()));
return false;
}
}
@@ -235,7 +235,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf)
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 2: {attr->status = "required"; break;} //RETQUIRED
case 3: {attr->status = "implied"; break;} //IMPLIED
case 4: {attr->status = "fixed"; break;} //FIXED
}
@@ -265,7 +265,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf)
if (childNum > 0)
{
- stream << "<children>" << endl;
+ stream << "<tqchildren>" << endl;
for( int i = 0; i < childNum; i++ )
{
stream << " <child name=\"" << TQString((const char*)list_ptr[i]) << "\"";
@@ -293,14 +293,14 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf)
stream << " />" << endl;
}
- stream << "</children>" << endl;
+ stream << "</tqchildren>" << endl;
stream << endl;
}
/*
xmlElementContentPtr content_ptr = el_ptr->content;
if (content_ptr)
{
- stream << "<children>" << endl;
+ stream << "<tqchildren>" << endl;
while (content_ptr)
{
if (!TQString((const char*)content_ptr->name).isEmpty())
@@ -325,17 +325,17 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf)
{
if (content_ptr == el_ptr->content)
break;
- if (content_ptr->parent)
+ if (content_ptr->tqparent)
{
- if (content_ptr == content_ptr->parent->c1)
+ if (content_ptr == content_ptr->tqparent->c1)
content_ptr->c1 = 0L;
else
content_ptr->c2 = 0L;
}
- content_ptr = content_ptr->parent;
+ content_ptr = content_ptr->tqparent;
}
}
- stream << "</children>" << endl;
+ stream << "</tqchildren>" << endl;
} */
}
stream << "</tag>" << endl