WiiSave: Clean up constructors

Move the import/export operation into separate functions, as it doesn't
really make sense for the constructor to do *everything*, including
printing success/failure message boxes.

The existing constructor was split into two: one that takes a path,
and another taking a title ID. This makes it more obvious what is
actually done when a path/TID is passed and also clarifies what
parameters should be passed. (No more magic 0 or "" value.)
This commit is contained in:
Léo Lam committed 2018-05-13 17:42:55 +02:00
1 parent fbf36b85d2
commit 41c4486c65
6 files changed
+59 -54

No files matched your search

+1 -1
View File
@@ -260,7 +260,7 @@ void GameList::ExportWiiSave()
{
QMessageBox result_dialog(this);
const bool success = WiiSave::ExportWiiSave(GetSelectedGame()->GetTitleID());
const bool success = WiiSave::Export(GetSelectedGame()->GetTitleID());
result_dialog.setIcon(success ? QMessageBox::Information : QMessageBox::Critical);
result_dialog.setText(success ? tr("Successfully exported save files") :