KDE/kdevplatform/shell
Vladimir Prus
ghost at cs.msu.su
Tue Aug 4 07:44:37 UTC 2009
On Monday 03 August 2009 Andreas Pakulat wrote:
> SVN commit 1006419 by apaku:
>
> You'd think that if a compiler can choose between two signatures he'd
> choose the one where he needs fewer implicit conversions. But apparently
> thats not the case with gcc. This prevents an kind of endless recursion
> where createPart(KUrl) is called from inside createPart(KUrl).
> BUG:202397
>
> M +1 -1 partcontroller.cpp
>
>
> --- trunk/KDE/kdevplatform/shell/partcontroller.cpp #1006418:1006419
> @@ -201,7 +201,7 @@
> else
> mimeType = KMimeType::findByUrl( url );
>
> - KParts::Part* part = createPart( mimeType->name() );
> + KParts::Part* part = IPartController::createPart( mimeType->name() );
The problem here is that there's no "one that needs fewer implicit conversions".
IPartController::createPart is hidden by the methods with the same name
defined in PartController. FWIW, such hiding of base method is considered to
be bad, since it breaks is-a relationship. I'd suggest that a right fix is
to add
using IPartController:createPart;
in the declaration of PartController.
- Volodya
More information about the KDevelop-devel
mailing list