X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdocumentvalidator.cpp;h=dea1e96794c49da2e27e727f5c7d178588d517c6;hb=a9284e6be36283932764a23efd8e5df6cc9f99c8;hp=a0775b5c68636589f152f2a0b594e8300c8a6463;hpb=472606c9ae0785902dd1c431f68f2a57515734bc;p=kdenlive diff --git a/src/documentvalidator.cpp b/src/documentvalidator.cpp index a0775b5c..dea1e967 100644 --- a/src/documentvalidator.cpp +++ b/src/documentvalidator.cpp @@ -112,7 +112,13 @@ bool DocumentValidator::validate(const double currentVersion) QLocale tempLocale = QLocale(mlt.attribute("LC_NUMERIC")); version = tempLocale.toDouble(kdenliveDoc.attribute("version"), &ok); if (!ok) version = kdenliveDoc.attribute("version").toDouble(&ok); - if (!ok) kDebug()<<"// CANNOT PARSE VERSION NUMBER, ERROR!"; + if (!ok) { + // Last try: replace comma with a dot + QString versionString = kdenliveDoc.attribute("version"); + if (versionString.contains(',')) versionString.replace(',', '.'); + version = versionString.toDouble(&ok); + if (!ok) kDebug()<<"// CANNOT PARSE VERSION NUMBER, ERROR!"; + } } // Upgrade the document to the latest version