Skip to content
GitLab
Menu
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
143bf169
Commit
143bf169
authored
Aug 03, 2020
by
Jean-Baptiste Mardelle
Browse files
Attempt to fix UI translations broken.
CCBUG: 424967
parent
997a9abd
Pipeline
#29565
passed with stage
in 28 minutes and 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/lib/localeHandling.cpp
View file @
143bf169
...
...
@@ -23,10 +23,10 @@ auto LocaleHandling::setLocale(const QString &lcName) -> QString
#ifdef Q_OS_FREEBSD
auto
*
result
=
setlocale
(
LC_ALL
,
locale
.
toStdString
().
c_str
());
#else
auto
*
result
=
std
::
setlocale
(
LC_
ALL
,
locale
.
toStdString
().
c_str
());
auto
*
result
=
std
::
setlocale
(
LC_
NUMERIC
,
locale
.
toStdString
().
c_str
());
#endif
if
(
result
!=
nullptr
)
{
::
qputenv
(
"LC_
ALL
"
,
locale
.
toStdString
().
c_str
());
::
qputenv
(
"LC_
NUMERIC
"
,
locale
.
toStdString
().
c_str
());
newLocale
=
locale
;
break
;
}
...
...
@@ -40,12 +40,12 @@ auto LocaleHandling::setLocale(const QString &lcName) -> QString
void
LocaleHandling
::
resetLocale
()
{
#ifdef Q_OS_FREEBSD
setlocale
(
LC_
ALL
,
"C"
);
setlocale
(
LC_
NUMERIC
,
"C"
);
#else
std
::
setlocale
(
LC_
ALL
,
"C"
);
std
::
setlocale
(
LC_
NUMERIC
,
"C"
);
#endif
::
qputenv
(
"LC_
ALL
"
,
"C"
);
qDebug
()
<<
"LC_
ALL
reset to C"
;
::
qputenv
(
"LC_
NUMERIC
"
,
"C"
);
qDebug
()
<<
"LC_
NUMERIC
reset to C"
;
}
QPair
<
QLocale
,
LocaleHandling
::
MatchType
>
LocaleHandling
::
getQLocaleForDecimalPoint
(
const
QString
&
requestedLocale
,
const
QString
&
decimalPoint
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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