summaryrefslogtreecommitdiffstats
path: root/kate/xmltools/pseudo_dtd.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
commit395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch)
tree9829cadb79d2cc7c29a940627fadb28b11e54150 /kate/xmltools/pseudo_dtd.cpp
parent399f47c376fdf4d19192732a701ea9578d11619d (diff)
downloadtdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz
tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/xmltools/pseudo_dtd.cpp')
-rw-r--r--kate/xmltools/pseudo_dtd.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kate/xmltools/pseudo_dtd.cpp b/kate/xmltools/pseudo_dtd.cpp
index 05ac58a..b6cc9b0 100644
--- a/kate/xmltools/pseudo_dtd.cpp
+++ b/kate/xmltools/pseudo_dtd.cpp
@@ -46,7 +46,7 @@ void PseudoDTD::analyzeDTD( TQString &metaDtdUrl, TQString &metaDtd )
if ( ! doc.setContent( metaDtd) )
{
KMessageBox::error(0, i18n("The file '%1' could not be parsed. "
- "Please check that the file is well-formed XML.").arg( metaDtdUrl ),
+ "Please check that the file is well-formed XML.").tqarg( metaDtdUrl ),
i18n( "XML Plugin Error") );
return;
}
@@ -57,7 +57,7 @@ void PseudoDTD::analyzeDTD( TQString &metaDtdUrl, TQString &metaDtd )
"Please check that the file is of this type:\n"
"-//Norman Walsh//DTD DTDParse V2.0//EN\n"
"You can produce such files with dtdparse. "
- "See the Kate Plugin documentation for more information.").arg( metaDtdUrl ),
+ "See the Kate Plugin documentation for more information.").tqarg( metaDtdUrl ),
i18n("XML Plugin Error") );
return;
}
@@ -73,7 +73,7 @@ void PseudoDTD::analyzeDTD( TQString &metaDtdUrl, TQString &metaDtd )
progress.setMinimumDuration( 400 );
progress.setProgress(0);
- // Get information from meta DTD and put it in Qt data structures for fast access:
+ // Get information from meta DTD and put it in TQt data structures for fast access:
if( ! parseEntities( &doc, &progress ) )
return;
@@ -116,7 +116,7 @@ bool PseudoDTD::parseElements( TQDomDocument *doc, TQProgressDialog *progress )
progress->setProgress( progress->progress()+1 );
// FIXME!:
- //qApp->processEvents();
+ //tqApp->processEvents();
subelementList.clear();
TQDomNode node = list.item( i );
@@ -169,7 +169,7 @@ bool PseudoDTD::parseElements( TQDomDocument *doc, TQProgressDialog *progress )
TQDomElement subElem = subNode.toElement();
if( !subElem.isNull() )
{
- TQMap<TQString,bool>::Iterator it = subelementList.find( subElem.attribute( "name" ) );
+ TQMap<TQString,bool>::Iterator it = subelementList.tqfind( subElem.attribute( "name" ) );
if( it != subelementList.end() )
subelementList.remove(it);
}
@@ -192,11 +192,11 @@ bool PseudoDTD::parseElements( TQDomDocument *doc, TQProgressDialog *progress )
}
/**
- * Check which elements are allowed inside a parent element. This returns
+ * Check which elements are allowed inside a tqparent element. This returns
* a list of allowed elements, but it doesn't care about order or if only a certain
* number of occurences is allowed.
*/
-TQStringList PseudoDTD::allowedElements( TQString parentElement )
+TQStringList PseudoDTD::allowedElements( TQString tqparentElement )
{
if( m_sgmlSupport )
{
@@ -204,12 +204,12 @@ TQStringList PseudoDTD::allowedElements( TQString parentElement )
TQMap<TQString,TQStringList>::Iterator it;
for( it = m_elementsList.begin(); it != m_elementsList.end(); ++it )
{
- if( it.key().lower() == parentElement.lower() )
+ if( it.key().lower() == tqparentElement.lower() )
return it.data();
}
}
- else if( m_elementsList.contains(parentElement) )
- return m_elementsList[parentElement];
+ else if( m_elementsList.tqcontains(tqparentElement) )
+ return m_elementsList[tqparentElement];
return TQStringList();
}
@@ -232,7 +232,7 @@ bool PseudoDTD::parseAttributes( TQDomDocument *doc, TQProgressDialog *progress
progress->setProgress( progress->progress()+1 );
// FIXME!!
- //qApp->processEvents();
+ //tqApp->processEvents();
ElementAttributes attrs;
TQDomNode node = list.item(i);
@@ -248,7 +248,7 @@ bool PseudoDTD::parseAttributes( TQDomDocument *doc, TQProgressDialog *progress
if( ! attributeElem.isNull() )
{
- if ( attributeElem.attribute("type") == "#REQUIRED" )
+ if ( attributeElem.attribute("type") == "#RETQUIRED" )
attrs.requiredAttributes.append( attributeElem.attribute("name") );
else
attrs.optionalAttributes.append( attributeElem.attribute("name") );
@@ -275,7 +275,7 @@ TQStringList PseudoDTD::allowedAttributes( TQString element )
}
}
}
- else if( m_attributesList.contains(element) )
+ else if( m_attributesList.tqcontains(element) )
return m_attributesList[element].optionalAttributes + m_attributesList[element].requiredAttributes;
return TQStringList();
@@ -292,7 +292,7 @@ TQStringList PseudoDTD::requiredAttributes( const TQString &element ) const
return it.data().requiredAttributes;
}
}
- else if( m_attributesList.contains(element) )
+ else if( m_attributesList.tqcontains(element) )
return m_attributesList[element].requiredAttributes;
return TQStringList();
@@ -316,7 +316,7 @@ bool PseudoDTD::parseAttributeValues( TQDomDocument *doc, TQProgressDialog *prog
progress->setProgress( progress->progress()+1 );
// FIXME!
- //qApp->processEvents();
+ //tqApp->processEvents();
attributevaluesTmp.clear();
TQDomNode node = list.item(i);
@@ -369,10 +369,10 @@ TQStringList PseudoDTD::attributeValues( TQString element, TQString attribute )
}
}
}
- else if( m_attributevaluesList.contains(element) )
+ else if( m_attributevaluesList.tqcontains(element) )
{
TQMap<TQString,TQStringList> attrVals = m_attributevaluesList[element];
- if( attrVals.contains(attribute) )
+ if( attrVals.tqcontains(attribute) )
return attrVals[attribute];
}
@@ -397,7 +397,7 @@ bool PseudoDTD::parseEntities( TQDomDocument *doc, TQProgressDialog *progress )
progress->setProgress( progress->progress()+1 );
//FIXME!!
- //qApp->processEvents();
+ //tqApp->processEvents();
TQDomNode node = list.item(i);
TQDomElement elem = node.toElement();
if( !elem.isNull()
@@ -410,15 +410,15 @@ bool PseudoDTD::parseEntities( TQDomDocument *doc, TQProgressDialog *progress )
{
TQString exp = expandedElem.text();
// TODO: support more than one &#...; in the expanded text
- /* TODO include do this when the unicode font problem is solved:
- if( exp.contains(TQRegExp("^&#x[a-zA-Z0-9]+;$")) ) {
+ /* TODO include do this when the tqunicode font problem is solved:
+ if( exp.tqcontains(TQRegExp("^&#x[a-zA-Z0-9]+;$")) ) {
// hexadecimal numbers, e.g. "&#x236;"
- uint end = exp.find( ";" );
+ uint end = exp.tqfind( ";" );
exp = exp.mid( 3, end-3 );
exp = TQChar();
- } else if( exp.contains(TQRegExp("^&#[0-9]+;$")) ) {
+ } else if( exp.tqcontains(TQRegExp("^&#[0-9]+;$")) ) {
// decimal numbers, e.g. "&#236;"
- uint end = exp.find( ";" );
+ uint end = exp.tqfind( ";" );
exp = exp.mid( 2, end-2 );
exp = TQChar( exp.toInt() );
}
@@ -445,7 +445,7 @@ TQStringList PseudoDTD::entities( TQString start )
if( (*it).startsWith(start) )
{
TQString str = it.key();
- /* TODO: show entities as unicode character
+ /* TODO: show entities as tqunicode character
if( !it.data().isEmpty() ) {
//str += " -- " + it.data();
TQRegExp re( "&#(\\d+);" );
@@ -463,4 +463,4 @@ TQStringList PseudoDTD::entities( TQString start )
return entities;
}
-// kate: space-indent on; indent-width 2; replace-tabs on; mixed-indent off;
+// kate: space-indent on; indent-width 2; tqreplace-tabs on; mixed-indent off;