From 60e7c54303f5d85900acbdb99b3ef27f73ffcc1d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 5 Nov 2013 11:26:53 -0800 Subject: [PATCH] fix some checks for empty inputs --- interface/src/Menu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index d4641af851..0efe582df2 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -742,7 +742,7 @@ void Menu::login() { loginDialog.resize(loginDialog.parentWidget()->size().width() * DIALOG_RATIO_OF_WINDOW, loginDialog.size().height()); int dialogReturn = loginDialog.exec(); - if (dialogReturn == QDialog::Accepted && loginDialog.textValue().isEmpty() && loginDialog.textValue() != username) { + if (dialogReturn == QDialog::Accepted && !loginDialog.textValue().isEmpty() && loginDialog.textValue() != username) { // there has been a username change // ask for a profile reset with the new username Application::getInstance()->resetProfile(loginDialog.textValue()); @@ -875,7 +875,7 @@ void Menu::goToDomain() { domainDialog.resize(domainDialog.parentWidget()->size().width() * DIALOG_RATIO_OF_WINDOW, domainDialog.size().height()); int dialogReturn = domainDialog.exec(); - if (dialogReturn == QDialog::Accepted && domainDialog.textValue().isEmpty()) { + if (dialogReturn == QDialog::Accepted && !domainDialog.textValue().isEmpty()) { updateDSHostname(domainDialog.textValue()); } } @@ -929,7 +929,7 @@ void Menu::goToUser() { userDialog.resize(userDialog.parentWidget()->size().width() * DIALOG_RATIO_OF_WINDOW, userDialog.size().height()); int dialogReturn = userDialog.exec(); - if (dialogReturn == QDialog::Accepted && userDialog.textValue().isEmpty()) { + if (dialogReturn == QDialog::Accepted && !userDialog.textValue().isEmpty()) { // there's a username entered by the user, make a request to the data-server DataServerClient::getValuesForKeysAndUserString((QStringList() << DataServerKey::Domain << DataServerKey::Position), userDialog.textValue());