Fix opening project files with missing version number

CCBUG: 420494
parent 76b9492d
Pipeline #38326 canceled with stage
......@@ -126,6 +126,14 @@ QPair<bool, QString> DocumentValidator::validate(const double currentVersion)
}
}
}
if (qFuzzyIsNull(version)) {
// version missing, try with latest
KMessageBox::sorry(
QApplication::activeWindow(),
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());
......
Markdown is supported
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