[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-3/pwmanager/pwmanager/masterkey
From: Michael Buesch <mbuesch () freenet ! de>
Date: 2005-01-02 14:01:31
Message-ID: 20050102140131.2A8971A331 () office ! kde ! org
[Download RAW message or body]
CVS commit by mbuesch:
use KPasswordDialog.
M +7 -11 masterkey.cpp 1.4
--- kdeextragear-3/pwmanager/pwmanager/masterkey/masterkey.cpp #1.3:1.4
@@ -19,5 +19,5 @@
#endif
-#include <kinputdialog.h>
+#include <kpassdlg.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -88,15 +88,11 @@ MasterKey::Type MasterKey::requestSmartk
MasterKey::Type MasterKey::requestPassword(QByteArray *key)
{
- bool ok = false;
- QString pw;
- pw = KInputDialog::getText(i18n("Enter Master Password"),
- i18n("Please enter the Master Password:"),
- QString::null,
- &ok,
- parent);
- if (!ok)
+ QCString password;
+ int result;
+ result = KPasswordDialog::getPassword(password, i18n("Please enter the Master Password."));
+ if (result != KPasswordDialog::Accepted)
return type_none;
- const char *_pw = pw.ascii();
- key->duplicate(_pw, qstrlen(_pw));
+ // make sure to strip the terminating NUL char.
+ key->duplicate(password.data(), password.size() - 1);
return type_ok;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic