add input validator for gpg key gen

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2118 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-01-24 22:15:02 +00:00
parent 545f3fb988
commit bf36fd86bf
2 changed files with 16 additions and 1 deletions

View File

@ -162,6 +162,14 @@ void GenCertDialog::genPerson()
QVariant data = ui.genPGPuser->itemData(pgpidx);
PGPId = (data.toString()).toStdString();
} else {
if (ui.password_input->text().length() < 3 || ui.name_input->text().length() < 3) {
/* Message Dialog */
QMessageBox::StandardButton sb = QMessageBox::warning ( NULL,
tr("Generate GPG key Failure"),
tr("Your Name or password is too short (3+ characters)"),
QMessageBox::Ok);
return;
}
//generate a new gpg key
std::string err_string;
ui.no_gpg_key_label->setText(tr("Generating new GPG key, please be patient. Fill in your GPG password when asked."));

View File

@ -1092,7 +1092,14 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="password_input"/>
<widget class="QLineEdit" name="password_input">
<property name="inputMask">
<string/>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</item>