Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
f5c6a657
Commit
f5c6a657
authored
Aug 14, 2022
by
Julius Künzel
💬
Browse files
Fix QLocal::decimalPoint() returns QString in Qt6
parent
a2ecf104
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/assets/model/assetparametermodel.cpp
View file @
f5c6a657
...
...
@@ -37,15 +37,20 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
m_isAudio
=
assetXml
.
attribute
(
QStringLiteral
(
"type"
))
==
QLatin1String
(
"audio"
);
bool
needsLocaleConversion
=
false
;
Q
Char
separator
;
Q
Char
oldSeparator
;
Q
String
separator
;
Q
String
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
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment