** No longer affects: ubuntu-ui-toolkit -- You received this bug notification because you are a member of Ubuntu SDK bug tracking, which is subscribed to ubuntu-ui-toolkit in Ubuntu. https://bugs.launchpad.net/bugs/1276118
Title: List Item onItemRemoved signal should provide the option to override its action with a custom one. Status in “ubuntu-ui-toolkit” package in Ubuntu: Confirmed Bug description: The title is a bit ambigious, let me try to explain in more detail here. I have been using U1db documents in a listview to retrieve and display stored listitems. U1db allows you to delete documents by putDoc(value, docId). So I connected this with the listitem's swipe to delete method. delegate: ListItem.Standard { removable: true onItemRemoved: { db.putDoc("", docId) } } The problem here is that when the user swipes delete a delegate, the listview deletes the delegate which in turn also deletes the u1db document. This changes the u1db model which is noticed by the listview and tried to delegate again which is no longer available resulting in an error. QQmlVMEMetaObject: Internal error - attempted to evaluate a function in an invalid context file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/ListItems/Empty.qml:459:9: QML ScriptAction: <Unknown File>: The solution here would be to provide a way to override the default action of the onItemRemoved signal. This way the deleting action is only performed once. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1276118/+subscriptions -- Mailing list: https://launchpad.net/~ubuntu-sdk-bugs Post to : ubuntu-sdk-bugs@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-sdk-bugs More help : https://help.launchpad.net/ListHelp