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

List:       kopete-devel
Subject:    Re: [Kopete-devel] patch, and other stuff
From:       Andres Krapf <dae () chez ! com>
Date:       2002-05-04 23:55:59
[Download RAW message or body]

On Sunday 05 May 2002 01:06, Martijn Klingens wrote:
> Because it assumes the message is not a QObject. If you make it a Qobject,
> you should also make it a QPtrList. There is no reliable way to make a
> QValueList work with QObjects.

that i can do, but the gist of the issue is that even if i use a pointer, i 
still have to copy the message some way or the other right now (because the 
plugins currently don't allocate the KopeteMessage with new).

> If you *need* signals/slots, then option 2 is definitely the way to go. But
> more likely it doesn't need to be a QObject in the first place.

i didn't find any better options to decouple the "successfully sent" from it's 
handling in KMM.

anyways, these changes are hidden in KMM. the only visible changes (for the 
protocol writers) are:
 - how to notify the system when a message is sent over the wire.
 - how to create messages (on the stack or with new)

these are little changes, so we can probably safely play with the details of 
the implementation.

right now, what i can do is change the QValueList to QPtrList, and set 
autodelete to true. and change all plugin message creation to use new. 
that'll make it work, and be fairly ok too.

the only regret i'll have is not being able to enforce the use of new. 
enforcing something is the best way to make sure it's done that way :-)

still, i think my modifications are for the better. i'll send a new patch 
soon, with these considerations taken care of (along with the .moc at the 
end)

we can use this for some time, at least until somebody comes up with a better 
scheme!

cheers,

-- 
Andres
_______________________________________________
Kopete-devel mailing list
Kopete-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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