The password dialog can be canceled.

Fixed an error when cancel the login password dialog at startup. RetroShare did not start after this.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4537 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-08-05 20:45:09 +00:00
parent b1ac8bc9d2
commit 687b2ecd36
5 changed files with 24 additions and 13 deletions

View file

@ -124,7 +124,7 @@ void NotifyQt::notifyOwnAvatarChanged()
emit ownAvatarChanged() ;
}
std::string NotifyQt::askForPassword(const std::string& key_details,bool prev_is_bad)
bool NotifyQt::askForPassword(const std::string& key_details, bool prev_is_bad, std::string& password)
{
RsAutoUpdatePage::lockAllEvents() ;
@ -139,11 +139,12 @@ std::string NotifyQt::askForPassword(const std::string& key_details,bool prev_is
RsAutoUpdatePage::unlockAllEvents() ;
if (ret) {
return dialog.textValue().toStdString();
if (ret == QDialog::Accepted) {
password = dialog.textValue().toStdString();
return true;
}
return "";
return false;
}
void NotifyQt::notifyDiscInfoChanged()