diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-05-22 12:49:43 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-05-22 12:49:43 (GMT) |
commit | 4945e1e38c56811998fa4a8b39c595cb4fbc3d9b (patch) | |
tree | 32d25187aad4100fb0674ca3b6384480948a8da4 | |
parent | 386aac47c485d1a9066a1aa065fe584c60ac850c (diff) | |
download | swift-contrib-4945e1e38c56811998fa4a8b39c595cb4fbc3d9b.zip swift-contrib-4945e1e38c56811998fa4a8b39c595cb4fbc3d9b.tar.bz2 |
Only forget login details in eagle mode
-rw-r--r-- | Swift/QtUI/QtLoginWindow.cpp | 5 | ||||
-rw-r--r-- | Swift/QtUI/QtLoginWindow.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp index 45d7c7e..a0823d0 100644 --- a/Swift/QtUI/QtLoginWindow.cpp +++ b/Swift/QtUI/QtLoginWindow.cpp @@ -39,7 +39,7 @@ namespace Swift{ -QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() { +QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow(), forgetful_(false) { uiEventStream_ = uiEventStream; setWindowTitle("Swift"); @@ -198,6 +198,7 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() { } void QtLoginWindow::setRememberingAllowed(bool allowed) { + forgetful_ = true; remember_->setEnabled(allowed); loginAutomatically_->setEnabled(allowed); if (!allowed) { @@ -313,7 +314,7 @@ void QtLoginWindow::setIsLoggingIn(bool loggingIn) { void QtLoginWindow::loginClicked() { if (username_->isEnabled()) { onLoginRequest(Q2PSTRING(username_->currentText()), Q2PSTRING(password_->text()), Q2PSTRING(certificateFile_), remember_->isChecked(), loginAutomatically_->isChecked()); - if (!remember_->isEnabled()) { /* Mustn't remember logins */ + if (forgetful_) { /* Mustn't remember logins */ username_->clearEditText(); password_->setText(""); } diff --git a/Swift/QtUI/QtLoginWindow.h b/Swift/QtUI/QtLoginWindow.h index 410ed0a..b2c547e 100644 --- a/Swift/QtUI/QtLoginWindow.h +++ b/Swift/QtUI/QtLoginWindow.h @@ -86,5 +86,6 @@ namespace Swift { QAction* toggleNotificationsAction_; UIEventStream* uiEventStream_; QPointer<QtAboutWidget> aboutDialog_; + bool forgetful_; }; } |