Hello everybody.

I have two get QNetworkRequest.

I want to handle finished signals from different methods.

For example this is code in
GetUserData();
connect(nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(GetUserDataCompleted(QNetworkReply*)));

GetMessages();
connect(nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(GetMessagesCompleted(QNetworkReply*)));

my problem is that when GetMessages Request finished its calls both methods(GetUserDataCompleted, GetMessagesCompleted)

This my one method

I have tried replay->deleteLater(); but same result

Please advice me something useful

void MainWindow::GetUserDataCompleted(QNetworkReply *replay)
{
if(replay->error() == QNetworkReply::NoError)
{
QString getData = replay->readAll();
QMessageBox msg;

if(getData == "1")
{
msg.setText("User Is not Exits");
}
else
{
QDomDocument doc;

if(doc.setContent(getData))
{
QDomElement domElem = doc.documentElement();

QDomNode n = domElem.firstChild();
while(!n.isNull()) {
QDomElement e = n.toElement(); // try to convert the node to an element.
if(!e.isNull()) {
msg.setText(e.namedItem("Image").childNodes().at(0).nodeValue());
msg.exec();
}
n = n.nextSibling();
}
}

replay->deleteLater();
}
}
}