Fix getting the user's XMPP password for the first time

This commit is contained in:
David Sansome 2011-02-18 20:14:08 +00:00
parent 6b9f41d6ae
commit c4f14527c8
2 changed files with 5 additions and 1 deletions

View File

@ -96,6 +96,7 @@ void RemoteConfig::AuthenticationComplete(bool success) {
waiting_for_auth_ = false;
if (success) {
validated_password_ = ui_->password->text();
ui_->password->clear();
} else {
QMessageBox::warning(this, tr("Authentication failed"), tr("Your Google credentials were incorrect"));
@ -119,7 +120,8 @@ void RemoteConfig::Save() {
const QString& username = ui_->username->text();
s.setValue("username", username);
Keychain* keychain = Keychain::getDefault();
keychain->setPassword(username, ui_->password->text());
keychain->setPassword(username, validated_password_);
validated_password_.clear();
}
void RemoteConfig::SignOut() {

View File

@ -54,6 +54,8 @@ class RemoteConfig : public QWidget {
Ui_RemoteConfig* ui_;
bool waiting_for_auth_;
NetworkAccessManager* network_;
QString validated_password_;
};
#endif // REMOTECONFIG_H