From kde-bindings Fri Mar 16 11:51:51 2007 From: "Caleb Tennis" Date: Fri, 16 Mar 2007 11:51:51 +0000 To: kde-bindings Subject: [Kde-bindings] qtruby crash Message-Id: <53809.192.168.2.155.1174045911.squirrel () www ! aei-tech ! com> X-MARC-Message: https://marc.info/?l=kde-bindings&m=117404673404357 Found an interesting bug/crash in QtRuby (Qt4). Check out this code: ------- require 'Qt4' class TestClass < Qt::Widget slots 'timeoutSlot()' def initialize(parent) super(parent) t = Qt::Timer.new(self) connect(t, SIGNAL('timeout()'), self, SLOT('timeoutSlot()')) t.start(1000) end def timeoutSlot puts "Got timeout" end end class TestClass2 < TestClass def initialize(parent) super(parent) end def timeoutSlot puts "Overriding the timeout" end end app = Qt::Application.new(ARGV) tc = TestClass2.new(nil) tc.show app.exec ------ Notice how TestClass2 overrides 'timeoutSlot', but never declares it as a slot. Adding a slot declaration to TestClass2 fixes the crash and the program runs like you would expect. _______________________________________________ Kde-bindings mailing list Kde-bindings@kde.org https://mail.kde.org/mailman/listinfo/kde-bindings