diff --git a/src/app/ProjectOpeningContext.cpp b/src/app/ProjectOpeningContext.cpp index c6480318a..29f7711bb 100644 --- a/src/app/ProjectOpeningContext.cpp +++ b/src/app/ProjectOpeningContext.cpp @@ -21,7 +21,8 @@ ProjectOpeningContext::~ProjectOpeningContext() { void ProjectOpeningContext::proceed() { if (!m_reader.success()) { deleteLater(); - if (!m_reader.getVersion().isNull() && (m_reader.getVersion().toInt() != PROJECT_VERSION)) { + const int version = m_reader.getVersion().toInt(); + if (!m_reader.getVersion().isNull() && (version < 3 || version > PROJECT_VERSION)) { QMessageBox::warning(m_parent, tr("Error"), tr("The project file is not compatible with the current application version.")); return; diff --git a/src/core/ProjectReader.cpp b/src/core/ProjectReader.cpp index 5eeb30c77..b5e732804 100644 --- a/src/core/ProjectReader.cpp +++ b/src/core/ProjectReader.cpp @@ -22,7 +22,10 @@ ProjectReader::ProjectReader(const QDomDocument& doc, const QString& projectFile QDomElement projectEl(m_doc.documentElement()); m_version = projectEl.attribute("version"); - if (m_version.isNull() || (m_version.toInt() != PROJECT_VERSION)) { + // Version 3 projects (4lex4-era through v1.1.x) are readable as is: + // attributes added since then all have fallbacks in the readers. + const int version = m_version.toInt(); + if (m_version.isNull() || version < 3 || version > PROJECT_VERSION) { return; }