[GSOC] Quail - Progress 11th July 2013
Ka-Hing Cheung
khc at hxbc.us
Thu Jul 11 15:27:53 EDT 2013
On Thu, 2013-07-11 at 12:04 +0100, Phil Hannent wrote:
>
> I am writing a lot of code just to get the basics like a buddy list,
> accounts and conversation up and running. I now understand how to work
> with both C++ and C calls, however I'm no ninja just yet. A for loop
> which mixed both a QList and a GList is kind of unusual in
> programming, however its just not worth converting the GList to a
> QList or vice versa for the sake of it:
>
>
> for (widget = widgets.first(), l = chatInfoList;
> widget != NULL && l != NULL;
> widget = widgets.next(), l = l->next)
> {
>
>
> (widgets is a QList<QWidget*> and chatInfoList is a GList of
> PurplePluginProtocolInfo*)
Have you considered writing a generic wrapper that exposes iterators for
QList and GList, so you can use modern c++ techniques like foreach?
-khc
More information about the Devel
mailing list