]> git.sesse.net Git - kdenlive/commitdiff
Fix loading of older MLT files (force locale to C):
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 10 Sep 2011 12:43:28 +0000 (12:43 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 10 Sep 2011 12:43:28 +0000 (12:43 +0000)
http://kdenlive.org/mantis/view.php?id=2308

svn path=/trunk/kdenlive/; revision=5904

src/documentvalidator.cpp

index d3dcd78c1c9b06a5f7b1c971e630cc3539008e73..5f1b9bf83e99f5dca995b25b030766c50caa1338 100644 (file)
@@ -69,7 +69,10 @@ bool DocumentValidator::validate(const double currentVersion)
     }
     
     documentLocale.setNumberOptions(QLocale::OmitGroupSeparator);
-    if (documentLocale != QLocale()) {
+    if (documentLocale.decimalPoint() != QLocale().decimalPoint()) {
+        // If loading an older MLT file without LC_NUMERIC, set locale to C which was previously the default
+        if (!mlt.hasAttribute("LC_NUMERIC")) setlocale(LC_NUMERIC, "C");
+
         QLocale::setDefault(documentLocale);
         // locale conversion might need to be redone
         initEffects::parseEffectFiles();