mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-27 18:31:25 -05: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);
|
QVariant data = ui.genPGPuser->itemData(pgpidx);
|
||||||
PGPId = (data.toString()).toStdString();
|
PGPId = (data.toString()).toStdString();
|
||||||
} else {
|
} 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
|
//generate a new gpg key
|
||||||
std::string err_string;
|
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."));
|
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>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<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>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user