From kde-core-devel Thu Dec 20 20:15:25 2007 From: Oswald Buddenhagen Date: Thu, 20 Dec 2007 20:15:25 +0000 To: kde-core-devel Subject: signal signatures vs. inheritance (Re: [PATCH] KProcess port of Message-Id: <20071220201525.GA8674 () ugly ! local> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=119818173911804 On Thu, Dec 20, 2007 at 08:14:16PM +0100, Ralf Habacker wrote: > i see, you mean this > > meinproc->setOutputChannelMode(KProcess::SeparateChannels); > OnlyStdoutChannel, but anyway ... > To be able to handle the finished signal i have to use QProcess related > types in the signal definition like > > connect( meinproc, SIGNAL( finished( int, QProcess::ExitStatus) ), > this, SLOT( meinprocExited( int, QProcess::ExitStatus) ) ); > > or > > connect( meinproc, SIGNAL( finished( int, QProcess::ExitStatus) ), > this, SLOT( meinprocExited( int, KProcess::ExitStatus) ) ); > > both formats works. > > If i use the following > > connect( meinproc, SIGNAL( finished( int, KProcess::ExitStatus) ), > this, SLOT( meinprocExited( int, KProcess::ExitStatus) ) ); > > it compiles but raises a "could not connect" runtime error. > i'd call that a misbehavior/bug on qt's side, given that it does not reflect c++ namespacing rules. both of the first variants working and the last one failing seems outright weird ... > Wouldn't it not better to add a specific signal to KProcess to avoid > such problems ? > do you realize *how* many classes would have to be uglified that way? -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Confusion, chaos, panic - my work here is done.