+ bool ok;
+ double version = documentLocale.toDouble(kdenliveDoc.attribute("version"), &ok);
+ if (!ok) {
+ // Could not parse version number, there is probably a conflict in decimal separator
+ QLocale tempLocale = QLocale(mlt.attribute("LC_NUMERIC"));
+ version = tempLocale.toDouble(kdenliveDoc.attribute("version"), &ok);
+ if (!ok) version = kdenliveDoc.attribute("version").toDouble(&ok);
+ 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!";
+ }
+ }
+