Improve indication of user not being logged in
Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -4625,11 +4625,15 @@ void Application::resetSensors(bool andReload) { · 4624 unmodified lines | ||
| 4625 | 4625 | |
| 4626 | 4626 | void Application::updateWindowTitle() const { |
| 4627 | 4627 | |
| 4628 | − QString buildVersion = " (build " + applicationVersion() + ")"; | |
| 4629 | 4628 | auto nodeList = DependencyManager::get<NodeList>(); |
| 4629 | + auto accountManager = DependencyManager::get<AccountManager>(); | |
| 4630 | + | |
| 4631 | + QString buildVersion = " (build " + applicationVersion() + ")"; | |
| 4632 | + | |
| 4633 | + QString loginStatus = accountManager->isLoggedIn() ? "" : " (NOT LOGGED IN)"; | |
| 4630 | 4634 | |
| 4631 | − QString connectionStatus = nodeList->getDomainHandler().isConnected() ? "" : " (NOT CONNECTED) "; | |
| 4632 | − QString username = DependencyManager::get<AccountManager>()->getAccountInfo().getUsername(); | |
| 4635 | + QString connectionStatus = nodeList->getDomainHandler().isConnected() ? "" : " (NOT CONNECTED)"; | |
| 4636 | + QString username = accountManager->getAccountInfo().getUsername(); | |
| 4633 | 4637 | QString currentPlaceName = DependencyManager::get<AddressManager>()->getHost(); |
| 4634 | 4638 | |
| 4635 | 4639 | if (currentPlaceName.isEmpty()) { |
| @@ -4637,7 +4641,7 @@ void Application::updateWindowTitle() const { · 1 unmodified line | ||
| 4637 | 4641 | } |
| 4638 | 4642 | |
| 4639 | 4643 | QString title = QString() + (!username.isEmpty() ? username + " @ " : QString()) |
| 4640 | − + currentPlaceName + connectionStatus + buildVersion; | |
| 4644 | + + currentPlaceName + connectionStatus + loginStatus + buildVersion; | |
| 4641 | 4645 | |
| 4642 | 4646 | #ifndef WIN32 |
| 4643 | 4647 | // crashes with vs2013/win32 |