fix: default impl

This commit is contained in:
Ian Chua
2026-08-12 14:02:04 +08:00
parent 44793f7a21
commit 108923bdaa
3 changed files with 9 additions and 3 deletions

View File

@@ -155,4 +155,4 @@ private:
void OnApplyDialog(wxCommandEvent &event); void OnApplyDialog(wxCommandEvent &event);
}; };
}} // namespace Slic3r::GUI }} // namespace Slic3r::GUI

View File

@@ -197,8 +197,12 @@ public:
*/ */
virtual std::string get_local_file_transfer_url(const FileTransferURLParams& params) { return ""; } virtual std::string get_local_file_transfer_url(const FileTransferURLParams& params) { return ""; }
virtual int get_file_transfer_url(std::string, std::function<void(FileTransferURLResult)>, FileTransferURLParams) virtual int get_file_transfer_url(std::string, std::function<void(FileTransferURLResult)> callback, FileTransferURLParams)
{ return ORCA_NETWORK_ERR_CMD_NOT_SUPPORTED; } {
if (callback)
callback({});
return ORCA_NETWORK_ERR_CMD_NOT_SUPPORTED;
}
/** /**
* Default LAN account username for this agent's protocol, if it has a fixed one. * Default LAN account username for this agent's protocol, if it has a fixed one.

View File

@@ -873,6 +873,8 @@ int NetworkAgent::get_file_transfer_url(std::string dev_id, std::function<void(F
{ {
if (m_printer_agent) if (m_printer_agent)
return m_printer_agent->get_file_transfer_url(std::move(dev_id), std::move(callback), std::move(params)); return m_printer_agent->get_file_transfer_url(std::move(dev_id), std::move(callback), std::move(params));
if (callback)
callback({});
return -1; return -1;
} }