[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: Re: [kopete-devel] [PATCH] Avoiding to test on end()
From: Michel Hermier <michel.hermier () wanadoo ! fr>
Date: 2005-06-25 16:11:15
Message-ID: 200506251813.39640.michel.hermier () wanadoo ! fr
[Download RAW message or body]
ARG, Forggot the patch :(
["libkopete-iterator_in_menu.patch" (text/x-diff)]
Index: libkopete/kopeteonlinestatusmanager.cpp
===================================================================
--- libkopete/kopeteonlinestatusmanager.cpp (revision 428836)
+++ libkopete/kopeteonlinestatusmanager.cpp (working copy)
@@ -370,9 +370,10 @@
void OnlineStatusManager::createAccountStatusActions( Account *account , KActionMenu *parent)
{
+ QValueList <KAction *> actions;
+
Private::ProtocolMap protocolMap=d->registeredStatus[account->protocol()];
- Private::ProtocolMap::Iterator it;
- for ( it = --protocolMap.end(); it != protocolMap.end(); --it )
+ for ( Private::ProtocolMap::Iterator it = protocolMap.begin(); it != protocolMap.end(); ++it )
{
unsigned int options=it.data().options;
if(options & OnlineStatusManager::HideFromMenu)
@@ -409,9 +410,13 @@
action->setEnabled(false);
#endif
- if(parent)
- parent->insert(action);
+ actions.push_front(action);
+ }
+ if (parent)
+ {
+ for (QValueList<KAction *>::Iterator it = actions.begin(); it != actions.end(); ++it)
+ parent->insert(*it);
}
}
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://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