summaryrefslogtreecommitdiffstats
path: root/src/declarative/extra
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/extra')
-rw-r--r--src/declarative/extra/qmlbehaviour.cpp26
-rw-r--r--src/declarative/extra/qmlbehaviour.h8
-rw-r--r--src/declarative/extra/qmlfolderlistmodel.cpp4
3 files changed, 5 insertions, 33 deletions
diff --git a/src/declarative/extra/qmlbehaviour.cpp b/src/declarative/extra/qmlbehaviour.cpp
index 4165d56..c7ab1da 100644
--- a/src/declarative/extra/qmlbehaviour.cpp
+++ b/src/declarative/extra/qmlbehaviour.cpp
@@ -75,15 +75,12 @@ private:
class QmlBehaviourPrivate : public QObjectPrivate
{
public:
- QmlBehaviourPrivate()
- : context(0), valueData(0), operations(this) {}
+ QmlBehaviourPrivate() : operations(this) {}
QmlMetaProperty property;
QVariant currentValue;
QVariant fromValue;
QVariant toValue;
- QmlContext *context;
- QmlBehaviourData *valueData;
class AnimationList : public QmlConcreteList<QmlAbstractAnimation *>
{
public:
@@ -128,7 +125,6 @@ QmlBehaviour::QmlBehaviour(QObject *parent)
: QmlPropertyValueSource(*(new QmlBehaviourPrivate), parent)
{
Q_D(QmlBehaviour);
- d->valueData = new QmlBehaviourData(this);
d->group = new QParallelAnimationGroup(this);
}
@@ -200,10 +196,6 @@ void QmlBehaviour::propertyValueChanged()
//### does this clean up everything needed?
d->group->stop();
- d->valueData->e = newValue;
- d->valueData->s = d->currentValue;
- emit d->valueData->valuesChanged();
-
QmlStateOperation::ActionList actions;
Action action;
action.property = d->property;
@@ -238,22 +230,6 @@ void QmlBehaviour::setTarget(const QmlMetaProperty &property)
}
}
-void QmlBehaviour::classBegin()
-{
- Q_D(QmlBehaviour);
- if (!d->context) {
- d->context = new QmlContext(qmlContext(this), this);
- d->context->addDefaultObject(d->valueData);
- }
- d->context->activate();
-}
-
-void QmlBehaviour::classComplete()
-{
- Q_D(QmlBehaviour);
- d->context->deactivate();
-}
-
QT_END_NAMESPACE
#include "qmlbehaviour.moc"
diff --git a/src/declarative/extra/qmlbehaviour.h b/src/declarative/extra/qmlbehaviour.h
index 1b5f524..99fc779 100644
--- a/src/declarative/extra/qmlbehaviour.h
+++ b/src/declarative/extra/qmlbehaviour.h
@@ -54,12 +54,10 @@ QT_MODULE(Declarative)
class QmlAbstractAnimation;
class QmlBehaviourPrivate;
-class Q_DECLARATIVE_EXPORT QmlBehaviour : public QmlPropertyValueSource,
- public QmlParserStatus
+class Q_DECLARATIVE_EXPORT QmlBehaviour : public QmlPropertyValueSource
{
Q_OBJECT
Q_DECLARE_PRIVATE(QmlBehaviour)
- Q_INTERFACES(QmlParserStatus)
Q_PROPERTY(QVariant from READ fromValue WRITE setFromValue)
Q_PROPERTY(QVariant to READ toValue WRITE setToValue)
@@ -80,10 +78,6 @@ public:
static bool _ignore;
-protected:
- virtual void classBegin();
- virtual void classComplete();
-
private Q_SLOTS:
void propertyValueChanged();
};
diff --git a/src/declarative/extra/qmlfolderlistmodel.cpp b/src/declarative/extra/qmlfolderlistmodel.cpp
index acee5e1..4a71109 100644
--- a/src/declarative/extra/qmlfolderlistmodel.cpp
+++ b/src/declarative/extra/qmlfolderlistmodel.cpp
@@ -161,7 +161,9 @@ void QmlFolderListModel::classComplete()
bool QmlFolderListModel::isFolder(int index) const
{
Q_D(const QmlFolderListModel);
- return d->model.isDir(d->model.index(index, 0, d->folderIndex));
+ if (index != -1)
+ return d->model.isDir(d->model.index(index, 0, d->folderIndex));
+ return false;
}
void QmlFolderListModel::refresh()