qmldom: fix filterUp of two owners
finding the qmlObject from a script value (owner) did fail due to a bug in filterUp. Change-Id: I924ae5cb5db0548332594a0b36081da620d661a3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
parent
f07c62d487
commit
b42b2e2ab8
|
@ -486,10 +486,10 @@ DomItem DomItem::filterUp(function_ref<bool(DomType k, DomItem &)> filter, Filte
|
|||
return it;
|
||||
checkTop = true;
|
||||
if (!domTypeIsOwningItem(k)) {
|
||||
DomItem el = owner();
|
||||
DomItem el = it.owner();
|
||||
DomItem res;
|
||||
k = DomType::Empty;
|
||||
Path pp = pathFromOwner();
|
||||
Path pp = it.pathFromOwner();
|
||||
DomType k2 = el.internalKind();
|
||||
if (filter(k2, el)) {
|
||||
k = k2;
|
||||
|
|
|
@ -473,6 +473,7 @@ private slots:
|
|||
|
||||
{
|
||||
DomItem width = obj1.field(Fields::bindings).key(QLatin1String("width")).index(0);
|
||||
QCOMPARE(width.field(Fields::value).qmlObject(), obj1);
|
||||
DomItem w = obj1.bindings().key(QLatin1String("width"));
|
||||
QVERIFY(w.indexes() > 0);
|
||||
QCOMPARE(w.indexes(), 1);
|
||||
|
|
Loading…
Reference in New Issue