As per the source comment, it is not actually tracked whether item was
null before. This is consistent with the behaviour in loadFromSource,
where setting a source to null always emits item changed.
This is reasonable behaviour, because it only occurs in unexpected error
states where the program logic likely expects a changed signal anyways.
Change-Id: I160ab04dc1b5c578ee508f4adbca65e8da5b16be
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
emit q->sourceComponentChanged();
emit q->statusChanged();
emit q->progressChanged();
+ emit q->itemChanged(); //Like clearing source, emit itemChanged even if previous item was also null
disposeInitialPropertyValues(); // cleanup
return;
}
QCOMPARE(loader->property("onStatusChangedCount").toInt(), 1);
QCOMPARE(loader->property("onProgressChangedCount").toInt(), 1);
- QCOMPARE(loader->property("onItemChangedCount").toInt(), error ? 0 : 1);
+ QCOMPARE(loader->property("onItemChangedCount").toInt(), 1);
QCOMPARE(loader->property("onLoadedCount").toInt(), error ? 0 : 1);
delete loader;