summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index 1cb1c68..d1fac1e 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -327,27 +327,25 @@ void QtLoginWindow::addAvailableAccount(const std::string& defaultJID, const std
}
void QtLoginWindow::handleUsernameTextChanged() {
QString username = username_->currentText();
for (int i = 0; i < usernames_.count(); i++) {
if (username_->currentText() == usernames_[i]) {
certificateFile_ = certificateFiles_[i];
password_->setText(passwords_[i]);
remember_->setChecked(password_->text() != "");
currentOptions_ = options_[i];
}
}
- if (!certificateFile_.isEmpty()) {
- certificateButton_->setChecked(true);
- }
+ certificateButton_->setChecked(!certificateFile_.isEmpty());
}
void QtLoginWindow::loggedOut() {
stack_->removeWidget(stack_->currentWidget());
stack_->addWidget(loginWidgetWrapper_);
stack_->setCurrentWidget(loginWidgetWrapper_);
setInitialMenus();
setIsLoggingIn(false);
}
void QtLoginWindow::setIsLoggingIn(bool loggingIn) {
/* Change the for loop as well if you add to this.*/