Comment 2 for bug 1338639

Revision history for this message
Olivier Tilloy (osomon) wrote :

As I suspected, loadHtml() is being called before the webview is finished constructing, triggering the crash.

This happens only with the phone layout, because in tablet layout the component is instantiated dynamically, and its 'note' property is set after the fact:

    if (root.narrowMode) {
            …
    } else {
        var view = sideViewLoader.embed(Qt.resolvedUrl("ui/NoteView.qml"))
        view.note = note;
    }

A simple workaround in the reminders app, until the bug is properly fixed in oxide, would be to replace the following line:

    var page = component.createObject(root, {note: note});

by those two lines:

    var page = component.createObject(root);
    page.note = note;

(in function displayNote() in reminders.qml).