summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp5
-rw-r--r--Swift/QtUI/QtLoginWindow.h1
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_;
};
}