Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1065,8 +1065,20 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 1064 unmodified lines | |||
| 1065 | } | 1065 | } |
| 1066 | 1066 | ||
| 1067 | void Application::domainConnectionRefused(const QString& reasonMessage, int reasonCode) { | 1067 | void Application::domainConnectionRefused(const QString& reasonMessage, int reasonCode) { |
| 1068 | if (static_cast<DomainHandler::ConnectionRefusedReason>(reasonCode) == DomainHandler::ConnectionRefusedReason::ProtocolMismatch) { | 1068 | switch (static_cast<DomainHandler::ConnectionRefusedReason>(reasonCode)) { |
| 1069 | notifyPacketVersionMismatch(); | 1069 | case DomainHandler::ConnectionRefusedReason::ProtocolMismatch: |
| 1070 | notifyPacketVersionMismatch(); | ||
| 1071 | break; | ||
| 1072 | case DomainHandler::ConnectionRefusedReason::TooManyUsers: | ||
| 1073 | case DomainHandler::ConnectionRefusedReason::Unknown: { | ||
| 1074 | QString message = "Unable to connect to the location you are visiting.\n"; | ||
| 1075 | message += reasonMessage; | ||
| 1076 | OffscreenUi::warning("", message); | ||
| 1077 | break; | ||
| 1078 | } | ||
| 1079 | default: | ||
| 1080 | // nothing to do. | ||
| 1081 | break; | ||
| 1070 | } | 1082 | } |
| 1071 | } | 1083 | } |
| 1072 | 1084 | ||