mirror of https://github.com/status-im/nimqml.git
Made QModelIndex safer by always coping values
This commit is contained in:
parent
74d0e47281
commit
4124153d3e
|
@ -159,6 +159,7 @@ proc dos_qhash_int_qbytearray_value(qHash: DosQHashIntByteArray, key: int, value
|
||||||
|
|
||||||
# QModelIndex
|
# QModelIndex
|
||||||
proc dos_qmodelindex_create(modelIndex: var DosQModelIndex) {.cdecl, importc.}
|
proc dos_qmodelindex_create(modelIndex: var DosQModelIndex) {.cdecl, importc.}
|
||||||
|
proc dos_qmodelindex_create_qmodelindex(modelIndex: var DosQModelIndex, other: DosQModelIndex) {.cdecl, importc.}
|
||||||
proc dos_qmodelindex_delete(modelIndex: DosQModelIndex) {.cdecl, importc.}
|
proc dos_qmodelindex_delete(modelIndex: DosQModelIndex) {.cdecl, importc.}
|
||||||
proc dos_qmodelindex_row(modelIndex: DosQModelIndex, row: var cint) {.cdecl, importc.}
|
proc dos_qmodelindex_row(modelIndex: DosQModelIndex, row: var cint) {.cdecl, importc.}
|
||||||
proc dos_qmodelindex_column(modelIndex: DosQModelIndex, column: var cint) {.cdecl, importc.}
|
proc dos_qmodelindex_column(modelIndex: DosQModelIndex, column: var cint) {.cdecl, importc.}
|
||||||
|
@ -167,6 +168,7 @@ proc dos_qmodelindex_data(modelIndex: DosQModelIndex, role: cint, data: DosQVari
|
||||||
proc dos_qmodelindex_parent(modelIndex: DosQModelIndex, parent: DosQModelIndex) {.cdecl, importc.}
|
proc dos_qmodelindex_parent(modelIndex: DosQModelIndex, parent: DosQModelIndex) {.cdecl, importc.}
|
||||||
proc dos_qmodelindex_child(modelIndex: DosQModelIndex, row: cint, column: cint, parent: DosQModelIndex) {.cdecl, importc.}
|
proc dos_qmodelindex_child(modelIndex: DosQModelIndex, row: cint, column: cint, parent: DosQModelIndex) {.cdecl, importc.}
|
||||||
proc dos_qmodelindex_sibling(modelIndex: DosQModelIndex, row: cint, column: cint, sibling: DosQModelIndex) {.cdecl, importc.}
|
proc dos_qmodelindex_sibling(modelIndex: DosQModelIndex, row: cint, column: cint, sibling: DosQModelIndex) {.cdecl, importc.}
|
||||||
|
proc dos_qmodelindex_assign(leftSide: DosQModelIndex, rightSide: DosQModelIndex) {.cdecl, importc.}
|
||||||
|
|
||||||
# QAbstractListModel
|
# QAbstractListModel
|
||||||
proc dos_qabstractlistmodel_create(model: var DosQAbstractListModel,
|
proc dos_qabstractlistmodel_create(model: var DosQAbstractListModel,
|
||||||
|
|
|
@ -4,7 +4,7 @@ proc setup*(self: QModelIndex) =
|
||||||
|
|
||||||
proc setup(self: QModelIndex, vptr: DosQModelIndex) =
|
proc setup(self: QModelIndex, vptr: DosQModelIndex) =
|
||||||
## Setup a new QModelIndex
|
## Setup a new QModelIndex
|
||||||
self.vptr = vptr
|
dos_qmodelindex_create_qmodelindex(self.vptr, vptr)
|
||||||
|
|
||||||
proc delete*(self: QModelIndex) =
|
proc delete*(self: QModelIndex) =
|
||||||
## Delete the given QModelIndex
|
## Delete the given QModelIndex
|
||||||
|
|
Loading…
Reference in New Issue