Adding new functions to kde_terminal_panel.h
Andreas Pakulat
apaku at gmx.de
Thu Mar 26 19:30:57 GMT 2009
On 26.03.09 17:43:34, rahman duran wrote:
> On Thu, Mar 26, 2009 at 5:28 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> >
> >
> > You can't do that as its a bic change, you'll have to create a new
> > interface for your new functions and make konsole inherit from both.
>
>
> Yes I understand, Its a KDE Policy. But I don't understand, its tecnicaly
> possible isn't it?
You mean adding functions? Yes of course its possible to add methods to
that header, but you also need to provide a proper implementation.
> I had a clean recompile and install kdelibs but konsole
> refuser to link.
See below.
> > Did you implement the new methods in konsolepart? It seems like you didn't
> > do that.
> >
>
> I added this to kde_terminal_interface.h
> ----------------------------------------------------------
>
> /**
>
> * Check if a sub process running in active session
>
> */
>
> virtual bool isSubProcessActive();
>
>
> ----------------------------------------------------------
>
>
>
>
> added this to konsole/part.h
>
> ----------------------------------------------------------
>
> /** Reimplemented from TerminalInterface. */
>
> virtual bool isSubProcessActive();
>
>
> ----------------------------------------------------------
>
>
>
>
> and implemented it in part.cpp
>
> ------------------------------------------------------------
>
>
> bool Part::isSubProcessActive()
>
> {
>
> Q_ASSERT( activeSession() );
>
>
>
> return activeSession()->isChildActive();
>
>
> }
But you didn't make it a pure virtual method in the interface, so the
implementation for KDETerminalInterface::isSubProcessActive is missing (not
sure what the actual classname in kde_terminal_interfaec.h is). Just make
it a pure virtual in kde_terminal_interface.h (i.e. add = 0 before the ;)
then it should link.
Andreas
--
You will be imprisoned for contributing your time and skill to a bank robbery.
More information about the kde-core-devel
mailing list