Libpurple disconnecting issue

Benjamin Arnaud bunjeee at free.fr
Wed Mar 26 20:11:21 EDT 2008


Ethan,

Thanks a lot,
I think you pointed out my issue, now I need to fix it.
Here is my main loop :

/* virtual */ void ZePurpleApi::run()
{
 // Logging
 mLogging = false;

// Init the core and the ui events
 InitPurpleApi();

 // Update timer
 connect(&mUpdateTimer, SIGNAL(timeout()), this, SLOT(onUpdate()));
 connect(this, SIGNAL(started()), this, SLOT(onThreadStart()));

// Glib loop
 GMainLoop *loop = g_main_loop_new(NULL, FALSE);
 g_main_loop_run(loop);

// (Apps never gets there :-/)

// Qt loop (Never executed)
exec();
}

I think the problem out there is that "exec()" is never executed.
And like it's written in Qt doc :
"You can start the event loop by calling exec(); you can stop it by calling 
exit() or quit(). Having an event loop in a thread makes it possible to 
connect signals from other threads to slots in this threads, using a 
mechanism called queued connections."

I guess that if the event loop never starts, signals might not be processed 
correctly, wpurple_stuff is based on threads, so the whole package crashes.

Now I need a way to execute my Qt loop and the glib loop inside some other 
function. Or maybe you have some advice on this?

----- Original Message ----- 
From: "Ethan Blanton" <elb at pidgin.im>
To: <devel at pidgin.im>
Sent: Thursday, March 27, 2008 12:49 AM
Subject: Re: Libpurple disconnecting issue


> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
> 




More information about the Devel mailing list