MCPcopy Create free account
hub / github.com/baldurk/renderdoc / updateConnectButton

Method updateConnectButton

qrenderdoc/Windows/Dialogs/RemoteManager.cpp:329–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329void RemoteManager::updateConnectButton()
330{
331 RDTreeWidgetItem *item = ui->hosts->selectedItem();
332
333 if(item)
334 {
335 ui->connect->setEnabled(true);
336 ui->connect->setText(tr("Connect to App"));
337
338 RemoteHost host = getRemoteHost(item);
339
340 if(host.IsValid())
341 {
342 if(host.IsLocalhost())
343 {
344 ui->connect->setText(tr("Run Server"));
345 ui->connect->setEnabled(false);
346 }
347 else if(host.IsServerRunning())
348 {
349 ui->connect->setText(tr("Shutdown"));
350
351 if(host.IsBusy() && !host.IsConnected())
352 ui->connect->setEnabled(false);
353 }
354 else
355 {
356 ui->connect->setText(tr("Run Server"));
357
358 if(host.RunCommand().isEmpty())
359 ui->connect->setEnabled(false);
360 }
361 }
362 }
363 else
364 {
365 ui->connect->setEnabled(false);
366 }
367}
368
369void RemoteManager::addNewHost()
370{

Callers

nothing calls this directly

Calls 9

selectedItemMethod · 0.80
trFunction · 0.50
setTextMethod · 0.45
IsValidMethod · 0.45
IsServerRunningMethod · 0.45
IsBusyMethod · 0.45
IsConnectedMethod · 0.45
isEmptyMethod · 0.45
RunCommandMethod · 0.45

Tested by

no test coverage detected