mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-11 06:40:39 +00:00
patch_manager: improve import logging
imported_patch.yml has to be the latest version too
This commit is contained in:
parent
372eff2d8f
commit
c6190fa95d
@ -130,7 +130,7 @@ bool patch_engine::load(patch_map& patches_map, const std::string& path, bool im
|
|||||||
|
|
||||||
if (version != patch_engine_version)
|
if (version != patch_engine_version)
|
||||||
{
|
{
|
||||||
append_log_message(log_messages, fmt::format("Error: File version %s does not match patch engine target version %s", version, patch_engine_version));
|
append_log_message(log_messages, fmt::format("Error: File version %s does not match patch engine target version %s (file: %s)", version, patch_engine_version, path));
|
||||||
patch_log.error("File version %s does not match patch engine target version %s (file: %s)", version, patch_engine_version, path);
|
patch_log.error("File version %s does not match patch engine target version %s (file: %s)", version, patch_engine_version, path);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -140,8 +140,8 @@ bool patch_engine::load(patch_map& patches_map, const std::string& path, bool im
|
|||||||
}
|
}
|
||||||
else if (importing)
|
else if (importing)
|
||||||
{
|
{
|
||||||
append_log_message(log_messages, fmt::format("Error: No 'Version' entry found. Patch engine version = %s", patch_engine_version));
|
append_log_message(log_messages, fmt::format("Error: No 'Version' entry found. Patch engine version = %s (file: %s)", patch_engine_version, path));
|
||||||
patch_log.error("Patch engine version %s: No 'Version' entry found for file %s", patch_engine_version, path);
|
patch_log.error("No 'Version' entry found. Patch engine version = %s (file: %s)", patch_engine_version, path);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -560,7 +560,7 @@ void patch_manager_dialog::on_custom_context_menu_requested(const QPoint &pos)
|
|||||||
{
|
{
|
||||||
patch_log.error("Could not remove patch %s: %s from %s", info.hash, info.description, info.source_path);
|
patch_log.error("Could not remove patch %s: %s from %s", info.hash, info.description, info.source_path);
|
||||||
refresh(); // Refresh before showing the dialog
|
refresh(); // Refresh before showing the dialog
|
||||||
QMessageBox::warning(this, tr("Failure"), tr("The patch could not be removed!"));
|
QMessageBox::critical(this, tr("Failure"), tr("The patch could not be removed!"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -706,18 +706,18 @@ void patch_manager_dialog::dropEvent(QDropEvent* event)
|
|||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
QMessageBox::warning(this, tr("Nothing to import"), tr("None of the found %0 patches were imported.\n\nLog:\n\n%2")
|
QMessageBox::warning(this, tr("Nothing to import"), tr("None of the found %0 patches were imported.\n\nLog:\n%2")
|
||||||
.arg(total).arg(msg));
|
.arg(total).arg(msg));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QMessageBox::information(this, tr("Import successful"), tr("Imported %0/%1 patches to:\n%2\n\nLog:\n\n%3")
|
QMessageBox::information(this, tr("Import successful"), tr("Imported %0/%1 patches to:\n%2\n\nLog:\n%3")
|
||||||
.arg(count).arg(total).arg(QString::fromStdString(imported_patch_yml_path)).arg(msg));
|
.arg(count).arg(total).arg(QString::fromStdString(imported_patch_yml_path)).arg(msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QMessageBox::warning(this, tr("Import failed"), tr("The patch file was not imported.\n\nLog:\n\n").arg(QString::fromStdString(log_message.str())));
|
QMessageBox::critical(this, tr("Import failed"), tr("The patch file could not be imported.\n\nLog:\n%0").arg(QString::fromStdString(log_message.str())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -728,7 +728,7 @@ void patch_manager_dialog::dropEvent(QDropEvent* event)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
patch_log.error("Errors found in patch file %s", path);
|
patch_log.error("Errors found in patch file %s", path);
|
||||||
QMessageBox::warning(this, tr("Validation failed"), tr("Errors were found in the patch file.\n\nLog:\n\n%0").arg(QString::fromStdString(log_message.str())));
|
QMessageBox::critical(this, tr("Validation failed"), tr("Errors were found in the patch file.\n\nLog:\n%0").arg(QString::fromStdString(log_message.str())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user