[Kde-bindings] KDE/kdebindings

Richard Dale rdale at foton.es
Sat Feb 6 17:37:45 UTC 2010


On Saturday 06 February 2010 05:30:07 pm Arno Rehn wrote:
> On Saturday 06 February 2010 18:20:24 Richard Dale wrote:
> > On Saturday 06 February 2010 04:06:55 pm Arno Rehn wrote:
> > > On Saturday 06 February 2010 16:46:31 Richard Dale wrote:
> > > > On Friday 05 February 2010 07:27:06 pm Arno Rehn wrote:
> > > > > SVN commit 1085699 by arnorehn:
> > > > >
> > > > > Add the TerminalInterface classes.
> > > > >
> > > > > CCMAIL: kde-bindings at kde.org
> > > > >
> > > > >  M  +2 -0      ruby/korundum/src/lib/KDE/korundum4.rb
> > > > >  M  +3 -0      smoke/kparts/kparts_includes.h
> > > > >  M  +2 -0      smoke/kparts/smokeconfig.xml
> > > > >
> > > > > --- trunk/KDE/kdebindings/ruby/korundum/src/lib/KDE/korundum4.rb
> > > > >
> > > > >  #1085698:1085699 @@ -573,6 +573,8 @@
> > > > >
> > > > >  					now = classname.sub(/^K?(?=[A-Z])/,'KDE::')
> > > > >
> > > > >  				elsif classname =~ /^K/ && classname !~ /::/
> > > > >
> > > > >  					now = classname.sub(/(^K)/, 'KDE::')
> > > > >
> > > > > +				elsif classname =~ /^TerminalInterface/
> > > > > +					now = "KDE::#{classname}"
> > > > >
> > > > >  				end
> > > > >  				now
> > > > >
> > > > >  			end)
> > > >
> > > > Shouldn't this really be in a namespace/module of 'Konsole' - that is
> > > > what the konsole app itself uses? In fact I'm not sure why the
> > > > TerminalInterface classes aren't in a namespace in the first place.
> > >
> > > That's why I put them in the KDE namespace for a start. As they are not
> > > in
> > >
> > >  any namespace in C++ either, I don't know if people actually think
> > > about whether there could be a 'Konsole' namespace which contains the
> > > classes.
> >
> > Well I think about it anyway - the Konsole namespace most certainly
> > exists:
> >
> > $ pwd
> > /home/rdale/kde/src/4.4/kdebase/apps/konsole/src
> > $ grep namespace *
> > Application.cpp:using namespace Konsole;
> > Application.h:namespace Konsole
> > BlockArray.cpp:using namespace Konsole;
> > BlockArray.h:namespace Konsole
> > BookmarkHandler.cpp:using namespace Konsole;
> > BookmarkHandler.h:namespace Konsole
> > ...
> 
> But not in the installed headers.
> $ grep Konsole /usr/include/*.h -R
> /usr/include/kbookmarkmanager.h:     * @param caption the --caption string,
> for instance "Konsole"
> /usr/include/kde_terminal_interface.h: * TerminalInterface is an interface
> implemented by KonsolePart to
> /usr/include/kde_terminal_interface.h: * allow developers access to the
> KonsolePart in ways that are not
> /usr/include/kde_terminal_interface.h: * Note that besides the functions
>  below here, KonsolePart also has
> /usr/include/kde_terminal_interface_v2.h: * by KonsolePart to allow
>  developers access to the KonsolePart in ways that are not
> 
> These are only comments, no real namespaces here. So Korundum won't have a
> Konsole namespace either.
Well maybe there is some obscure technical reason why 'TerminalInterface' 
isn't in the Konsole namespace, like qobject casts not working or something, 
but I think it is a bit poor. In fact I don't know why we have to have classes 
with pure virtual methods when we has slots for this sort of thing.

-- Richard



More information about the Kde-bindings mailing list