summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlbasicscript.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-20 06:06:19 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-20 08:33:23 (GMT)
commit86529642cfdc5cc5a94b735042d0807e3b57e9e1 (patch)
tree3df356de955a131abfed2c84db4f91abf639a583 /src/declarative/qml/qmlbasicscript.cpp
parent275d2a37c0c7179e7f34cc467192a8838705d7c2 (diff)
downloadQt-86529642cfdc5cc5a94b735042d0807e3b57e9e1.zip
Qt-86529642cfdc5cc5a94b735042d0807e3b57e9e1.tar.gz
Qt-86529642cfdc5cc5a94b735042d0807e3b57e9e1.tar.bz2
Rework expression stuff to use a more efficient notify handler
Diffstat (limited to 'src/declarative/qml/qmlbasicscript.cpp')
-rw-r--r--src/declarative/qml/qmlbasicscript.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/declarative/qml/qmlbasicscript.cpp b/src/declarative/qml/qmlbasicscript.cpp
index fb52b91..073642f 100644
--- a/src/declarative/qml/qmlbasicscript.cpp
+++ b/src/declarative/qml/qmlbasicscript.cpp
@@ -265,7 +265,7 @@ QmlBasicScript::QmlBasicScript()
}
/*!
- Create a new QmlBasicScript instance from saved \a data.
+ Load the QmlBasicScript instance with saved \a data.
\a data \b must be data previously acquired from calling compileData() on a
previously created QmlBasicScript instance. Any other data will almost
@@ -277,9 +277,12 @@ QmlBasicScript::QmlBasicScript()
If \a owner is set, it is referenced on creation and dereferenced on
destruction of this instance.
*/
-QmlBasicScript::QmlBasicScript(const char *data, QmlRefCount *owner)
-: flags(0), d((QmlBasicScriptPrivate *)data), rc(owner)
+
+void QmlBasicScript::load(const char *data, QmlRefCount *owner)
{
+ clear();
+ d = (QmlBasicScriptPrivate *)data;
+ rc = owner;
if (rc) rc->addref();
}
@@ -504,7 +507,6 @@ QmlBasicScriptCompiler::fetch(int type, const QMetaObject *mo, int idx)
bool QmlBasicScriptCompiler::parseName(AST::Node *node)
{
-
QStringList nameParts;
if (!buildName(nameParts, node))
return false;
@@ -550,6 +552,8 @@ bool QmlBasicScriptCompiler::parseName(AST::Node *node)
return false;
}
+ } else {
+ return false;
}
} else {