[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KIO vs. kioErrorString
From:       Richard Moore <rich () ipso-facto ! freeserve ! co ! uk>
Date:       1999-11-30 13:43:59
[Download RAW message or body]



Dawit Alemayehu wrote:
> 
> On Mon, 29 Nov 1999, Matt Koss wrote:
> > I get this warning when trying to use kioErrorString in file slave :
> >
> > file.cc:    type `KIO' is ambiguous baseclass of `FileProtocol'
> > make: *** [file.o] Error 1
> >
> > FileProtocol inherits KIO, that's why I am confused.
> > Doesn't matter what I include or whether I call KIO::kioErrorString( .. )
> >
> > Anybody has a clue ?
> 
> I do.  This is caused by double inheritance in KIOProtocol, the parent class of
> FileProtocol.  This is because the parent classes of KIOProtocol, KIOConnectionSignals
> and KIOConnectionSlots both inherit from KIO.  Hence, the compiler does not know
> which kioErrorString(...) to call.
> 
> The quick (short term) fix without break anything is to make KIOProtocol
> inherit KIO as well and remove the inheritances from KIOConnectionSignal and
> KIOConnectionSlot in kio_interface.h.  This means all references to KIO's
> constants in KIOConnectionSignal and KIOConnectionSlot have to be qualified.
> In the long run, all the io-slaves have to be modified so that they respect
> the KIO namespace, i.e. they refer to all the variables and methods as
> KIO::blabla.   Then the inheritance can be removed from KIOProtocol.

Why don't we merge KIOConnectionSignal and KIOConnectionSlot instead?
There is no problem inheriting the namespace class (look at the Qt
class for example). I don't see why you want to remove the inheritence
completely.

Rich.

> 
> Anyway, since I changed this locally I will go ahead and commit it as soon as
> CVS feels like letting me in !!!  Is anyone else have CVS problems ?
> 
> Regards,
> Dawit A.
> 
> P.S. Waldo this will not break anything, but will fix the ambiguity issue
> with the double inheritance.

-- 
     Richard Moore		rich@ipso-facto.freeserve.co.uk
http://www.robocast.com/	richard@robocast.com
http://developer.kde.org/	rich@kde.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic