mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-03 03:56:08 -04:00
permit only wordcount > 0
This commit is contained in:
parent
044feea23a
commit
1d32695f10
3 changed files with 9 additions and 3 deletions
|
@ -45,7 +45,13 @@ double PassphraseGenerator::calculateEntropy(QString passphrase)
|
||||||
|
|
||||||
void PassphraseGenerator::setWordCount(int wordCount)
|
void PassphraseGenerator::setWordCount(int wordCount)
|
||||||
{
|
{
|
||||||
|
if (wordCount > 0) {
|
||||||
m_wordCount = wordCount;
|
m_wordCount = wordCount;
|
||||||
|
} else {
|
||||||
|
// safe default if something goes wrong
|
||||||
|
m_wordCount = 7;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PassphraseGenerator::setWordlist(QString path)
|
void PassphraseGenerator::setWordlist(QString path)
|
||||||
|
|
|
@ -340,7 +340,7 @@ void PasswordGeneratorWidget::updateGenerator()
|
||||||
m_ui->buttonGenerate->setEnabled(false);
|
m_ui->buttonGenerate->setEnabled(false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int minWordCount = 0;
|
int minWordCount = 1;
|
||||||
|
|
||||||
if (m_ui->spinBoxWordCount->value() < minWordCount) {
|
if (m_ui->spinBoxWordCount->value() < minWordCount) {
|
||||||
m_updatingSpinBox = true;
|
m_updatingSpinBox = true;
|
||||||
|
|
|
@ -204,7 +204,7 @@ QProgressBar::chunk {
|
||||||
<enum>QTabWidget::Rounded</enum>
|
<enum>QTabWidget::Rounded</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="passwordWidget">
|
<widget class="QWidget" name="passwordWidget">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue