On Sat, 12 Jan 2008 22:57:11 +0100, Olivier Goffart <[EMAIL PROTECTED]> wrote:

> Le samedi 12 janvier 2008, Roman Jarosz a écrit :
>> On Sat, 12 Jan 2008 21:56:33 +0100, Olivier Goffart <[EMAIL PROTECTED]>
> wrote:
>
>> > Also, I did not check carefully, but it seems to me that some class
>> > should not belong to libkopete, but be in the application instead.
>> > Please ask yourself "is that class really required to be in libkopete"
>> > for every class you add.  Remember that if it's in libkopete, we will
>> > havee to maintain compatibility if ever we reach Kopete 1.0
>>
>> I know that StatusRootAction, StatusGroupAction, StatusAction and
>> StatusEditAction shouldn't be in libkopete but we need them in
>> OnlineStatusManager::createAccountStatusActions(...) to build status menu
>> for accounts and I don't see an easy and sensible solution for it.
>
> Then move them to libkopete/private

Ok those classes can be moved to kopete/kopete I've put it in 
/kopete/kopete/statusmenu/ for now
and I moved createAccountStatusActions to StatusRootAction and changed it to 
static.

But now I have one problem in createAccountStatusActions we iterate over 
registered statuses for
account's protocol and for every status we create corresponding menu.

code:
Private::ProtocolMap protocolMap=d->registeredStatus[account->protocol()];
Private::ProtocolMap::Iterator it;
for ( it = --protocolMap.end(); it != protocolMap.end(); --it )
{
...
}

so we need from OnlineStatusManager

struct RegisteredStatusStruct
{
        QString caption;
        OnlineStatusManager::Categories categories;
        OnlineStatusManager::Options options;
};
typedef QMap< OnlineStatus , RegisteredStatusStruct >  ProtocolMap ;

this is now in *.cpp and is private

So the question is can I move it to kopeteonlinestatusmanager.h
and add function that will return ProtocolMap for protocol something like

ProtocolMap registeredStatuses( Protocol* protocol ) const;

I didn't come up with better idea.

Any objections?

Roman

_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to