-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,38 +77,38 @@ bool MixxxDb::initDatabaseSchema( | |
QString upgradeToVersionFailed = | ||
tr("Unable to upgrade your database schema to version %1") | ||
.arg(QString::number(schemaVersion)); | ||
QString helpEmail = tr("For help with database issues contact:") + "\n" + | ||
"mixxx[email protected]"; | ||
QString helpContact = tr("For help with database issues consult:") + "\n" + | ||
"https://www.mixxx.org/support"; | ||
|
||
switch (SchemaManager(database).upgradeToSchemaVersion(schemaFile, schemaVersion)) { | ||
case SchemaManager::Result::CurrentVersion: | ||
case SchemaManager::Result::UpgradeSucceeded: | ||
case SchemaManager::Result::NewerVersionBackwardsCompatible: | ||
return true; // done | ||
case SchemaManager::Result::UpgradeFailed: | ||
QMessageBox::warning( | ||
0, upgradeFailed, | ||
QMessageBox::warning(0, | ||
upgradeFailed, | ||
upgradeToVersionFailed + "\n" + | ||
tr("Your mixxxdb.sqlite file may be corrupt.") + "\n" + | ||
tr("Try renaming it and restarting Mixxx.") + "\n" + | ||
helpEmail + "\n\n" + okToExit, | ||
tr("Your mixxxdb.sqlite file may be corrupt.") + | ||
"\n" + tr("Try renaming it and restarting Mixxx.") + | ||
"\n" + helpContact + "\n\n" + okToExit, | ||
QMessageBox::Ok); | ||
return false; // abort | ||
case SchemaManager::Result::NewerVersionIncompatible: | ||
QMessageBox::warning( | ||
0, upgradeFailed, | ||
QMessageBox::warning(0, | ||
upgradeFailed, | ||
upgradeToVersionFailed + "\n" + | ||
tr("Your mixxxdb.sqlite file was created by a newer " | ||
"version of Mixxx and is incompatible.") + | ||
"\n\n" + okToExit, | ||
tr("Your mixxxdb.sqlite file was created by a newer " | ||
"version of Mixxx and is incompatible.") + | ||
"\n\n" + okToExit, | ||
QMessageBox::Ok); | ||
return false; // abort | ||
case SchemaManager::Result::SchemaError: | ||
QMessageBox::warning( | ||
0, upgradeFailed, | ||
QMessageBox::warning(0, | ||
upgradeFailed, | ||
upgradeToVersionFailed + "\n" + | ||
tr("The database schema file is invalid.") + "\n" + | ||
helpEmail + "\n\n" + okToExit, | ||
tr("The database schema file is invalid.") + "\n" + | ||
helpContact + "\n\n" + okToExit, | ||
QMessageBox::Ok); | ||
return false; // abort | ||
} | ||
|