[SailfishDevel] Problem with QQmlListProperty

Janne Kokko jmkokko1 at gmail.com
Tue Dec 31 04:35:51 UTC 2013


Remove "static" keyword  and put correct scope for the methods in cpp file:

2013/12/29 Markus Svensson <markus.svensson at me.com>:
> Hi guys,
...
> static void append(QQmlListProperty<Note> *property, Note* value) {
>
>     NoteList *list = (NoteList*) property;
>
>     list->addNote(value);
>
> }

=>

void NoteList::append(QQmlListProperty<Note> *property, Note* value) {

    NoteList *list = (NoteList*) property;

    list->addNote(value);

}

Keep the "static" keyword in h file though.

--
Janne


More information about the Devel mailing list