mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Merge pull request #2800 from Kissaki/cert-pw
CertWizard: Password requirement notice on import
This commit is contained in:
commit
8f94c763ab
@ -120,6 +120,7 @@ CertWizard::CertWizard(QWidget *p) : QWizard(p) {
|
||||
|
||||
qwpExport->setCommitPage(true);
|
||||
qwpExport->setComplete(false);
|
||||
qlPasswordNotice->setVisible(false);
|
||||
}
|
||||
|
||||
int CertWizard::nextId() const {
|
||||
@ -305,6 +306,8 @@ void CertWizard::on_qleImportFile_textChanged(const QString &text) {
|
||||
qlePassword->clear();
|
||||
qlePassword->setEnabled(false);
|
||||
qlPassword->setEnabled(false);
|
||||
qlPasswordNotice->clear();
|
||||
qlPasswordNotice->setVisible(false);
|
||||
qwpImport->setComplete(false);
|
||||
return;
|
||||
}
|
||||
@ -318,17 +321,23 @@ void CertWizard::on_qleImportFile_textChanged(const QString &text) {
|
||||
if (validateCert(imp)) {
|
||||
qlePassword->setEnabled(false);
|
||||
qlPassword->setEnabled(false);
|
||||
qlPasswordNotice->clear();
|
||||
qlPasswordNotice->setVisible(false);
|
||||
cvImport->setCert(imp.first);
|
||||
qwpImport->setComplete(true);
|
||||
return;
|
||||
} else {
|
||||
qlePassword->setEnabled(true);
|
||||
qlPassword->setEnabled(true);
|
||||
qlPasswordNotice->setText(tr("Unable to import. Missing password or incompatible file type."));
|
||||
qlPasswordNotice->setVisible(true);
|
||||
}
|
||||
} else {
|
||||
qlePassword->clear();
|
||||
qlePassword->setEnabled(false);
|
||||
qlPassword->setEnabled(false);
|
||||
qlPasswordNotice->clear();
|
||||
qlPasswordNotice->setVisible(false);
|
||||
}
|
||||
cvImport->setCert(QList<QSslCertificate>());
|
||||
qwpImport->setComplete(false);
|
||||
|
||||
@ -227,6 +227,24 @@ It is <b>strongly</b> recommended that you <a href="http://m
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3">
|
||||
<widget class="QLabel" name="qlPasswordNotice">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#ff0000;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="CertView" name="cvImport">
|
||||
<property name="toolTip">
|
||||
<string>Certificate to import</string>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user