Commit e5287c0d authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix opening project files with missing version number

CCBUG: 420494
parent c8fe98b3
......@@ -126,6 +126,14 @@ QPair<bool, QString> DocumentValidator::validate(const double currentVersion)
if (qFuzzyIsNull(version)) {
// version missing, try with latest
i18n("Version of the project file cannot be read.\nAttempting to open nonetheless."),
i18n("Incorrect project file"));
version = currentVersion;
// Upgrade the document to the latest version
if (!upgrade(version, currentVersion)) {
return QPair<bool, QString>(false, QString());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment