KTextEditor casts

Christoph Cullmann cullmann at babylon2k.de
Sun May 26 16:48:05 UTC 2002


On Sunday 26 May 2002 16:32, Bernd Gehrmann wrote:
> On Saturday 25 May 2002 19:34, you wrote:
> > Hi,
> > some KTextEditor news:
> > Now each interfaces has a global "cast function":
>
> Nice. But what about making these functions safe against null arguments?
> For example, it would be nice if the following would be possible:
>
>   void Foo::activePartChanged(KParts::Part *part)
>   {
>     // Return if either no part is active or the interface is not
> implemented KTextEditor::EditInterface *iface =
> KTextEditor::editInterface(part); if (!iface)
>       return;
>     ....
>   }
>
> (hypothetical example of course)
Yeah, forgotten that, will do that if I get some time ;) (just a if (!doc) 
return 0 check won' hurt me ;)

>
> Bernd.
>
> _______________________________________________
> Kdevelop-devel mailing list
> Kdevelop-devel at barney.cs.uni-potsdam.de
> http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel

-- 
Christoph Cullmann
Kate/KDE developer
cullmann at kde.org
http://kate.kde.org




More information about the KDevelop-devel mailing list