| 133 | } |
| 134 | |
| 135 | void RemoteManager::setRemoteServerLive(RDTreeWidgetItem *node, bool live, bool busy) |
| 136 | { |
| 137 | RemoteHost host = getRemoteHost(node); |
| 138 | |
| 139 | if(!host.IsValid()) |
| 140 | return; |
| 141 | |
| 142 | if(host.IsLocalhost()) |
| 143 | { |
| 144 | node->setIcon(0, QIcon()); |
| 145 | node->setText(1, QString()); |
| 146 | } |
| 147 | else |
| 148 | { |
| 149 | QString text = live ? tr("Remote server running") : tr("No remote server"); |
| 150 | |
| 151 | if(host.IsConnected()) |
| 152 | { |
| 153 | text += tr(" (Active Context)"); |
| 154 | } |
| 155 | else if(host.IsVersionMismatch()) |
| 156 | { |
| 157 | QString message = host.VersionMismatchError(); |
| 158 | text += QFormatStr(" (%1)").arg(message); |
| 159 | } |
| 160 | else if(host.IsBusy()) |
| 161 | { |
| 162 | text += tr(" (Busy)"); |
| 163 | } |
| 164 | |
| 165 | node->setText(1, text); |
| 166 | |
| 167 | node->setIcon(0, live ? Icons::connect() : Icons::disconnect()); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | void RemoteManager::addHost(RemoteHost host) |
| 172 | { |
nothing calls this directly
no test coverage detected