]> git.sesse.net Git - kdenlive/blobdiff - src/kdenlivedoc.cpp
Allow to edit projects with a locale different to the one used by Kdenlive. This...
[kdenlive] / src / kdenlivedoc.cpp
index f453f70dc1ccaf4db089d323f8442fa6e4b195f2..86a73e612f0968f87f4c33e8636ff5467b8192a4 100644 (file)
@@ -52,7 +52,7 @@
 
 #include <mlt++/Mlt.h>
 
-const double DOCUMENTVERSION = 0.87;
+const double DOCUMENTVERSION = 0.88;
 
 KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, QString profileName, QMap <QString, QString> properties, const QPoint tracks, Render *render, KTextEdit *notes, bool *openBackup, MainWindow *parent, KProgressDialog *progressDialog) :
     QObject(parent),
@@ -95,6 +95,12 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
         m_documentProperties[i.key()] = i.value();
     }
 
+    if (QLocale() != QLocale::system()) {
+        QLocale::setDefault(QLocale::system());
+        // locale conversion might need to be redone
+        initEffects::parseEffectFiles();
+    }
+
     *openBackup = false;
     
     if (!url.isEmpty()) {
@@ -972,7 +978,6 @@ void KdenliveDoc::setUrl(KUrl url)
 
 void KdenliveDoc::setModified(bool mod)
 {
-    if (isReadOnly()) return;
     if (!m_url.isEmpty() && mod && KdenliveSettings::crashrecovery()) {
         m_autoSaveTimer->start(3000);
     }
@@ -1637,11 +1642,6 @@ void KdenliveDoc::backupLastSavedVersion(const QString &path)
     }    
 }
 
-bool KdenliveDoc::isReadOnly() const
-{
-    return m_documentProperties.contains("readonly");
-}
-
 void KdenliveDoc::cleanupBackupFiles()
 {
     KUrl backupFile = m_projectFolder;