Committed on 07/12/2011 at 00:08.
Pushed by aiacovitti into branch 'KDE/4.7'.
Use DOMString
M +4 -4 khtml/html/htmltokenizer.cpp
M +4 -4 khtml/html/htmltokenizer.h
http://commits.kde.org/kdelibs/06c84f365f4d20e14a5889bd9ef9e77d96543b8d
diff --git a/khtml/html/htmltokenizer.cpp b/khtml/html/htmltokenizer.cpp
index 2ca8742..640c74b 100644
--- a/khtml/html/htmltokenizer.cpp
+++ b/khtml/html/htmltokenizer.cpp
@@ -1233,7 +1233,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
{
tag = SearchValue;
*dest++ = 0;
- attrName.clear();
+ attrName = DOMString("");
}
else
tag = AttributeName;
@@ -1276,7 +1276,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
cBuffer[cBufferPos - 1] = '/';
}
if (!a)
- attrName = QLatin1String(QByteArray(cBuffer, cBufferPos+1).data());
+ attrName = DOMString(cBuffer, cBufferPos);
}
dest = buffer;
@@ -1298,7 +1298,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
}
if ( cBufferPos == CBUFLEN ) {
cBuffer[cBufferPos] = '\0';
- attrName = QLatin1String(QByteArray(cBuffer, cBufferPos+1).data());
+ attrName = DOMString(cBuffer, cBufferPos);
dest = buffer;
*dest++ = 0;
tag = SearchEqual;
@@ -1326,7 +1326,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
{
tag = SearchValue;
*dest++ = 0;
- attrName.clear();
+ attrName = DOMString("");
}
else {
DOMString v("");
diff --git a/khtml/html/htmltokenizer.h b/khtml/html/htmltokenizer.h
index ccdb4bb..31b4071 100644
--- a/khtml/html/htmltokenizer.h
+++ b/khtml/html/htmltokenizer.h
@@ -73,7 +73,7 @@ namespace khtml {
if(attrs) attrs->deref();
if(text) text->deref();
}
- void addAttribute(DocumentImpl* /*doc*/, QChar* buffer, const QString& attrName, const DOMString& v)
+ void addAttribute(DocumentImpl* /*doc*/, QChar* buffer, const DOMString& _attrName, const DOMString& v)
{
DOMStringImpl *value = v.implementation();
LocalName localname = LocalName::fromId(0);
@@ -81,8 +81,8 @@ namespace khtml {
if(buffer->unicode()) {
localname = LocalName::fromId(buffer->unicode());
}
- else if ( !attrName.isEmpty() && attrName != "/" ) {
- splitPrefixLocalName(attrName, prefixname, localname, true /* htmlCompat*/);
+ else if ( !_attrName.isEmpty() && _attrName != "/" ) {
+ splitPrefixLocalName(_attrName, prefixname, localname, true /* htmlCompat*/);
}
if (value && localname.id()) {
@@ -351,7 +351,7 @@ protected:
} doctypeComment;
// name of an unknown attribute
- QString attrName;
+ DOMString attrName;
// Used to store the content of
QChar *rawContent;
0 comments:
Post a Comment