void ProfileManager::update130() { std::cout << "QupZilla: Upgrading profile version from 1.3.0..." << std::endl; connectDatabase(); QSqlQuery query; query.exec("ALTER TABLE bookmarks ADD COLUMN keyword TEXT"); update140(); }
void ProfileManager::updateProfile(const QString ¤t, const QString &profile) { if (current == profile) { return; } Updater::Version prof(profile); if (prof == Updater::Version("1.0.0")) { update100(); return; } if (prof == Updater::Version("1.1.0") || prof == Updater::Version("1.1.5") || prof == Updater::Version("1.1.8")) { update118(); return; } if (prof == Updater::Version("1.2.0")) { update120(); return; } if (prof == Updater::Version("1.3.0") || prof == Updater::Version("1.3.1")) { update130(); return; } if (prof >= Updater::Version("1.4.0") && prof <= Updater::Version("1.5.0")) { update140(); return; } if (prof >= Updater::Version("1.6.0") && prof < Updater::Version("1.8.0")) { update160(); return; } if (prof >= Updater::Version("1.8.0") && prof < Updater::Version("1.9.0")) { // do nothing return; } std::cout << "QupZilla: Incompatible profile version detected (" << qPrintable(profile) << "), overwriting profile data..." << std::endl; copyDataToProfile(); }