svn path=/trunk/kdenlive/; revision=5843
#include <QFile>
#include <QColor>
#include <QFile>
#include <QColor>
DocumentValidator::DocumentValidator(QDomDocument doc):
m_doc(doc),
DocumentValidator::DocumentValidator(QDomDocument doc):
m_doc(doc),
return false;
// Previous MLT / Kdenlive versions used C locale by default
return false;
// Previous MLT / Kdenlive versions used C locale by default
- QLocale documentLocale("C");
+ QLocale documentLocale = QLocale::c();
if (mlt.hasAttribute("LC_NUMERIC")) {
// Set locale for the document
if (mlt.hasAttribute("LC_NUMERIC")) {
// Set locale for the document
+ // WARNING: what should be done in case the locale does not exist on the system?
+ setlocale(LC_NUMERIC, mlt.attribute("LC_NUMERIC").toUtf8().constData());
documentLocale = QLocale(mlt.attribute("LC_NUMERIC"));
}
documentLocale = QLocale(mlt.attribute("LC_NUMERIC"));
}
+ documentLocale.setNumberOptions(QLocale::OmitGroupSeparator);
+
if (documentLocale != QLocale()) {
QLocale::setDefault(documentLocale);
// locale conversion might need to be redone
if (documentLocale != QLocale()) {
QLocale::setDefault(documentLocale);
// locale conversion might need to be redone
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) :
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) :
m_documentProperties[i.key()] = i.value();
}
m_documentProperties[i.key()] = i.value();
}
- if (QLocale() != QLocale::system()) {
+ QLocale locale = QLocale::system();
+ locale.setNumberOptions(QLocale::OmitGroupSeparator);
+ if (QLocale() != locale) {
+ setlocale(LC_NUMERIC, "");
QLocale::setDefault(QLocale::system());
// locale conversion might need to be redone
initEffects::parseEffectFiles();
QLocale::setDefault(QLocale::system());
// locale conversion might need to be redone
initEffects::parseEffectFiles();
new MainWindowAdaptor(this);
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.registerObject("/MainWindow", this);
new MainWindowAdaptor(this);
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.registerObject("/MainWindow", this);
- //setlocale(LC_NUMERIC, "POSIX");
if (!KdenliveSettings::colortheme().isEmpty()) slotChangePalette(NULL, KdenliveSettings::colortheme());
setFont(KGlobalSettings::toolBarFont());
parseProfiles(MltPath);
if (!KdenliveSettings::colortheme().isEmpty()) slotChangePalette(NULL, KdenliveSettings::colortheme());
setFont(KGlobalSettings::toolBarFont());
parseProfiles(MltPath);