diff --git a/src/lib/app/profileupdater.cpp b/src/lib/app/profileupdater.cpp
index 70ba7febb..7d81abc75 100644
--- a/src/lib/app/profileupdater.cpp
+++ b/src/lib/app/profileupdater.cpp
@@ -99,7 +99,7 @@ void ProfileUpdater::updateProfile(const QString ¤t, const QString &profil
return;
}
- std::cout << "QupZilla: Incompatible profile version detected, overwriting profile data..." << std::endl;
+ std::cout << "QupZilla: Incompatible profile version detected (" << qPrintable(prof.versionString()) << "), overwriting profile data..." << std::endl;
copyDataToProfile();
}
@@ -112,11 +112,10 @@ void ProfileUpdater::copyDataToProfile()
QFile browseData(m_profilePath + "browsedata.db");
if (browseData.exists()) {
const QString browseDataBackup = QzTools::ensureUniqueFilename(m_profilePath + "browsedata-backup.db");
- const QString settingsBackup = QzTools::ensureUniqueFilename(m_profilePath + "settings-backup.ini");
browseData.copy(browseDataBackup);
- QFile(m_profilePath + "settings.ini").copy(settingsBackup);
+
const QString text = "Incompatible profile version has been detected. To avoid losing your profile data, they were "
- "backed up in following directories:
" + browseDataBackup + "
" + settingsBackup + "
";
+ "backed up in following file:
" + browseDataBackup + "
";
QMessageBox::warning(0, "QupZilla: Incompatible profile version", text);
}
diff --git a/src/lib/other/updater.cpp b/src/lib/other/updater.cpp
index 9037dbd95..00a1b8188 100644
--- a/src/lib/other/updater.cpp
+++ b/src/lib/other/updater.cpp
@@ -106,6 +106,11 @@ bool Updater::Version::operator <=(const Updater::Version &other) const
return *this < other;
}
+QString Updater::Version::versionString() const
+{
+ return QString("%1.%2.%3").arg(majorVersion, minorVersion, revisionNumber);
+}
+
Updater::Updater(QupZilla* mainClass, QObject* parent)
: QObject(parent)
, p_QupZilla(mainClass)
diff --git a/src/lib/other/updater.h b/src/lib/other/updater.h
index 0c0894682..c29de6599 100644
--- a/src/lib/other/updater.h
+++ b/src/lib/other/updater.h
@@ -48,6 +48,8 @@ public:
bool operator==(const Version &other) const;
bool operator>=(const Version &other) const;
bool operator<=(const Version &other) const;
+
+ QString versionString() const;
};
private slots: