|
|
This dialog asks the user to enter a password. The functions you're probably interested in are the static methods, getPassword() and getNewPassword().
QCString password; int result = KPasswordDialog::getPassword(password, i18n("Password")); if (result == KPasswordDialog::Accepted) use(password); |
Keeping passwords in memory can be a potential security hole. You should handle this situation with care.
|
|
[virtual]
void |
Set the password prompt.
void |
Add a line of information to the dialog.
const char * |
[const]
Returns the password entered. The memory is freed in the destructor, so you should make a copy.
bool |
[const]
Returns true if the user wants to keep the password.
int |
[static]
Pops up the dialog, asks the user for a password, and returns it.
Parameters:
password | The password is returned in this reference parameter. |
prompt | A prompt for the password. This can be a few lines of information. The text is word broken to fit nicely in the dialog. |
keep | Enable/disable a checkbox controlling password keeping. If you pass a null pointer, or a pointer to the value 0, the checkbox is not shown. If you pass a pointer to a nonzero value, the checkbox is shown and the result is stored in *keep. |
Returns: Result code: Accepted or Rejected.
int |
[static]
Pops up the dialog, asks the user for a password and returns it. The user has to enter the password twice to make sure it was entered correctly.
Parameters:
password | The password is returned in this reference parameter. |
prompt | A prompt for the password. This can be a few lines of information. The text is word broken to fit nicely in the dialog. |
Returns: Result code: Accepted or Rejected.
void |
[static]
Static helper funtion that disables core dumps.
enum |
void |
[protected slots: slot]
Reimplemented from KDialogBase.
void |
[protected slots: slot]
Reimplemented from KDialogBase.
void |
[protected slots: slot]
bool |
[protected: virtual]
Virtual function that can be overridden to provide password
checking in derived classes. It should return true
if the
password is valid, false
otherwise.