Revert "fix: replace `dos_qobject_delete` with `dos_qobject_deleteLater`"

This reverts commit dd5cfe2fae.

see: https://github.com/status-im/nimqml/pull/51#pullrequestreview-1500143068
This commit is contained in:
Patryk Osmaczko 2023-06-27 09:37:15 +02:00 committed by osmaczko
parent 06a6c70404
commit ab78548aa3
2 changed files with 1 additions and 2 deletions

View File

@ -204,7 +204,6 @@ proc dos_qobject_objectName(qobject: DosQObject): cstring {.cdecl, dynlib: dynLi
proc dos_qobject_setObjectName(qobject: DosQObject, name: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qobject_signal_emit(qobject: DosQObject, signalName: cstring, argumentsCount: cint, arguments: ptr DosQVariantArray) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qobject_delete(qobject: DosQObject) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qobject_deleteLater(qobject: DosQObject) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qobject_signal_connect(sender: DosQObject, signalName: cstring, receiver: DosQObject, slot: cstring, signalType: cint) {.cdecl, dynlib: dynLibName, importc.}
# QAbstractItemModel

View File

@ -64,7 +64,7 @@ proc delete*(self: QObject) =
## Delete a QObject
if not self.owner or self.vptr.isNil:
return
dos_qobject_deleteLater(self.vptr)
dos_qobject_delete(self.vptr)
self.vptr.resetToNil
proc newQObject*(): QObject =