summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwm.cpp
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/pwm.cpp') (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwm.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index fc6837f..aed8ec0 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -650,24 +650,25 @@ void PwM::addPwd_slot1(QString *pw, PwMDoc *_doc)
w.setCaption( i18n ("Add new password") );
vector<string> catList;
doc->getCategoryList(&catList);
unsigned i, size = catList.size();
for (i = 0; i < size; ++i) {
w.addCategory(catList[i].c_str());
}
w.setCurrCategory(view->getCurrentCategory());
if (pw)
w.pwLineEdit->setText(*pw);
tryAgain:
+ w.descLineEdit->setFocus();
if (w.exec() == 1)
{
PwMDataItem d;
//US BUG: to initialize all values of curEntr with meaningfulldata,
// we call clear on it. Reason: Metadata will be uninitialized otherwise.
// another option would be to create a constructor for PwMDataItem
d.clear(true);
d.desc = w.getDescription().latin1();
d.name = w.getUsername().latin1();
d.pw = w.getPassword().latin1();
@@ -750,24 +751,25 @@ void PwM::editPwd_slot3(const QString *category, const int *index,
doc->getCategoryList(&catList);
unsigned i, size = catList.size();
for (i = 0; i < size; ++i) {
w.addCategory(catList[i].c_str());
}
w.setCurrCategory(curCategory);
w.setDescription(currItem.desc.c_str());
w.setUsername(currItem.name.c_str());
w.setPassword(currItem.pw.c_str());
w.setUrl(currItem.url.c_str());
w.setLauncher(currItem.launcher.c_str());
w.setComment(currItem.comment.c_str());
+ w.descLineEdit->setFocus();
if (w.exec() == 1) {
currItem.desc = w.getDescription().latin1();
currItem.name = w.getUsername().latin1();
currItem.pw = w.getPassword().latin1();
currItem.comment = w.getComment().latin1();
currItem.url = w.getUrl().latin1();
currItem.launcher = w.getLauncher().latin1();
if (!doc->editEntry(curCategory, w.getCategory(),
curEntryIndex, &currItem)) {
KMessageBox::error(this,
i18n("Couldn't edit the entry.\n"
"Maybe you changed the category and\n"