mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
545f3fb988
commit
bf36fd86bf
@ -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."));
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user