mirror of https://github.com/status-im/nimqml.git
Workaround to Nim bugs on windows
This commit is contained in:
parent
1d04c36fee
commit
209889ad5a
|
@ -17,7 +17,7 @@ proc deleter(id: cint, nimQObject: NimQObject) {.cdecl.} =
|
|||
|
||||
proc qmlRegisterType*[T](uri: string, major: int, minor: int, qmlName: string, ctor: proc(): T): int =
|
||||
let metaObject: QMetaObject = T.staticMetaObject()
|
||||
let dosQmlRegisterType = DosQmlRegisterType(major: major.cint, minor: minor.cint, uri: uri.cstring,
|
||||
var dosQmlRegisterType = DosQmlRegisterType(major: major.cint, minor: minor.cint, uri: uri.cstring,
|
||||
qml: qmlName.cstring, staticMetaObject: metaObject.vptr,
|
||||
createCallback: creator, deleteCallback: deleter)
|
||||
let id = dos_qdeclarative_qmlregistertype(dosQmlRegisterType.unsafeAddr)
|
||||
|
@ -26,7 +26,7 @@ proc qmlRegisterType*[T](uri: string, major: int, minor: int, qmlName: string, c
|
|||
|
||||
proc qmlRegisterSingletonType*[T](uri: string, major: int, minor: int, qmlName: string, ctor: proc(): T): int =
|
||||
let metaObject: QMetaObject = T.staticMetaObject()
|
||||
let dosQmlRegisterType = DosQmlRegisterType(major: major.cint, minor: minor.cint, uri: uri.cstring,
|
||||
var dosQmlRegisterType = DosQmlRegisterType(major: major.cint, minor: minor.cint, uri: uri.cstring,
|
||||
qml: qmlName.cstring, staticMetaObject: metaObject.vptr,
|
||||
createCallback: creator, deleteCallback: deleter)
|
||||
let id = dos_qdeclarative_qmlregistersingletontype(dosQmlRegisterType.unsafeAddr)
|
||||
|
|
Loading…
Reference in New Issue