diff --git a/src/nimqml/private/dotherside.nim b/src/nimqml/private/dotherside.nim index a6537ef..468ce40 100644 --- a/src/nimqml/private/dotherside.nim +++ b/src/nimqml/private/dotherside.nim @@ -1,4 +1,4 @@ -import os, strutils +import strutils const dynLibName = case system.hostOS: diff --git a/src/nimqml/private/nimqmlmacros.nim b/src/nimqml/private/nimqmlmacros.nim index 590cf0a..68addd8 100644 --- a/src/nimqml/private/nimqmlmacros.nim +++ b/src/nimqml/private/nimqmlmacros.nim @@ -4,7 +4,6 @@ import macros import strutils import sequtils import typetraits -import tables type diff --git a/src/nimqml/private/qabstractitemmodel.nim b/src/nimqml/private/qabstractitemmodel.nim index ce3405b..0eb17fc 100644 --- a/src/nimqml/private/qabstractitemmodel.nim +++ b/src/nimqml/private/qabstractitemmodel.nim @@ -94,8 +94,8 @@ proc headerDataCallback(modelPtr: pointer, section: cint, orientation: cint, rol proc createIndex*(self: QAbstractItemModel, row: int, column: int, data: pointer): QModelIndex = ## Create a new QModelIndex debugMsg("QAbstractItemModel", "createIndex") - let result = dos_qabstractitemmodel_createIndex(self.vptr.DosQAbstractItemModel, row.cint, column.cint, data) - return newQModelIndex(result, Ownership.Take) + let index = dos_qabstractitemmodel_createIndex(self.vptr.DosQAbstractItemModel, row.cint, column.cint, data) + result = newQModelIndex(index, Ownership.Take) method index*(self: QAbstractItemModel, row: int, column: int, parent: QModelIndex): QModelIndex {.base.} = doAssert(false, "QAbstractItemModel::index is pure virtual")