mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-28 03:11:47 +00:00
Merge branch 'main' into feature/filament_id
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user