mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-06 16:49:09 +00:00
Fix more clang issues
It doesn't seem to like capturing structured bindings, even though they are tuple-like
This commit is contained in:
@@ -33,8 +33,8 @@ void ImportJob::run() {
|
|||||||
|
|
||||||
for (const auto& content : contents) {
|
for (const auto& content : contents) {
|
||||||
emit NextContent(size_imported, count + 1, content, eta);
|
emit NextContent(size_imported, count + 1, content, eta);
|
||||||
const auto callback = [this, total_size, size_imported, &eta,
|
const auto callback = [this, size_imported, &eta, &UpdateETA](std::size_t current_size,
|
||||||
&UpdateETA](std::size_t current_size, std::size_t /*total_size*/) {
|
std::size_t /*total_size*/) {
|
||||||
UpdateETA(size_imported + current_size);
|
UpdateETA(size_imported + current_size);
|
||||||
emit ProgressUpdated(size_imported + current_size, current_size, eta);
|
emit ProgressUpdated(size_imported + current_size, current_size, eta);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -632,7 +632,7 @@ void ImportDialog::StartDumpingCXI(const Core::ContentSpecifier& specifier) {
|
|||||||
});
|
});
|
||||||
connect(job, &ProgressiveJob::Completed, this,
|
connect(job, &ProgressiveJob::Completed, this,
|
||||||
[dialog] { dialog->setValue(dialog->maximum()); });
|
[dialog] { dialog->setValue(dialog->maximum()); });
|
||||||
connect(dialog, &QProgressDialog::canceled, this, [this, job] { job->Cancel(); });
|
connect(dialog, &QProgressDialog::canceled, this, [job] { job->Cancel(); });
|
||||||
|
|
||||||
job->start();
|
job->start();
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-15
@@ -164,10 +164,11 @@ void UtilitiesDialog::SDDecryptionTool() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: Add Progress reporting
|
// TODO: Add Progress reporting
|
||||||
ShowProgressDialog([sdmc_root, relative_source, destination] {
|
ShowProgressDialog(
|
||||||
Core::SDMCDecryptor decryptor(sdmc_root);
|
[sdmc_root = sdmc_root, relative_source = relative_source, destination = destination] {
|
||||||
return decryptor.DecryptAndWriteFile(relative_source, destination.toStdString());
|
Core::SDMCDecryptor decryptor(sdmc_root);
|
||||||
});
|
return decryptor.DecryptAndWriteFile(relative_source, destination.toStdString());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void UtilitiesDialog::SaveDataExtractionTool() {
|
void UtilitiesDialog::SaveDataExtractionTool() {
|
||||||
@@ -187,7 +188,8 @@ void UtilitiesDialog::SaveDataExtractionTool() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Add Progress reporting
|
// TODO: Add Progress reporting
|
||||||
ShowProgressDialog([sdmc_root, relative_source, source, destination] {
|
ShowProgressDialog([sdmc_root = sdmc_root, relative_source = relative_source,
|
||||||
|
source = source, destination = destination] {
|
||||||
const auto size = FileUtil::GetSize(source.toStdString());
|
const auto size = FileUtil::GetSize(source.toStdString());
|
||||||
std::vector<u8> data(size);
|
std::vector<u8> data(size);
|
||||||
Core::SDMCFile file(sdmc_root, relative_source, "rb");
|
Core::SDMCFile file(sdmc_root, relative_source, "rb");
|
||||||
@@ -214,7 +216,7 @@ void UtilitiesDialog::SaveDataExtractionTool() {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// TODO: Add Progress reporting
|
// TODO: Add Progress reporting
|
||||||
ShowProgressDialog([source, destination] {
|
ShowProgressDialog([source = source, destination = destination] {
|
||||||
const auto size = FileUtil::GetSize(source.toStdString());
|
const auto size = FileUtil::GetSize(source.toStdString());
|
||||||
std::vector<u8> data(size);
|
std::vector<u8> data(size);
|
||||||
FileUtil::IOFile file(source.toStdString(), "rb");
|
FileUtil::IOFile file(source.toStdString(), "rb");
|
||||||
@@ -256,15 +258,16 @@ void UtilitiesDialog::ExtdataExtractionTool() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: Add Progress reporting
|
// TODO: Add Progress reporting
|
||||||
ShowProgressDialog([sdmc_root, relative_source, destination] {
|
ShowProgressDialog(
|
||||||
Core::SDMCDecryptor decryptor(sdmc_root);
|
[sdmc_root = sdmc_root, relative_source = relative_source, destination = destination] {
|
||||||
Core::SDExtdata extdata(relative_source, decryptor);
|
Core::SDMCDecryptor decryptor(sdmc_root);
|
||||||
if (!extdata.IsGood()) {
|
Core::SDExtdata extdata(relative_source, decryptor);
|
||||||
return false;
|
if (!extdata.IsGood()) {
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return extdata.Extract(destination.toStdString());
|
return extdata.Extract(destination.toStdString());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void UtilitiesDialog::RomFSExtractionTool() {
|
void UtilitiesDialog::RomFSExtractionTool() {
|
||||||
@@ -273,7 +276,7 @@ void UtilitiesDialog::RomFSExtractionTool() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowProgressDialog([source, destination] {
|
ShowProgressDialog([source = source, destination = destination] {
|
||||||
const auto size = FileUtil::GetSize(source.toStdString());
|
const auto size = FileUtil::GetSize(source.toStdString());
|
||||||
std::vector<u8> data(size);
|
std::vector<u8> data(size);
|
||||||
FileUtil::IOFile src_file(source.toStdString(), "rb");
|
FileUtil::IOFile src_file(source.toStdString(), "rb");
|
||||||
|
|||||||
Reference in New Issue
Block a user