[Kde-bindings] KSharedConfig multiple matches

Stefano Crocco stefano.crocco at alice.it
Mon Feb 1 16:21:16 UTC 2010


On Monday 01 February 2010, Richard Dale wrote:
> |Thanks for the patch - i'm sorry I've taken so long to have a look at
> |this. In  fact I was about to fix it, when I discovered there was already
> |a 'isConstMethod()' that I was about to add. It seems Arno had already
> |applied your patch.
> |
> |I was going to give a const method a score of 1, rather than have this
> |special  case test at the end of the matching:
> |
> |if !isConstMethod(id) and isConstMethod(chosen)
> |    chosen = id
> |elsif isConstMethod(id) == isConstMethod(chosen)
> |puts "multiple methods matching, this is an error" if debug_level 
> |
> |>=DebugLevel::Minimal
> |
> |   chosen = nil
> |end
> |
> |But if it works I think we should leave it as per your patch.
> |
> |The overloading on const/non-const arguments issue is something I don't
> |even  know was a problem, but I think your solution of giving a score of
> |1 for const args is correct.

As far as I can tell, it works. Unfortunately, I only met this issue for 
KDE::SharedConfig.group and KDE::ConfigGroup.new, so I don't know whether it 
would fail in other cases.

Stefano



More information about the Kde-bindings mailing list