QHttp needs a running event loop.
QHttp needs a running event loop.
In short words, use signals and slots. For Hattrick I use the requestFinished slot and store a type of request along the request id. This way I know if I'm in a search-server, login, logout or download phase and can easily redirect to the appropriate method which handles the next phase.
importantman (31st March 2006)
> For Hattrick I use the requestFinished slot and store a type of request along the request id.
that's a good idea, better than changing signal/slot connections !!
(surprised someone here knows hattrick)![]()
btw: how do you enter quotes in this thing ?
and jacek: what is a running event loop ?
My first attempt was to change connections too (when I was still using Qt3), but after your post here I decided to change it in the new code (as I'm porting my HT app to Qt4) and thought this was much better idea. It took me about 15 minutes to implement the whole login process.Originally Posted by importantman
Hattrick is a big family. Over half a milion people use it.(surprised someone here knows hattrick)![]()
I don't understand. What quotes?btw: how do you enter quotes in this thing ?
Well, I used the state variable idea, and tydied up something else, and I can now connect to the next page, and even recieve the security code (cookie), but when I ask for the next page I get only the time-out response.Originally Posted by wysota
Here's the cookie I get: ASPSESSIONIDSSSRBAQB=JMIGEOEDGPJOICJPBHBKGANJ;
And my connection string for the next site: getStr="/common/players.asp?outputType=XML&actionType=view";
I've tried pulling apart the cookie, but still no luck. Any suggestions ?
BTW: Is your application published?
BTW: How 'bout a friendly ?
Not yet. I don't have time to finish it because I'm answering Qt questions here at QtCentreOriginally Posted by importantman
Sure. But next weekBTW: How 'bout a friendly ?
As for the cookie, I just set the cookie exactly as I receive it (maybe it's better to move this conversation to CHPP forum on HT?), I don't even look at its contents.
So in this case:
Set-cookie: ASPSESSIONIDSSSRBAQB=JMIGEOEDGPJOICJPBHBKGANJ;
Last edited by wysota; 3rd April 2006 at 10:17.
I tried the folks at the CHPP forum, but I think they all write in php.Originally Posted by wysota
One guy told me to try using only the second part of the cookie string ( and I think he meant the part after the '=', but I'm not sure, It didn't work anyway.)
Perhaps I have to have 'Set-cookie' instead of 'set-cookie' ? The header I recieve says 'set-cookie'. I'll try it anyway when I get home.
No... My mistake... it should be "cookie:" not "set-cookie:".
importantman (4th April 2006)
Hey! It works!This is the last part of my program, all I have to do is write the mapping function (xml->sql) and I'm done. (at least with the first pre-release)
check out hdm.sourceforge.net sometime when I build the release!
Event loop delivers events to objects. In Qt3 main event loop runs in the GUI thread (you start it when you invoke QApplication::exec()) and each time you open a modal dialog it creates its own temporary event loop.Originally Posted by importantman
If event loop isn't running, your application doesn't process events and all event-driven parts are not functioning: widgets don't redraw themselves, user can't interact with your GUI, QSockets don't emit signals and so on.
If you wait for something in a loop and you don't allow your application to process events (i.e. you block the event loop), it might occur that this loop is in fact an infinite loop.
Bookmarks