aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient/mainDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/GuiClient/mainDialog.cpp')
-rw-r--r--examples/GuiClient/mainDialog.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/examples/GuiClient/mainDialog.cpp b/examples/GuiClient/mainDialog.cpp
index 896b0993..13fc6fd1 100644
--- a/examples/GuiClient/mainDialog.cpp
+++ b/examples/GuiClient/mainDialog.cpp
@@ -54,9 +54,16 @@ mainDialog::mainDialog(QWidget *parent): QDialog(parent, Qt::Window),
ui->label_throbber->movie()->start();
showSignInPage();
loadAccounts();
- bool check = connect(&m_xmppClient.rosterManager(),
+
+ bool check = connect(ui->lineEdit_userName,
+ SIGNAL(editingFinished()),
+ this, SLOT(userNameLineEdit_editingFinished()));
+ Q_ASSERT(check);
+
+ check = connect(&m_xmppClient.rosterManager(),
SIGNAL(rosterReceived()),
this, SLOT(rosterReceived()));
+ Q_ASSERT(check);
check = connect(&m_xmppClient.rosterManager(),
SIGNAL(rosterChanged(const QString&)),
@@ -519,3 +526,9 @@ void mainDialog::loadAccounts()
completer->setCaseSensitivity(Qt::CaseInsensitive);
ui->lineEdit_userName->setCompleter(completer);
}
+
+void mainDialog::userNameLineEdit_editingFinished()
+{
+ QString passwd = m_accountsCache.getPassword(ui->lineEdit_userName->text());
+ ui->lineEdit_password->setText(passwd);
+}