Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Farid Abdelnour
kdenlive
Commits
1e1c236c
Commit
1e1c236c
authored
May 14, 2012
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In case of locale bug (system locale != Qt locale), force C locale
parent
9e12078c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/mainwindow.cpp
src/mainwindow.cpp
+5
-3
No files found.
src/mainwindow.cpp
View file @
1e1c236c
...
...
@@ -170,9 +170,11 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
char
*
separator
=
localeconv
()
->
decimal_point
;
if
(
separator
!=
systemLocale
.
decimalPoint
())
{
kDebug
()
<<
"------
\n
!!! system locale is not similar to Qt's locale... be prepared for bugs!!!
\n
------"
;
// HACK: There is a locale conflict, so set locale to at least have correct decimal point
if
(
strncmp
(
separator
,
"."
,
1
)
==
0
)
systemLocale
=
QLocale
::
c
();
else
if
(
strncmp
(
separator
,
","
,
1
)
==
0
)
systemLocale
=
QLocale
(
"fr_FR.UTF-8"
);
// HACK: There is a locale conflict, so set locale to C
// Make sure to override exported values or it won't work
setenv
(
"LANG"
,
"C"
,
1
);
setlocale
(
LC_NUMERIC
,
"C"
);
systemLocale
=
QLocale
::
c
();
}
systemLocale
.
setNumberOptions
(
QLocale
::
OmitGroupSeparator
);
...
...
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