Unify and (hopefully) simplify generation of savepoint names

This shouldn't change anything for the user.
This commit is contained in:
Martin Kleusberg
2017-01-31 19:35:35 +01:00
parent 665837ff25
commit c68303478a
3 changed files with 14 additions and 13 deletions

View File

@@ -207,7 +207,7 @@ void ImportCsvDialog::accept()
// Create a savepoint, so we can rollback in case of any errors during importing
// db needs to be saved or an error will occur
QString restorepointName = QString("CSVIMPORT_%1").arg(QDateTime::currentMSecsSinceEpoch());
QString restorepointName = pdb->generateSavepointName("csvimport");
if(!pdb->setSavepoint(restorepointName))
return rollback(this, pdb, progress, restorepointName, 0, tr("Creating restore point failed: %1").arg(pdb->lastError()));