Fixed with the changes in the DOtherSide library

This commit is contained in:
Filippo Cucchetto 2016-02-21 18:36:38 +01:00
parent cee83ba832
commit a3dabe05c3
2 changed files with 8 additions and 6 deletions

View File

@ -134,9 +134,9 @@ proc dos_qabstractlistmodel_qmetaobject(vptr: var DosQmetaObject) {.cdecl import
proc dos_qmetaobject_create(vptr: var DosQmetaObject,
superclassMetaObject: DosQMetaObject,
className: cstring,
signalDefinitions: DosSignalDefinitions,
slotDefinitions: DosSlotDefinitions,
propertyDefinitions: DosPropertyDefinitions) {.cdecl, importc.}
signalDefinitions: ptr DosSignalDefinitions,
slotDefinitions: ptr DosSlotDefinitions,
propertyDefinitions: ptr DosPropertyDefinitions) {.cdecl, importc.}
proc dos_qmetaobject_delete(vptr: DosQmetaObject) {.cdecl, importc.}
# QUrl

View File

@ -59,7 +59,9 @@ proc newQMetaObject*(superClass: QMetaObject, className: string,
notifySignal: notifySignal)
dosProperties.add(dosProperty)
let signals = DosSignalDefinitions(count: dosSignals.len.cint, definitions: if dosSignals.len > 0: dosSignals[0].unsafeAddr else: nil)
let slots = DosSlotDefinitions(count: dosSlots.len.cint, definitions: if dosSlots.len > 0: dosSlots[0].unsafeAddr else: nil)
let properties = DosPropertyDefinitions(count: dosProperties.len.cint, definitions: if dosProperties.len > 0: dosProperties[0].unsafeAddr else: nil)
dos_qmetaobject_create(result.vptr, superClass.vptr, className.cstring,
DosSignalDefinitions(count: dosSignals.len.cint, definitions: if dosSignals.len > 0: dosSignals[0].unsafeAddr else: nil),
DosSlotDefinitions(count: dosSlots.len.cint, definitions: if dosSlots.len > 0: dosSlots[0].unsafeAddr else: nil),
DosPropertyDefinitions(count: dosProperties.len.cint, definitions: if dosProperties.len > 0: dosProperties[0].unsafeAddr else: nil))
signals.unsafeAddr, slots.unsafeAddr, properties.unsafeAddr)