jerous86 / nimqt

Qt bindings for nim
GNU General Public License v2.0
93 stars 6 forks source link

Inherited object signal regression? #29

Closed matkuki closed 10 months ago

matkuki commented 10 months ago

Hi,

Specs:

After nimble install https://github.com/jerous86/nimq today, my old code that has an inherited object with a signal doesn't compile anymore, for example this code:

import nimqt
import nimqt/qpushbutton

nimqt.init()

inheritQObject(SignalHandler, QObject):
    signal foo0()

proc create*(): ptr SignalHandler =
    result = newSignalHandler()

nimqt.insertAllSlotImplementations

... now throws:

J:\Nim\nimqt\ExCo2\src\components\signalhandler.nim(6, 15) template/generic instantiation of `inheritQobject` from here
C:\Users\matic\.choosenim\toolchains\nim-1.6.14\lib\system\fatal.nim(54, 5) Error: unhandled exception: C:\Users\matic\.nimble\pkgs\nimqt-0.1\nimqt.nim(469, 20) `isQObject` Cannot use signal in regular inherited object [AssertionDefect]

... but I'm pretty sure it worked before.

Do I need to change anything or is this a regression perhaps?

jerous86 commented 10 months ago

I had already fixed that locally, but forgot to push it. Should be fixed now?

matkuki commented 10 months ago

Yes, it works now. Thanks 👍