MCPcopy Create free account
hub / github.com/Vector35/debugger / apply

Method apply

ui/debugserversetting.cpp:87–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85
86
87void 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}

Callers

nothing calls this directly

Calls 4

SetRemoteHostMethod · 0.45
GetDataMethod · 0.45
SetRemotePortMethod · 0.45
SetAdapterPropertyMethod · 0.45

Tested by

no test coverage detected