[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: kxmlguiclient / document method
From: David Faure <david () mandrakesoft ! com>
Date: 2000-05-13 15:08:46
[Download RAW message or body]
On Sat, May 13, 2000 at 03:37:29PM +0200, Simon Hausmann wrote:
> Hi,
>
>
> I just realized a really ugly problem :-(
> (and it is entirely my fault, I admit it)
>
> We have a method in KXMLGUIClient called document() . The problem is that
> this method is virtual and thus makes it impossible for any class
> inheritting from KXMLGUIClient to have a method with the same name but a
> different return value.
>
> (in particular I'm thinking about a text editor interface, with a View
> class with a document() method returning a reference to the associated
> document)
>
> (or just think koffice's KoView class (where we "hacked" around it via
> the koDocument() method))
>
> (and what's even worse: KTMainWindow inherits from that class, too)
>
> Restrictions are bad ;-) , and that is why I'd love to solve this problem.
>
> I guess we have two possibilities:
>
> - make the method non-virtual
> (breaks binary compatibility)
>
> - rename it to something else (xmlguiDocument() or so)
I'd go for that.
Unique naming for sure. And probably not used very much in apps
anyway (i.e. I mean it's not a huge change in the API - except
for kofficecore apparently).
> (requires a bunch of fixes in koffice)
> Simon (feeling ashamed for having done this ugly mistake :-(
Naming problems, heh ? :)
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/
KDE, Making The Future of Computing Available Today
See http://www.kde.org/kde1-and-kde2.html for how to set up KDE 2
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic