| 85 | |
| 86 | |
| 87 | void DebugServerSettingsDialog::apply() |
| 88 | { |
| 89 | std::string host = m_addressEntry->text().toStdString(); |
| 90 | m_controller->SetRemoteHost(host); |
| 91 | Ref<Metadata> data = new Metadata(host); |
| 92 | m_controller->GetData()->StoreMetadata("debugger.remote_host", data); |
| 93 | |
| 94 | std::string portString = m_portEntry->text().toStdString(); |
| 95 | uint64_t port; |
| 96 | try |
| 97 | { |
| 98 | port = stoull(portString); |
| 99 | } |
| 100 | catch (const std::exception&) |
| 101 | { |
| 102 | port = 31337; |
| 103 | } |
| 104 | |
| 105 | m_controller->SetRemotePort(port); |
| 106 | data = new Metadata(port); |
| 107 | m_controller->GetData()->StoreMetadata("debugger.remote_port", data); |
| 108 | |
| 109 | const auto platform = m_platformEntry->currentText().toStdString(); |
| 110 | if (!platform.empty()) |
| 111 | { |
| 112 | data = new Metadata(platform); |
| 113 | m_controller->SetAdapterProperty("current_platform", data); |
| 114 | m_controller->GetData()->StoreMetadata("debugger.platform", data); |
| 115 | } |
| 116 | |
| 117 | accept(); |
| 118 | } |
nothing calls this directly
no test coverage detected