Skip to content

Commit

Permalink
Update database help message
Browse files Browse the repository at this point in the history
  • Loading branch information
xeruf committed Aug 3, 2020
1 parent 35ce387 commit 5c0471e
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/database/mixxxdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5c0471e

Please sign in to comment.