Merge branch 'main' into feature/filament_id

This commit is contained in:
SoftFever
2026-09-03 12:16:38 +08:00
122 changed files with 5361 additions and 1415 deletions
+2 -2
View File
@@ -323,7 +323,7 @@ bool C3DPrinterOS::login(wxString& msg) const
msg.clear();
std::string token = get_api_auth_token(msg);
if (token.empty()) {
msg = _L("Error. Can't get api token for authorization");
msg = _L("Error. Can't get API token for authorization");
return false;
}
@@ -627,7 +627,7 @@ void C3DPrinterOS::send_form(
responseTree.put("result", false);
responseTree.put("message", error);
})
.on_complete([&, this](std::string body, unsigned) {
.on_complete([&](std::string body, unsigned) {
std::stringstream ss(body);
try {
pt::read_json(ss, responseTree);
+2 -2
View File
@@ -80,7 +80,7 @@ bool Moonraker::test(wxString &msg) const
res = false;
msg = format_error(body, error, status);
})
.on_complete([&, this](std::string body, unsigned) {
.on_complete([&](std::string body, unsigned) {
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: /server/info body: %2%") % name % body;
try {
std::stringstream ss(body);
@@ -141,7 +141,7 @@ bool Moonraker::get_storage(wxArrayString &storage_path, wxArrayString &storage_
% name % error % status % body;
}
})
.on_complete([&, this](std::string body, unsigned) {
.on_complete([&](std::string body, unsigned) {
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: /server/files/roots body: %2%") % name % body;
try {
std::stringstream ss(body);
+1 -1
View File
@@ -86,7 +86,7 @@ bool Obico::test(wxString& msg) const
res = false;
msg = format_error(body, error, status);
})
.on_complete([&, this](std::string body, unsigned) {
.on_complete([&](std::string body, unsigned) {
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: Got version: %2%") % name % body;
})
#ifdef WIN32
+1 -1
View File
@@ -513,7 +513,7 @@ void PresetUpdater::priv::sync_resources(std::string http_url, std::map<std::str
cancel_http = true;
}
})
.on_complete([this, &resource_list, resources](std::string body, unsigned) {
.on_complete([&resource_list, resources](std::string body, unsigned) {
try {
BOOST_LOG_TRIVIAL(info) << "[Orca Updater]: request_resources, body=" << body;
+1 -1
View File
@@ -73,7 +73,7 @@ bool Repetier::test(wxString &msg) const
res = false;
msg = format_error(body, error, status);
})
.on_complete([&, this](std::string body, unsigned) {
.on_complete([&](std::string body, unsigned) {
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: Got version: %2%") % name % body;
try {
+3 -3
View File
@@ -192,7 +192,7 @@ bool SimplyPrint::do_api_call(std::function<Http(bool)>
bool res = true;
const auto create_request = [this, &build_request, &res, &on_complete](const std::string& access_token, bool is_retry) {
const auto create_request = [&build_request, &res, &on_complete](const std::string& access_token, bool is_retry) {
auto http = build_request(is_retry);
set_auth(http, access_token);
http.header("User-Agent", "SimplyPrint Orca Plugin")
@@ -300,7 +300,7 @@ bool SimplyPrint::do_temp_upload(const boost::filesystem::path& file_path,
return http;
},
[&error_fn, &filename, this](std::string body, unsigned status) {
[&error_fn, &filename](std::string body, unsigned status) {
BOOST_LOG_TRIVIAL(info) << boost::format("SimplyPrint: File uploaded: HTTP %1%: %2%") % status % body;
// Get file UUID
@@ -423,7 +423,7 @@ bool SimplyPrint::do_chunk_upload(const boost::filesystem::path& file_path, cons
return http;
},
[&error_fn, i, chunk_amount, this, &chunk_id, &delete_token](std::string body, unsigned status) {
[&error_fn, i, chunk_amount, &chunk_id, &delete_token](std::string body, unsigned status) {
BOOST_LOG_TRIVIAL(info) << boost::format("SimplyPrint: File chunk [%1%/%2%] uploaded: HTTP %3%: %4%") % (i + 1) % chunk_amount % status % body;
if (i == 0) {
// First chunk, parse chunk id