summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorIan Walters <ian.walters@nokia.com>2009-05-08 01:16:19 (GMT)
committerIan Walters <ian.walters@nokia.com>2009-05-08 01:16:19 (GMT)
commit22ccc2041ab058b6b84c23dcf6852ee052579e49 (patch)
tree17a5c1988515384ef8a6fd639e2294a0c4215c48 /src/declarative
parentf7556aaf0f9e9418be4c4791fe5270202853d073 (diff)
parent3a2b763f7e74f1ee7617e539ca42372c57debbc2 (diff)
downloadQt-22ccc2041ab058b6b84c23dcf6852ee052579e49.zip
Qt-22ccc2041ab058b6b84c23dcf6852ee052579e49.tar.gz
Qt-22ccc2041ab058b6b84c23dcf6852ee052579e49.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/fx/qfxpathview.cpp12
-rw-r--r--src/declarative/qml/script/qmlbasicscript.cpp1
-rw-r--r--src/declarative/qml/script/qmlbasicscript_p.h1
3 files changed, 7 insertions, 7 deletions
diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp
index 2b39d6e..77d5fa2 100644
--- a/src/declarative/fx/qfxpathview.cpp
+++ b/src/declarative/fx/qfxpathview.cpp
@@ -157,7 +157,6 @@ void QFxPathView::setModel(const QVariant &model)
disconnect(d->model, SIGNAL(itemCreated(int, QFxItem*)), this, SLOT(itemCreated(int,QFxItem*)));
for (int i=0; i<d->items.count(); i++){
QFxItem *p = d->items[i];
- attachedProperties.remove(p);
d->model->release(p);
}
d->items.clear();
@@ -557,7 +556,6 @@ void QFxPathViewPrivate::regenerate()
Q_Q(QFxPathView);
for (int i=0; i<items.count(); i++){
QFxItem *p = items[i];
- q->attachedProperties.remove(p);
model->release(p);
}
items.clear();
@@ -631,7 +629,6 @@ void QFxPathView::refill()
while(wrapIndex-- >= 0){
QFxItem* p = d->items.takeFirst();
d->updateItem(p, 0.0);
- attachedProperties.remove(p);
d->model->release(p);
d->firstIndex++;
d->firstIndex %= d->model->count();
@@ -645,7 +642,6 @@ void QFxPathView::refill()
while(wrapIndex++ < d->items.count()-1){
QFxItem* p = d->items.takeLast();
d->updateItem(p, 1.0);
- attachedProperties.remove(p);
d->model->release(p);
d->firstIndex--;
if (d->firstIndex < 0)
@@ -704,7 +700,6 @@ void QFxPathView::itemsRemoved(int modelIndex, int count)
if (d->pathItems == -1) {
for (int i = 0; i < count; ++i) {
QFxItem* p = d->items.takeAt(modelIndex);
- attachedProperties.remove(p);
d->model->release(p);
}
d->snapToCurrent();
@@ -876,8 +871,11 @@ void QFxPathViewPrivate::snapToCurrent()
QHash<QObject*, QObject*> QFxPathView::attachedProperties;
QObject *QFxPathView::qmlAttachedProperties(QObject *obj)
{
- QFxPathViewAttached *rv = new QFxPathViewAttached(obj);
- attachedProperties.insert(obj, rv);
+ QObject *rv = attachedProperties.value(obj);
+ if (!rv) {
+ rv = new QFxPathViewAttached(obj);
+ attachedProperties.insert(obj, rv);
+ }
return rv;
}
diff --git a/src/declarative/qml/script/qmlbasicscript.cpp b/src/declarative/qml/script/qmlbasicscript.cpp
index 603e6ba..ee537e4 100644
--- a/src/declarative/qml/script/qmlbasicscript.cpp
+++ b/src/declarative/qml/script/qmlbasicscript.cpp
@@ -789,6 +789,7 @@ QVariant QmlBasicScript::run(QmlContext *context, void *voidCache, CacheState *c
state = Incremental;
}
+ qWarning("ReferenceError: %s is not defined", id);
} else { // instr.type == ScriptInstruction::Fetch
QVariant o = stack.pop();
diff --git a/src/declarative/qml/script/qmlbasicscript_p.h b/src/declarative/qml/script/qmlbasicscript_p.h
index bcb7d00..fb9951e 100644
--- a/src/declarative/qml/script/qmlbasicscript_p.h
+++ b/src/declarative/qml/script/qmlbasicscript_p.h
@@ -39,6 +39,7 @@ public:
};
int coreType;
+ bool isValid() const { return type != Invalid; }
bool isCore() const { return type == Core; }
bool isExplicit() const { return type == Explicit; }
void clear();