yagabey
2nd February 2009, 19:19
Hello,
I am trying to connect to a host in my core application. If socket can connect to the host; no problem...But if it cannot resolve the hostname, the application stucks there. The application doesn't crash; but just refuses to exit, after that point...
I tried QCoreApplication::exit() and standart c library exit() functions, none could terminate the program. Is there any way to exit the program, no matter how?
that is the stubborn connecttohost function:
d->socket->connectToHost( d->pop3_server , d->port );
I tried (not good but, need it.. ):
QTimer::singleShot(20000, this, SLOT(exitnow()));
my slot:
void Pop3::exitnow()
{
QCoreApplicaition::exit(0);
}
also tried:
void Pop3::exitnow()
{
exit(0);
}
I debugged the application and saw that the exitnow() slot is called;but the application doesn't terminate.
I am trying to connect to a host in my core application. If socket can connect to the host; no problem...But if it cannot resolve the hostname, the application stucks there. The application doesn't crash; but just refuses to exit, after that point...
I tried QCoreApplication::exit() and standart c library exit() functions, none could terminate the program. Is there any way to exit the program, no matter how?
that is the stubborn connecttohost function:
d->socket->connectToHost( d->pop3_server , d->port );
I tried (not good but, need it.. ):
QTimer::singleShot(20000, this, SLOT(exitnow()));
my slot:
void Pop3::exitnow()
{
QCoreApplicaition::exit(0);
}
also tried:
void Pop3::exitnow()
{
exit(0);
}
I debugged the application and saw that the exitnow() slot is called;but the application doesn't terminate.