From 99a74b5f69d2f4e6d5efe70a3495146e32ace843 Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Sun, 26 Sep 2010 07:10:40 +0000 Subject: check rememberPassword checkBox if password was saved --- examples/GuiClient/mainDialog.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'examples/GuiClient/mainDialog.cpp') 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() -- cgit v1.2.3