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 );
d->socket->connectToHost( d->pop3_server , d->port );
To copy to clipboard, switch view to plain text mode
I tried (not good but, need it.. ):
QTimer::singleShot(20000,
this,
SLOT(exitnow
()));
QTimer::singleShot(20000, this, SLOT(exitnow()));
To copy to clipboard, switch view to plain text mode
my slot:
void Pop3::exitnow()
{
QCoreApplicaition::exit(0);
}
void Pop3::exitnow()
{
QCoreApplicaition::exit(0);
}
To copy to clipboard, switch view to plain text mode
also tried:
void Pop3::exitnow()
{
exit(0);
}
void Pop3::exitnow()
{
exit(0);
}
To copy to clipboard, switch view to plain text mode
I debugged the application and saw that the exitnow() slot is called;but the application doesn't terminate.
Bookmarks