diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-08-09 22:25:47 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-08-09 22:25:47 -0500 |
commit | eaa7ee2e0bbca40ba3173c4304f81957e8964291 (patch) | |
tree | 4f793aa48a5080aedc94ce6e519c3b86708f2b88 /tqtinterface/qt4/src/xml/tqxml.cpp | |
parent | 79a9d7a46a20d4a0923bc06fc471fdc2176ef865 (diff) | |
download | experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.tar.gz experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
Diffstat (limited to 'tqtinterface/qt4/src/xml/tqxml.cpp')
-rw-r--r-- | tqtinterface/qt4/src/xml/tqxml.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/tqtinterface/qt4/src/xml/tqxml.cpp b/tqtinterface/qt4/src/xml/tqxml.cpp index 9462b33..fa98822 100644 --- a/tqtinterface/qt4/src/xml/tqxml.cpp +++ b/tqtinterface/qt4/src/xml/tqxml.cpp @@ -173,7 +173,7 @@ static const signed char charLookupTable[256]={ /* This function strips the TextDecl [77] ("<?xml ...?>") from the string \a - str. The stripped version is stored in \a str. If this function tqfinds an + str. The stripped version is stored in \a str. If this function finds an invalid TextDecl, it returns FALSE, otherwise TRUE. This function is used for external entities since those can include an @@ -190,7 +190,7 @@ static bool stripTextDecl( TQString& str ) "(encoding\\s*=\\s*((['\"])[A-Za-z][-a-zA-Z0-9_.]*\\6))?" "\\s*\\?>" )); - TQString strTmp = str.tqreplace( textDecl, "" ); + TQString strTmp = str.replace( textDecl, "" ); if ( strTmp.length() != str.length() ) return FALSE; // external entity has wrong TextDecl str = strTmp; @@ -476,7 +476,7 @@ TQString TQXmlNamespaceSupport::uri( const TQString& prefix ) const void TQXmlNamespaceSupport::splitName( const TQString& qname, TQString& prefix, TQString& localname ) const { - int pos = qname.tqfind(':'); + int pos = qname.find(':'); if (pos == -1) pos = qname.length(); @@ -691,7 +691,7 @@ void TQXmlNamespaceSupport::reset() */ int TQXmlAttributes::index( const TQString& qName ) const { - return qnameList.tqfindIndex( qName ); + return qnameList.findIndex( qName ); } /*! @@ -908,10 +908,10 @@ void TQXmlAttributes::append( const TQString &qName, const TQString &uri, const class. This class recognizes the encoding of the data by reading the - encoding declaration in the XML file if it tqfinds one, and reading - the data using the corresponding encoding. If it does not tqfind an + encoding declaration in the XML file if it finds one, and reading + the data using the corresponding encoding. If it does not find an encoding declaration, then it assumes that the data is either in - UTF-8 or UTF-16, depending on whether it can tqfind a byte-order + UTF-8 or UTF-16, depending on whether it can find a byte-order mark. There are two ways to populate the input source with data: you can @@ -953,7 +953,7 @@ void TQXmlInputSource::init() } /*! - Constructs an input source which tqcontains no data. + Constructs an input source which contains no data. \sa setData() */ @@ -1048,7 +1048,7 @@ void TQXmlInputSource::reset() } /*! - Returns the data the input source tqcontains or TQString::null if the + Returns the data the input source contains or TQString::null if the input source does not contain any data. \sa setData() TQXmlInputSource() fetchData() @@ -1061,7 +1061,7 @@ TQString TQXmlInputSource::data() /*! Sets the data of the input source to \a dat. - If the input source already tqcontains data, this function deletes + If the input source already contains data, this function deletes that data first. \sa data() @@ -1091,7 +1091,7 @@ void TQXmlInputSource::setData( const TQByteArray& dat ) construction. If the input source already contained data, this function deletes that data first. - This object tqcontains no data after a call to this function if the + This object contains no data after a call to this function if the object was constructed without a tqdevice to read data from or if this function was not able to get more data from the tqdevice. @@ -1165,10 +1165,10 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning TQString input = encMapper->toUnicode( data.data(), data.size() ); // ### unexpected EOF? (for incremental parsing) // starts the document with an XML declaration? - if ( input.tqfind("<?xml") == 0 ) { - // try to tqfind out if there is an encoding - int endPos = input.tqfind( ">" ); - int pos = input.tqfind( "encoding" ); + if ( input.find("<?xml") == 0 ) { + // try to find out if there is an encoding + int endPos = input.find( ">" ); + int pos = input.find( "encoding" ); if ( pos < endPos && pos != -1 ) { TQString encoding; do { @@ -1302,7 +1302,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning The reader calls this function to signal the begin of a prefix-URI namespace mapping scope. This information is not necessary for normal namespace processing since the reader automatically - tqreplaces prefixes for element and attribute names. + replaces prefixes for element and attribute names. Note that startPrefixMapping() and endPrefixMapping() calls are not guaranteed to be properly nested relative to each other: all @@ -1350,8 +1350,8 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning cause a startElement() call to be immediately followed by an endElement() call. - The attribute list provided only tqcontains attributes with explicit - values. The attribute list tqcontains attributes used for namespace + The attribute list provided only contains attributes with explicit + values. The attribute list contains attributes used for namespace declaration (i.e. attributes starting with xmlns) only if the namespace-prefix property of the reader is TRUE. @@ -1575,7 +1575,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning /*! \fn bool TQXmlDTDHandler::unparsedEntityDecl( const TQString& name, const TQString& publicId, const TQString& systemId, const TQString& notationName ) - The reader calls this function when it tqfinds an unparsed entity + The reader calls this function when it finds an unparsed entity declaration. The argument \a name is the unparsed entity's name, \a publicId is @@ -3537,7 +3537,7 @@ bool TQXmlSimpleReader::processElementEmptyTag() // call the handler for prefix mapping prefixesAfter = d->namespaceSupport.prefixes(); for ( TQStringList::Iterator it = prefixesBefore.begin(); it != prefixesBefore.end(); ++it ) { - if ( prefixesAfter.tqcontains(*it) == 0 ) { + if ( prefixesAfter.contains(*it) == 0 ) { if ( !contentHnd->endPrefixMapping( *it ) ) { reportParseError( contentHnd->errorString() ); return FALSE; @@ -3597,7 +3597,7 @@ bool TQXmlSimpleReader::processElementETagBegin2() prefixesAfter = d->namespaceSupport.d->ns; if (prefixesBefore.size() != prefixesAfter.size()) { for (NamespaceMap::const_iterator it = prefixesBefore.constBegin(); it != prefixesBefore.constEnd(); ++it) { - if (!it.key().isEmpty() && !prefixesAfter.tqcontains(it.key())) { + if (!it.key().isEmpty() && !prefixesAfter.contains(it.key())) { if (!contentHnd->endPrefixMapping(it.key())) { reportParseError(contentHnd->errorString()); return FALSE; @@ -4963,13 +4963,13 @@ bool TQXmlSimpleReader::parsePEReference() TQString xmlRefString; TQMap<TQString,TQString>::Iterator it; - it = d->parameterEntities.tqfind( ref() ); + it = d->parameterEntities.find( ref() ); if ( it != d->parameterEntities.end() ) { skipIt = FALSE; xmlRefString = it.data(); } else if ( entityRes ) { TQMap<TQString,TQXmlSimpleReaderPrivate::ExternParameterEntity>::Iterator it2; - it2 = d->externParameterEntities.tqfind( ref() ); + it2 = d->externParameterEntities.find( ref() ); TQXmlInputSource *ret = 0; if ( it2 != d->externParameterEntities.end() ) { if ( !entityRes->resolveEntity( it2.data().publicId, it2.data().systemId, ret ) ) { @@ -6666,8 +6666,8 @@ bool TQXmlSimpleReader::parseComment() of the attribute (i.e. all whitespaces are already parsed). The head stand on the next character after the end quotes. The - variable name tqcontains the name of the attribute and the variable - string tqcontains the value of the attribute. + variable name contains the name of the attribute and the variable + string contains the value of the attribute. */ bool TQXmlSimpleReader::parseAttribute() { @@ -6950,7 +6950,7 @@ bool TQXmlSimpleReader::parseNmtoken() parseReference_charDataRead is set to FALSE if the reference must be parsed. The charachter(s) which the reference mapped to are inserted at the reference - position. The head stands on the first character of the tqreplacement). + position. The head stands on the first character of the replacement). */ bool TQXmlSimpleReader::parseReference() { @@ -7115,7 +7115,7 @@ bool TQXmlSimpleReader::parseReference() whereby undefined entities in attribute values would be appended after the element that contained them. - The solution is not perfect - the undefined entity reference is tqreplaced by + The solution is not perfect - the undefined entity reference is replaced by an empty string. The propper fix will come in TQt4, when SAX will be extended so that attribute values can be made up of multiple tqchildren, rather than just a single string value. @@ -7178,7 +7178,7 @@ bool TQXmlSimpleReader::processReference() d->parseReference_charDataRead = TRUE; } else { TQMap<TQString,TQString>::Iterator it; - it = d->entities.tqfind( reference ); + it = d->entities.find( reference ); if ( it != d->entities.end() ) { // "Internal General" switch ( d->parseReference_context ) { @@ -7213,7 +7213,7 @@ bool TQXmlSimpleReader::processReference() } } else { TQMap<TQString,TQXmlSimpleReaderPrivate::ExternEntity>::Iterator itExtern; - itExtern = d->externEntities.tqfind( reference ); + itExtern = d->externEntities.find( reference ); if ( itExtern == d->externEntities.end() ) { // entity not declared // ### check this case for conformance @@ -7379,7 +7379,7 @@ bool TQXmlSimpleReader::insertXmlRef( const TQString &data, const TQString &name { if ( inLiteral ) { TQString tmp = data; - d->xmlRef.push( TQT_TQSTRING(tmp.tqreplace( "\"", """ )).tqreplace( "'", "'" ) ); + d->xmlRef.push( TQT_TQSTRING(tmp.replace( "\"", """ )).replace( "'", "'" ) ); } else { d->xmlRef.push( data ); } @@ -7509,10 +7509,10 @@ void TQXmlSimpleReader::initData() */ bool TQXmlSimpleReader::entityExist( const TQString& e ) const { - if ( d->parameterEntities.tqfind(e) == d->parameterEntities.end() && - d->externParameterEntities.tqfind(e) == d->externParameterEntities.end() && - d->externEntities.tqfind(e) == d->externEntities.end() && - d->entities.tqfind(e) == d->entities.end() ) { + if ( d->parameterEntities.find(e) == d->parameterEntities.end() && + d->externParameterEntities.find(e) == d->externParameterEntities.end() && + d->externEntities.find(e) == d->externEntities.end() && + d->entities.find(e) == d->entities.end() ) { return FALSE; } else { return TRUE; |