aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmldelegatemodel_p_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-15 11:36:57 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-23 08:07:32 +0100
commit002a5d4303b3b182ae4abc4a752c49787c1c2821 (patch)
tree69c7666ed1061c7acacee1d76597c06405459c80 /src/qml/types/qqmldelegatemodel_p_p.h
parentfddc75e862032163af36d2282051758647b62d15 (diff)
Get rid of most uses of ValueRef
Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/types/qqmldelegatemodel_p_p.h')
-rw-r--r--src/qml/types/qqmldelegatemodel_p_p.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/types/qqmldelegatemodel_p_p.h b/src/qml/types/qqmldelegatemodel_p_p.h
index ced30b9d1b..413ee826ae 100644
--- a/src/qml/types/qqmldelegatemodel_p_p.h
+++ b/src/qml/types/qqmldelegatemodel_p_p.h
@@ -70,7 +70,7 @@ public:
void initializePrototype();
int parseGroups(const QStringList &groupNames) const;
- int parseGroups(const QV4::ValueRef groupNames) const;
+ int parseGroups(const QV4::Value &groupNames) const;
QPointer<QQmlDelegateModel> model;
const int groupCount;
@@ -128,9 +128,9 @@ public:
static QV4::ReturnedValue get_model(QV4::CallContext *ctx);
static QV4::ReturnedValue get_groups(QV4::CallContext *ctx);
static QV4::ReturnedValue set_groups(QV4::CallContext *ctx);
- static QV4::ReturnedValue get_member(QQmlDelegateModelItem *thisItem, uint flag, const QV4::ValueRef);
- static QV4::ReturnedValue set_member(QQmlDelegateModelItem *thisItem, uint flag, const QV4::ValueRef arg);
- static QV4::ReturnedValue get_index(QQmlDelegateModelItem *thisItem, uint flag, const QV4::ValueRef arg);
+ static QV4::ReturnedValue get_member(QQmlDelegateModelItem *thisItem, uint flag, const QV4::Value &);
+ static QV4::ReturnedValue set_member(QQmlDelegateModelItem *thisItem, uint flag, const QV4::Value &arg);
+ static QV4::ReturnedValue get_index(QQmlDelegateModelItem *thisItem, uint flag, const QV4::Value &arg);
QV4::ExecutionEngine *v4;
QQmlDelegateModelItemMetaType * const metaType;
@@ -227,7 +227,7 @@ public:
void initPackage(int index, QQuickPackage *package);
void destroyingPackage(QQuickPackage *package);
- bool parseIndex(const QV4::ValueRef value, int *index, Compositor::Group *group) const;
+ bool parseIndex(const QV4::Value &value, int *index, Compositor::Group *group) const;
bool parseGroupArgs(
QQmlV4Function *args, Compositor::Group *group, int *index, int *count, int *groups) const;
@@ -290,7 +290,7 @@ public:
void emitChanges();
void emitModelUpdated(const QQmlChangeSet &changeSet, bool reset);
- bool insert(Compositor::insert_iterator &before, const QV4::ValueRef object, int groups);
+ bool insert(Compositor::insert_iterator &before, const QV4::Value &object, int groups);
static void group_append(QQmlListProperty<QQmlDelegateModelGroup> *property, QQmlDelegateModelGroup *group);
static int group_count(QQmlListProperty<QQmlDelegateModelGroup> *property);