diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-26 07:10:40 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-26 07:10:40 +0000 |
| commit | 99a74b5f69d2f4e6d5efe70a3495146e32ace843 (patch) | |
| tree | 46692cd55ad82381f32d5c5b2a015b8bd57e30a1 /examples/GuiClient/mainDialog.cpp | |
| parent | ab1d40fdf4580579fc82b4d84dbe04ae0d348042 (diff) | |
| download | qxmpp-99a74b5f69d2f4e6d5efe70a3495146e32ace843.tar.gz | |
check rememberPassword checkBox if password was saved
Diffstat (limited to 'examples/GuiClient/mainDialog.cpp')
| -rw-r--r-- | examples/GuiClient/mainDialog.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/GuiClient/mainDialog.cpp b/examples/GuiClient/mainDialog.cpp index 37e8eeee..2b0469f6 100644 --- a/examples/GuiClient/mainDialog.cpp +++ b/examples/GuiClient/mainDialog.cpp @@ -559,8 +559,10 @@ void mainDialog::loadAccounts() if(!list.isEmpty()) { ui->lineEdit_userName->setText(list.last()); - ui->lineEdit_password->setText(m_accountsCache. - getPassword(list.last())); + QString passwd = m_accountsCache.getPassword(list.last()); + ui->lineEdit_password->setText(passwd); + if(!passwd.isEmpty()) + ui->checkBox_rememberPasswd->setChecked(true); } } @@ -568,6 +570,8 @@ void mainDialog::userNameCompleter_activated(const QString& user) { QString passwd = m_accountsCache.getPassword(user); ui->lineEdit_password->setText(passwd); + if(!passwd.isEmpty()) + ui->checkBox_rememberPasswd->setChecked(true); } void mainDialog::addAccountToCache() |
