From 336216ba9a7e07aad972708c862c1e7306f1c67d Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Tue, 20 Mar 2018 01:29:31 -0500 Subject: Various save game improvements related to script extender files * Improve handling of SE save transfers and deletes with main save * Add indicator in save popup dialog if SE save file is present --- src/transfersavesdialog.cpp | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'src/transfersavesdialog.cpp') diff --git a/src/transfersavesdialog.cpp b/src/transfersavesdialog.cpp index b8dda056..61dab6e5 100644 --- a/src/transfersavesdialog.cpp +++ b/src/transfersavesdialog.cpp @@ -74,6 +74,11 @@ public: return { m_File }; } + virtual bool hasScriptExtenderFile() const override + { + return false; + } + private: QString m_File; }; @@ -95,6 +100,11 @@ public: { return nullptr; } + + virtual bool hasScriptExtenderSave(QString const &file) const override + { + return false; + } }; } //end anonymous namespace @@ -334,26 +344,6 @@ bool TransferSavesDialog::transferCharacters( sourceFile.absoluteFilePath().toUtf8().constData(), destinationFile.toUtf8().constData()); } - - QFileInfo sourceFileSE(sourceFile.absolutePath() + "/" + sourceFile.completeBaseName() + "." + m_GamePlugin->savegameSEExtension()); - if (sourceFileSE.exists()) { - QString destinationFileSE(destination.absoluteFilePath(sourceFileSE.fileName())); - - //If the file is already there, let them skip (or not). - if (QFile::exists(destinationFileSE)) { - if (!testOverwrite(overwriteMode, destinationFileSE)) { - continue; - } - //OK, they want to remove it. - QFile::remove(destinationFileSE); - } - - if (!method(sourceFileSE.absoluteFilePath(), destinationFileSE)) { - qCritical(errmsg, - sourceFileSE.absoluteFilePath().toUtf8().constData(), - destinationFileSE.toUtf8().constData()); - } - } } } return true; -- cgit v1.3.1