[Kde-bindings] QtRuby crash at find_child

Richard Dale rdale at foton.es
Tue Apr 14 17:16:48 UTC 2009


On Thursday 09 April 2009 01:43:26 David Palacio wrote:
> This is a little testcase based on a working code (on 4.2.0).  Change
> TEST_KDE to true to get the crash.
>
> # Source code for testcase
>
> require 'korundum4'
>
> about = KDE::AboutData.new(
> 'irb_kapp', 'irb_kapp',
> KDE.ki18n( 'IRB KApp' ), '1.8.7',
> KDE.ki18n( 'Kuick IRB Application' ),
> KDE::AboutData::License_GPL_V3,
> KDE.ki18n( '(c) 2009 Null' ) )
> KDE::CmdLineArgs.init(ARGV, about)
> KDE::Application.new
>
> #Switch test
> TEST_KDE = false
>
> w = TEST_KDE ? KDE::MainWindow.new : Qt::Widget.new
> offers = KDE::ServiceTypeTrader.self.query 'KParts/ReadOnlyPart', "(Library
> == 'okularpart')"
> factory = KDE::PluginLoader.new(offers[0].library).factory
> part = factory.create('KParts::ReadOnlyPart', w, nil, [], '')
> pageview = w.find_child( Qt::Object, 'okular::pageView')
> puts pageview.inspect

This doesn't crash for me with TEST_KDE set to true:

baldhead rdale 520% ruby find_child_crash.rb
#<PageView:0xb54e62bc objectName="okular::pageView", x=0, y=0, width=100, 
height=30>




More information about the Kde-bindings mailing list