I edited the code a bit (i was showing the wrong proc, but it is the same code, just a ditfferent outbound slot) to trace it a bit :
//*****************************************************************************
void ApplicationWindow::creditUrl()
//*****************************************************************************
{
// target url
QUrl url
("http://api.smsbox.fr/index.php?");
url.addQueryItem("login", iniGet( "Login" ));
url.addQueryItem("pass", iniGet( "Password" ));
url.addQueryItem("action", iniGet( "Action" ));
connect(http, SIGNAL(done(bool)), this, SLOT(defineSMSCredit(bool)));
// remember to set the host
http->setHost(url.host());
// the resulting data will be stored in the buffer
http->get(url.toString(), buffer);
}
//*****************************************************************************
void ApplicationWindow::creditUrl()
//*****************************************************************************
{
// target url
QMessageBox::warning( this, "creditUrl", "start" );
QUrl url("http://api.smsbox.fr/index.php?");
url.addQueryItem("login", iniGet( "Login" ));
url.addQueryItem("pass", iniGet( "Password" ));
url.addQueryItem("action", iniGet( "Action" ));
http = new QHttp(this);
QMessageBox::warning( this, "creditUrl", "connect" );
connect(http, SIGNAL(done(bool)), this, SLOT(defineSMSCredit(bool)));
// remember to set the host
http->setHost(url.host());
// the resulting data will be stored in the buffer
buffer = new QBuffer(this);
QMessageBox::warning( this, "creditUrl", "get" );
http->get(url.toString(), buffer);
}
To copy to clipboard, switch view to plain text mode
The the slot proc :
//*****************************************************************************
void ApplicationWindow::defineSMSCredit( bool error )
//*****************************************************************************
{
QMessageBox::warning( this,
"defineSMSCredit",
"before handle" );
// handle http reply for credit request
handleSMSCredit( error );
QMessageBox::warning( this,
"defineSMSCredit",
"after handle" );
etc...
//*****************************************************************************
void ApplicationWindow::defineSMSCredit( bool error )
//*****************************************************************************
{
QMessageBox::warning( this, "defineSMSCredit", "before handle" );
// handle http reply for credit request
handleSMSCredit( error );
QMessageBox::warning( this, "defineSMSCredit", "after handle" );
etc...
To copy to clipboard, switch view to plain text mode
When I run that I see:
start
connect
before handle
and then it goes away...
Bookmarks