| 471 | } |
| 472 | |
| 473 | bool PersistantConfig::Load(const rdcstr &filename) |
| 474 | { |
| 475 | bool ret = Deserialize(filename); |
| 476 | |
| 477 | RDDialog::DefaultBrowsePath = LastFileBrowsePath; |
| 478 | |
| 479 | // localhost should always be available as a remote host |
| 480 | { |
| 481 | QMutexLocker autolock(&RemoteHostLock); |
| 482 | |
| 483 | bool foundLocalhost = false; |
| 484 | |
| 485 | rdcarray<RemoteHost> hosts; |
| 486 | hosts.swap(RemoteHostList); |
| 487 | |
| 488 | for(RemoteHost host : hosts) |
| 489 | { |
| 490 | // skip invalid hosts |
| 491 | if(!host.IsValid()) |
| 492 | continue; |
| 493 | |
| 494 | // backwards compatibility - skip old adb hosts that were adb: |
| 495 | if(host.Hostname().find("adb:") >= 0 && host.Protocol() == NULL) |
| 496 | continue; |
| 497 | |
| 498 | RemoteHostList.push_back(host); |
| 499 | |
| 500 | if(host.IsLocalhost()) |
| 501 | foundLocalhost = true; |
| 502 | } |
| 503 | |
| 504 | if(!foundLocalhost) |
| 505 | { |
| 506 | RemoteHost host; |
| 507 | host.m_hostname = "localhost"; |
| 508 | RemoteHostList.insert(0, host); |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | bool tools[arraydim<KnownShaderTool>()] = {}; |
| 513 | |
| 514 | // see which known tools are registered |
| 515 | for(const ShaderProcessingTool &dis : ShaderProcessors) |
| 516 | { |
| 517 | // if it's declared |
| 518 | if(dis.tool != KnownShaderTool::Unknown && dis.tool < KnownShaderTool::Count) |
| 519 | tools[(size_t)dis.tool] = true; |
| 520 | } |
| 521 | |
| 522 | for(KnownShaderTool tool : values<KnownShaderTool>()) |
| 523 | { |
| 524 | if(tool == KnownShaderTool::Unknown || tools[(size_t)tool]) |
| 525 | continue; |
| 526 | |
| 527 | rdcstr exe = ToolExecutable(tool); |
| 528 | |
| 529 | if(exe.isEmpty()) |
| 530 | continue; |
nothing calls this directly
no test coverage detected