Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix version check on preferences upgrade #2232

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions src/preferences/upgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,14 @@ UserSettingsPointer Upgrade::versionUpgrade(const QString& settingsPath) {
configVersion = "1.8.0";
config->set(ConfigKey("[Config]","Version"), ConfigValue("1.8.0"));
}

if (configVersion.startsWith("1.8.0~beta1") ||
else if (configVersion.startsWith("1.8.0~beta1") ||
configVersion.startsWith("1.8.0~beta2")) {
qDebug() << "Upgrading from v1.8.0~beta...";
// Upgrade tasks go here
configVersion = "1.8.0";
config->set(ConfigKey("[Config]","Version"), ConfigValue("1.8.0"));
}
if (configVersion.startsWith("1.8") || configVersion.startsWith("1.9.0beta1")) {
else if (configVersion.startsWith("1.8") || configVersion.startsWith("1.9.0beta1")) {
qDebug() << "Upgrading from" << configVersion << "...";
// Upgrade tasks go here
#ifdef __APPLE__
Expand Down Expand Up @@ -309,7 +308,7 @@ UserSettingsPointer Upgrade::versionUpgrade(const QString& settingsPath) {
configVersion = "1.9.0";
config->set(ConfigKey("[Config]","Version"), ConfigValue("1.9.0"));
}
if (configVersion.startsWith("1.9") || configVersion.startsWith("1.10")) {
else if (configVersion.startsWith("1.9") || configVersion.startsWith("1.10")) {
qDebug() << "Upgrading from v1.9.x/1.10.x...";

bool successful = true;
Expand Down Expand Up @@ -355,8 +354,7 @@ UserSettingsPointer Upgrade::versionUpgrade(const QString& settingsPath) {
qDebug() << "Upgrade Failed";
}
}

if (configVersion.startsWith("1.11")) {
else if (configVersion.startsWith("1.11")) {
qDebug() << "Upgrading from v1.11.x...";
bool successful = false;
{
Expand Down Expand Up @@ -412,11 +410,8 @@ UserSettingsPointer Upgrade::versionUpgrade(const QString& settingsPath) {
qDebug() << "Upgrade failed!\n";
}
}

if (configVersion.startsWith("1.12") ||
configVersion.startsWith("2.0") ||
configVersion.startsWith("2.1.0")) {
// No special upgrade required, just update the value.
else {
// Version seems to be never or equal v"1.12" so, no special upgrade required, just update the value.
configVersion = MIXXX_VERSION;
config->set(ConfigKey("[Config]","Version"), ConfigValue(MIXXX_VERSION));
}
Expand Down