mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 17:10:41 +02:00
fix some checks for empty inputs
This commit is contained in:
parent
145efbda2d
commit
60e7c54303
1 changed files with 3 additions and 3 deletions
|
@ -742,7 +742,7 @@ void Menu::login() {
|
||||||
loginDialog.resize(loginDialog.parentWidget()->size().width() * DIALOG_RATIO_OF_WINDOW, loginDialog.size().height());
|
loginDialog.resize(loginDialog.parentWidget()->size().width() * DIALOG_RATIO_OF_WINDOW, loginDialog.size().height());
|
||||||
|
|
||||||
int dialogReturn = loginDialog.exec();
|
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
|
// there has been a username change
|
||||||
// ask for a profile reset with the new username
|
// ask for a profile reset with the new username
|
||||||
Application::getInstance()->resetProfile(loginDialog.textValue());
|
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());
|
domainDialog.resize(domainDialog.parentWidget()->size().width() * DIALOG_RATIO_OF_WINDOW, domainDialog.size().height());
|
||||||
|
|
||||||
int dialogReturn = domainDialog.exec();
|
int dialogReturn = domainDialog.exec();
|
||||||
if (dialogReturn == QDialog::Accepted && domainDialog.textValue().isEmpty()) {
|
if (dialogReturn == QDialog::Accepted && !domainDialog.textValue().isEmpty()) {
|
||||||
updateDSHostname(domainDialog.textValue());
|
updateDSHostname(domainDialog.textValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -929,7 +929,7 @@ void Menu::goToUser() {
|
||||||
userDialog.resize(userDialog.parentWidget()->size().width() * DIALOG_RATIO_OF_WINDOW, userDialog.size().height());
|
userDialog.resize(userDialog.parentWidget()->size().width() * DIALOG_RATIO_OF_WINDOW, userDialog.size().height());
|
||||||
|
|
||||||
int dialogReturn = userDialog.exec();
|
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
|
// there's a username entered by the user, make a request to the data-server
|
||||||
DataServerClient::getValuesForKeysAndUserString((QStringList() << DataServerKey::Domain << DataServerKey::Position),
|
DataServerClient::getValuesForKeysAndUserString((QStringList() << DataServerKey::Domain << DataServerKey::Position),
|
||||||
userDialog.textValue());
|
userDialog.textValue());
|
||||||
|
|
Loading…
Reference in a new issue