You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, May 31st 2005, 10:19pm

Dcop and kalarm

Dear Forum

I am trying to insert a dcop functionnality to my program that inserts a kalarm message using dcop. Even though the dcop->send returns a TRUE value (worked), I do not get any input in kalarm.

Anyone has already played with kalarm and could help me ? Here is the important part of my code.
Thanks

QByteArray data
QDataStream arg(data, IO_WriteOnly);

unsigned flag = 0x02;
KURL *audioURL = new KURL();

arg << m_toScheduleShow->Title; //message
arg << m_toScheduleShow->StartTime.toString(Qt::ISODate); //dateTime
arg << 10; //late cancel
arg << flag; //flag
arg << QString::null; //bgcolor
arg << QString::null; //fgcolor
arg << QString::null; //font
arg << audioURL; //audioURL
arg << 2 ; //remindermins
arg << 2; //recurType
arg << 1; //recurInterval
arg << 0; //recurCount


bool worked = client->send("kalarm", "request", "scheduleMessage(const QString& , const QString& , int ,unsigned ,const QString& ,const QString& ,const QString& ,const KURL& , int , int , int , int )", data);


Here worked == TRUE

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Wednesday, June 1st 2005, 1:43pm

DCOP signatures do not use const or &, just plain class names

Try QString instead of const QString& in the third paramater of the send call

Cheers,
_
Qt/KDE Developer
Debian User

3

Wednesday, June 1st 2005, 9:22pm

Hello,

Thank you for your answer, but it still doesn't work

In fact, the signal goes thru, but I get a crash of the application Kalarm. Like if there is something I send which is not of the right size

Any ideas ?

Alex

This post has been edited 1 times, last edit by "abeverat" (Jun 1st 2005, 11:07pm)


anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

4

Friday, June 3rd 2005, 11:56am

Can you try the call from commandline using the dcop commandline tool?

Cheers,
_
Qt/KDE Developer
Debian User

5

Friday, June 3rd 2005, 11:59am

Hello all

The error was finally that I was passing a KURL* and not a KURL.

Thanks for your replies