[Kde-bindings] Problems with KDE::ComponentData constructors in korundum4

Stefano Crocco stefano.crocco at alice.it
Mon Jul 6 09:18:19 UTC 2009


Using the svn version of korundum4, I can't create a KDE::ComponentData using
the constructor which takes a KDE::AboutData (either alone or with a
KDE::ComponentData::MainWindowRegistration).

My code is the following:

require 'korundum4'
data = KDE::AboutData.new "test", "", KDE.ki18n("Test"), "0.0.1"
KDE::CmdLineArgs.init ARGV, data
a = KDE::Application.new
c = KDE::ComponentData.new data

Running it gives the following error:

/usr/lib/ruby/site_ruby/1.8/KDE/korundum4.rb:282:in `initialize': unresolved constructor call KDE::ComponentData (ArgumentError)
	from /home/stefano/documenti/scripts/prova.rb:5
	from /home/stefano/documenti/scripts/prova.rb:5:in `new'
	from /usr/lib/ruby/site_ruby/1.8/Qt/qtruby4.rb:2580:in `try_initialize'
	from /usr/lib/ruby/site_ruby/1.8/Qt/qtruby4.rb:2580:in `catch'
	from /usr/lib/ruby/site_ruby/1.8/Qt/qtruby4.rb:2581:in `try_initialize'
	from /usr/lib/ruby/site_ruby/1.8/Qt/qtruby4.rb:2581:in `call'
	from /usr/lib/ruby/site_ruby/1.8/KDE/korundum4.rb:282:in `initialize'

Setting the qt debug level to Qt::DebugLevel::High before the last line, I get the following output (besides the error message above):

KComponentData* KComponentData::KComponentData()
	KComponentData* KComponentData::KComponentData(const QByteArray&, const QByteArray&, KComponentData::MainComponentRegistration)
	KComponentData* KComponentData::KComponentData(const KAboutData&)
	KComponentData* KComponentData::KComponentData(const KAboutData*)
	KComponentData* KComponentData::KComponentData(const QByteArray&)
	KComponentData* KComponentData::KComponentData(const KComponentData&)
	KComponentData* KComponentData::KComponentData(const KAboutData*, KComponentData::MainComponentRegistration)
	KComponentData* KComponentData::KComponentData(const KAboutData&, KComponentData::MainComponentRegistration)
	KComponentData* KComponentData::KComponentData(const QByteArray&, const QByteArray&)
No matching constructor found, possibles:
match => 1549 score: 2
multiple methods matching, this is an error
      const KAboutData& (KAboutData)
matching => smoke: 1 index: 1549
match => 1551 score: 2
      const KAboutData* (KAboutData)
matching => smoke: 1 index: 1551
match => 1547 score: -99
      const QByteArray& (KAboutData)
matching => smoke: 1 index: 1547
match => 1541 score: -99
      const KComponentData& (KAboutData)
matching => smoke: 1 index: 1541
	KComponentData* KComponentData::KComponentData(const KAboutData&)      (smoke: 1 index: 1549)
	KComponentData* KComponentData::KComponentData(const KAboutData*)      (smoke: 1 index: 1551)
	KComponentData* KComponentData::KComponentData(const QByteArray&)      (smoke: 1 index: 1547)
	KComponentData* KComponentData::KComponentData(const KComponentData&)  (smoke: 1 index: 1541)
candidate list:
-> methodIds == [#<Qt::Internal::ModuleIndex:0xb55f6350 @smoke=1, @index=1541>, #<Qt::Internal::ModuleIndex:0xb55f633c @smoke=1, @index=1547>, #<Qt::Internal::ModuleIndex:0xb55f6328 @smoke=1, 
@index=1551>, #<Qt::Internal::ModuleIndex:0xb55f6314 @smoke=1, @index=1549>]
:: method == KComponentData
classname    == KComponentData

The same code written in C++ works perfectly. Is this a bug, or am I doing something wrong?

Thanks

Stefano



More information about the Kde-bindings mailing list