[Kde-accessibility] [PATCHES] First round of const correctness for the KSpeech interface

Gary Cramblitt garycramblitt at comcast.net
Sun Jan 16 00:56:58 CET 2005


On Saturday 15 January 2005 01:00 pm, Olaf Schmidt wrote:
> [Gary Cramblitt, Samstag, 15. Januar 2005 18:29]
>
> > I think it might be possible to change the name from
> > "kspeech" to "KSpeech" and define a new object called "kspeech" that
> > inherits the exact same interface as "KSpeech".
>
> There has been no stable release of ktts yet, so there is no need to keep
> backwards compatibility. Also, since all known clients of ktts are in KDE
> CVS, we can easily change them.

OK.  I have renamed class kspeech to KSpeech.  I also updated KMouth, KSayIt, 
and the apps in kdebase to use KSpeech instead of kspeech.  For some level of 
backwards compatibility, kttsd still has a kspeech object that delegates to 
KSpeech, but kspeech object does not emit any DCOP signals.

The impact of this change is as follows on existing programs:

1.  If your app communicates with kttsd via hand-coded DCOPClient calls, they 
will continue to work for now, but you should change the code to send to 
object KSpeech instead of kspeech.  Example:

        if ( !client->call("kttsd", "KSpeech", "setText(QString,QString)",
                           data, replyType, replyData, true) )


2.  If you app has been using kspeech_stub and derives objects from class 
kspeech_stub, you need to a) obtain latest 
kdelibs/interfaces/kspeech/kspeech.h from cvs and install to $KDEDIR/include, 
then change your code to derive from class KSpeech_stub.  Also, anywhere 
where your code has referred to class kspeech, it should refer to class 
KSpeech instead.  Example:

class kttsdlibtalker2 : public QObject, public KSpeech_stub, virtual public 
KSpeechSink

kttsdlibtalker2::kttsdlibtalker2(QObject *parent, const char *name)
    : QObject(parent, name), DCOPStub("kttsd", "KSpeech")
{

3.  If you app sinks dcop signals from kttsd, you need to change the sending 
object in your connectDCOPSignal calls from "kspeech" to "KSpeech".  Example,

    connectDCOPSignal("kttsd", "KSpeech",
        "kttsdStarted()",
        "kttsdStarted()",
        false);


-- 
Gary Cramblitt (aka PhantomsDad)
KDE Text-to-Speech Maintainer
http://accessibility.kde.org/developer/kttsd/index.php


More information about the kde-accessibility mailing list