add default charset when not specified

explicitly state the wordcount default value
This commit is contained in:
thez3ro 2018-01-22 13:47:20 +01:00
parent e9612ee9e6
commit e57a2e0fa9
No known key found for this signature in database
GPG key ID: F628F9E41DD7C073
7 changed files with 16 additions and 12 deletions

View file

@ -35,11 +35,19 @@ double PasswordGenerator::calculateEntropy(QString password)
void PasswordGenerator::setLength(int length)
{
if (length <= 0) {
m_length = DefaultLength;
return;
}
m_length = length;
}
void PasswordGenerator::setCharClasses(const CharClasses& classes)
{
if (classes == 0) {
m_classes = DefaultCharset;
return;
}
m_classes = classes;
}