Ok, sorry for posting only that part of a code which is executed during one pass through MyMethod which is making problems. Whole MyMethod logic is:
void MyClass::MyMethod()
{
verifyPIN(); //user promted to enter PIN here
if(verification was successfull)
{
do some atcions
} else if(verification was unsuccessfull)
{
if(PIN was locked)
{
message->setWindowTitle("Error");
message->setText("PIN was locked");
message->setInformativeText("Do you wand to unblock PIN?");
ret = message->exec();
{
suggestAction->setEnabled(true);
solutions += "baz";
this->suggestSolutions();
}
return;
}
message->setWindowTitle("Title");
message->setText("Wrong PIN");
message->exec();
this->MyMethod();
}
treeClicked(navigator->currentItem());
}
void MyClass::MyMethod()
{
verifyPIN(); //user promted to enter PIN here
if(verification was successfull)
{
do some atcions
} else if(verification was unsuccessfull)
{
if(PIN was locked)
{
message->setWindowTitle("Error");
message->setText("PIN was locked");
message->setInformativeText("Do you wand to unblock PIN?");
message->setIcon(QMessageBox::Critical);
message->setStandardButtons(QMessageBox::Yes | QMessageBox::No);
ret = message->exec();
if(ret == QMessageBox::Yes) unblockPIN();
if(ret == QMessageBox::No)
{
suggestAction->setEnabled(true);
solutions += "baz";
this->suggestSolutions();
}
return;
}
message->setWindowTitle("Title");
message->setText("Wrong PIN");
message->setIcon(QMessageBox::Critical);
message->setStandardButtons(QMessageBox::Ok);
message->exec();
this->MyMethod();
}
treeClicked(navigator->currentItem());
}
To copy to clipboard, switch view to plain text mode
Bookmarks