emit countChanged();
}
if (wasValid && !d->m_delegate && d->modelCount()) {
- emit itemsRemoved(0, d->modelCount());
+ _q_itemsRemoved(0, d->modelCount());
emit countChanged();
}
}
d->m_abstractItemModel->fetchMore(modelIndex);
int newCount = d->modelCount();
if (d->m_delegate && oldCount)
- emit itemsRemoved(0, oldCount);
+ _q_itemsRemoved(0, oldCount);
if (d->m_delegate && newCount)
emit itemsInserted(0, newCount);
if (newCount != oldCount)
QSGVisualDataModel *vdm = listview->findChild<QSGVisualDataModel*>("visualModel");
vdm->setRootIndex(QVariant::fromValue(model.indexFromItem(model.item(1,0))));
+ QCOMPARE(listview->count(), 1);
QSGText *name = findItem<QSGText>(contentItem, "display", 0);
QVERIFY(name);
QCOMPARE(name->text(), QString("Row 2 updated child"));
model.item(1,0)->appendRow(new QStandardItem(QLatin1String("Row 2 Child Item 2")));
- QTest::qWait(300);
+ QCOMPARE(listview->count(), 2);
name = findItem<QSGText>(contentItem, "display", 1);
QVERIFY(name != 0);
QVERIFY(name == 0);
vdm->setRootIndex(QVariant::fromValue(QModelIndex()));
- QTest::qWait(300);
+ QCOMPARE(listview->count(), 3);
name = findItem<QSGText>(contentItem, "display", 0);
QVERIFY(name);
QCOMPARE(name->text(), QString("Row 1 Item"));