[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: kcalc in kspread
From:       David Faure <faure () kde ! org>
Date:       2005-03-29 17:41:04
Message-ID: 200503291941.04452.faure () kde ! org
[Download RAW message or body]

On Tuesday 29 March 2005 19:33, Raphael Langerhorst wrote:
> You might want to launch the system's kcalc with Qt's QProcess class 
> (http://doc.trolltech.com/3.3/qprocess.html) and then look up the 
> kcalc application with DCOP and connect to it. The kcalc's DCOP 
> app-id is "kcalc-<PID>", you get the PID from the QProcess class...

No no no, don't ever do that. Nasty race condition there.
If you want to start an application in order to talk to it via DCOP, use
KApplication::startServiceByDesktopName("kcalc").
You get the dcopService ID as return value, and the guarantee that app is ready
to talk DCOP with you when that method returns.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic