From: Konrad Rosenbaum Date: Wed, 27 Nov 2013 07:22:50 +0000 (+0100) Subject: login dialog: set focus more logically if user name is empty X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=e2507e0b4cbb8de055d9c082da9cb574bb05a162;p=web%2Fkonrad%2Fsmoke.git login dialog: set focus more logically if user name is empty --- diff --git a/src/dialogs/login.cpp b/src/dialogs/login.cpp index 528c5ce..01b7d14 100644 --- a/src/dialogs/login.cpp +++ b/src/dialogs/login.cpp @@ -102,7 +102,10 @@ void MLogin::loadProfile() username->setText(set.value("username").toString()); username->setPlaceholderText(set.value("usernamehint").toString()); password->setText(""); - password->setFocus(); + if(username->text().isEmpty()) + username->setFocus(); + else + password->setFocus(); } void MLogin::startLogin()