summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-11-13 00:44:15 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-11-13 00:44:15 (GMT)
commit652e43ddbc4bf32b8c5f634a47a883f7029fd890 (patch)
tree759bdf8ad013eaa288060febf79c9d8438a770cc /src/declarative/qml
parent588c7e44bcd724765b620e3b0c64af59d83c8ac5 (diff)
downloadQt-652e43ddbc4bf32b8c5f634a47a883f7029fd890.zip
Qt-652e43ddbc4bf32b8c5f634a47a883f7029fd890.tar.gz
Qt-652e43ddbc4bf32b8c5f634a47a883f7029fd890.tar.bz2
XMLHttpRequest tests
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qmlxmlhttprequest.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/declarative/qml/qmlxmlhttprequest.cpp b/src/declarative/qml/qmlxmlhttprequest.cpp
index a6cdfb1..1e9ad50 100644
--- a/src/declarative/qml/qmlxmlhttprequest.cpp
+++ b/src/declarative/qml/qmlxmlhttprequest.cpp
@@ -465,12 +465,11 @@ QScriptValue Node::create(QScriptEngine *engine, NodeImpl *data)
case NodeImpl::Entity:
case NodeImpl::EntityReference:
case NodeImpl::Notation:
+ case NodeImpl::ProcessingInstruction:
+ return QScriptValue();
case NodeImpl::CDATA:
instance.setPrototype(CDATA::prototype(engine));
break;
- case NodeImpl::ProcessingInstruction:
- instance.setPrototype(Node::prototype(engine));
- break;
case NodeImpl::Text:
instance.setPrototype(Text::prototype(engine));
break;
@@ -556,8 +555,7 @@ QScriptValue Text::isElementContentWhitespace(QScriptContext *context, QScriptEn
Node node = qscriptvalue_cast<Node>(context->thisObject());
if (node.isNull()) return engine->undefinedValue();
- // ### implement
- return QScriptValue(false);
+ return node.d->data.trimmed().isEmpty();
}
QScriptValue Text::wholeText(QScriptContext *context, QScriptEngine *engine)
@@ -565,8 +563,7 @@ QScriptValue Text::wholeText(QScriptContext *context, QScriptEngine *engine)
Node node = qscriptvalue_cast<Node>(context->thisObject());
if (node.isNull()) return engine->undefinedValue();
- // ### implement
- return QScriptValue(QString());
+ return node.d->data;
}
QScriptValue Text::prototype(QScriptEngine *engine)