I call the amazon.fr url as follows :
//*****************************************************************************
void ApplicationWindow::amazonFrLogin()
//*****************************************************************************
{
QMessageBox::critical( this,
"Mutant",
"enter amazonFrLogin" );
// target url
QUrl url
("[URL="http
://www.amazon.fr"]http://www.amazon.fr[/URL]");
connect(http, SIGNAL(done(bool)), this, SLOT(getLogin(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::getLogin( bool error )
//*****************************************************************************
{
QMessageBox::critical( this,
"Mutant",
"enter getLogin" );
//*****************************************************************************
void ApplicationWindow::amazonFrLogin()
//*****************************************************************************
{
QMessageBox::critical( this, "Mutant", "enter amazonFrLogin" );
// target url
QUrl url("[URL="http://www.amazon.fr"]http://www.amazon.fr[/URL]");
http = new QHttp(this);
connect(http, SIGNAL(done(bool)), this, SLOT(getLogin(bool)));
// remember to set the host
http->setHost(url.host());
// the resulting data will be stored in the buffer
buffer = new QBuffer(this);
http->get(url.toString(), buffer);
}
//*****************************************************************************
void ApplicationWindow::getLogin( bool error )
//*****************************************************************************
{
QMessageBox::critical( this, "Mutant", "enter getLogin" );
To copy to clipboard, switch view to plain text mode
I get when I execute :
"Mutant", "enter amazonFrLogin"
But never "Mutant", "enter getLogin" as if the call failed somewhere.
So the application goes back to the main loop and waits.
I have use this piece of code before so I know it works.
What can be wrong ?
Bookmarks