X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;ds=inline;f=src%2Fapps%2FPswGen%2FGUI%2Fgui.cpp;h=50eaca11a541c2acb0a89ec8d7e832cc24156320;hb=8d44aa97324c1fb3e5d36d03d5d6b7386cbb589e;hp=5ebbf105d35de903c65b4f70beda24baad01afec;hpb=a1941ef19ec631bf25c883c541f6841f8e2d7252;p=evaf
diff --git a/src/apps/PswGen/GUI/gui.cpp b/src/apps/PswGen/GUI/gui.cpp
index 5ebbf10..50eaca1 100644
--- a/src/apps/PswGen/GUI/gui.cpp
+++ b/src/apps/PswGen/GUI/gui.cpp
@@ -82,10 +82,20 @@ bool Module::init(QString const & args)
v->addLayout(g);
g->setColumnStretch(2, 2);
- QLabel * l = new QLabel(tr("Web site or application &name:", VER_MODULE_NAME_STR));
+ QLabel * l = new QLabel(tr("Master &password:", VER_MODULE_NAME_STR));
l->setAlignment(Qt::AlignRight);
g->addWidget(l, 0, 0);
+ wMasterPassword = new QLineEdit;
+ l->setBuddy(wMasterPassword);
+ connect(wMasterPassword, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString)));
+ wMasterPassword->setEchoMode(QLineEdit::Password);
+ g->addWidget(wMasterPassword, 0, 1, 1, 2);
+
+ l = new QLabel(tr("Web site or application &name:", VER_MODULE_NAME_STR));
+ l->setAlignment(Qt::AlignRight);
+ g->addWidget(l, 1, 0);
+
wName = new QLineEdit;
l->setBuddy(wName);
if (mStorage) {
@@ -95,19 +105,9 @@ bool Module::init(QString const & args)
wName->setCompleter(completer);
}
connect(wName, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString)));
- g->addWidget(wName, 0, 1, 1, 2);
+ g->addWidget(wName, 1, 1, 1, 2);
win->widget()->setFocusProxy(wName);
- l = new QLabel(tr("Master &password:", VER_MODULE_NAME_STR));
- l->setAlignment(Qt::AlignRight);
- g->addWidget(l, 1, 0);
-
- wMasterPassword = new QLineEdit;
- l->setBuddy(wMasterPassword);
- connect(wMasterPassword, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString)));
- wMasterPassword->setEchoMode(QLineEdit::Password);
- g->addWidget(wMasterPassword, 1, 1, 1, 2);
-
l = new QLabel(tr("&Length of the password:", VER_MODULE_NAME_STR));
l->setAlignment(Qt::AlignRight);
g->addWidget(l, 2, 0);
@@ -187,7 +187,7 @@ void Module::generateClicked()
if (mStorage) {
QExplicitlySharedDataPointer data = mStorage->query(wName->text());
if (!data)
- data = new Storage::Data(wLength->value());
+ data = new Storage::Data(wName->text(), wLength->value());
else
data->setLength(wLength->value());
mStorage->save(wName->text(), data);