Hi,

after upgrading to SuSE 9.3 the test code started to work. Thank you to all
who helped.

regards,
matthias

On Tuesday, 17. May 2005 12:17, David Faure wrote:
> On Tuesday 17 May 2005 07:44, Matthias Welwarsky wrote:
> > On Monday, 16. May 2005 16:00, David Faure wrote:
> > > You need to add foo.skel to the _SOURCES line of the Makefile.am;
> > > basically turning your object into a real DCOP object, callable from
> > > other processes.
> > >
> > > Also make sure to give a DCOP name to the object (via the DCOPObject
> > > constructor), that's the name that matters in the connectDCOPSignal()
> > > line, not the class name.

> >
> > OK, did that, compiles and runs, but the method is not being called. I've
> > attached the main classes for reference.

>
> Works for me with
> if (!dc->connectDCOPSignal("kded", "mediamanager", "mediumAdded(QString)",
> "MediaManagerProxy", "onMediaConnect(QString)", FALSE) )
> (the parameter types get simplified, there are no const refs over DCOP
> anyway, so a QString is passed by value).
>
>
> Testcase:
>
> #include
> #include
> #include
> #include
>
> #include "mediamanagerproxy.h"
> int main( int argc, char** argv ) {
> KCmdLineArgs::init( argc, argv, "dcoptest", 0, 0, 0, 0 );
> KApplication app( false, false );
>
> DCOPClient* dc = KApplication::dcopClient();
>
> if (!dc->isRegistered())
> kdDebug() << "DCOPClient not registered" << endl;
>
> new MediaManagerProxy("MediaManagerProxy");
>
> if (!dc->connectDCOPSignal("kded", "mediamanager", "mediumAdded(QString)",
> "MediaManagerProxy", "onMediaConnect(QString)", FALSE) )
> {
> kdDebug() << "connectDCOPSignal failed" << endl;
> }
>
> QObject::connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT(
> quit() ) ); return app.exec();
> }
>
> Then comment out a line in /etc/fstab, then readd it, so that mediumAdded
> gets triggered.
>
> Inserting a USB key doesn't trigger mediumAdded though...


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<