Commit f5c6a657 authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

Fix QLocal::decimalPoint() returns QString in Qt6

parent a2ecf104
......@@ -37,15 +37,20 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
m_isAudio = assetXml.attribute(QStringLiteral("type")) == QLatin1String("audio");
bool needsLocaleConversion = false;
QChar separator;
QChar oldSeparator;
QString separator;
QString oldSeparator;
// Check locale, default effects xml has no LC_NUMERIC defined and always uses the C locale
if (assetXml.hasAttribute(QStringLiteral("LC_NUMERIC"))) {
QLocale effectLocale = QLocale(assetXml.attribute(QStringLiteral("LC_NUMERIC"))); // Check if effect has a special locale → probably OK
if (QLocale::c().decimalPoint() != effectLocale.decimalPoint()) {
needsLocaleConversion = true;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
separator = QString(QLocale::c().decimalPoint());
oldSeparator = QString(effectLocale.decimalPoint());
#else
separator = QLocale::c().decimalPoint();
oldSeparator = effectLocale.decimalPoint();
#endif
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment