X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;ds=inline;f=src%2Fapps%2FPswGen%2FGUI%2Fgui.cpp;h=dad6f691c75df8418d82e71175856f23add5e4d3;hb=3352f7acc232104985807b9f470cb12bcb2b47c2;hp=34bd2f0028d89e69de8a8f51337257d492c70466;hpb=1d2a1e80abac012e9755cd23b264e3e099ccc3f5;p=evaf
diff --git a/src/apps/PswGen/GUI/gui.cpp b/src/apps/PswGen/GUI/gui.cpp
index 34bd2f0..dad6f69 100644
--- a/src/apps/PswGen/GUI/gui.cpp
+++ b/src/apps/PswGen/GUI/gui.cpp
@@ -40,6 +40,8 @@ Q_EXPORT_PLUGIN2(VER_MODULE_NAME_STR, PswGen::GUI::Module)
using namespace eVaf::PswGen::GUI;
+int const Module::DefaultPasswordLength = 16;
+
Module::Module()
: Plugins::iPlugin()
, mReady(false)
@@ -100,7 +102,7 @@ bool Module::init(QString const & args)
wLength = new QSpinBox;
l->setBuddy(wLength);
wLength->setRange(0, mGenerator->maxLength());
- wLength->setValue(PswGen::iGenerator::DEFAULT_LENGTH);
+ wLength->setValue(DefaultPasswordLength);
wLength->setSpecialValueText(tr("Maximum", VER_MODULE_NAME_STR));
g->addWidget(wLength, 2, 1);
@@ -162,7 +164,7 @@ void Module::generateClicked()
{
if (wMasterPassword->text().isEmpty() || wName->text().isEmpty())
return;
- wPassword->setText(mGenerator->generatePassword(wName->text().toLatin1().constData(), wMasterPassword->text().toLatin1().constData(), wLength->value()));
+ wPassword->setText(mGenerator->generatePassword(wName->text(), wMasterPassword->text(), wLength->value()));
wCopy->setEnabled(true);
}