Commit 9f86e563 authored by David Faure's avatar David Faure
Browse files

Fix compilation with gcc6, the code was comparing a char* and a QChar.

parent 9555d6a5
......@@ -135,7 +135,7 @@ void Core::initLocale()
setlocale(LC_NUMERIC_MASK, NULL);
#endif
char *separator = localeconv()->decimal_point;
if (separator != systemLocale.decimalPoint()) {
if (QString::fromUtf8(separator) != QChar(systemLocale.decimalPoint())) {
//qDebug()<<"------\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 C
// Make sure to override exported values or it won't work
......
......@@ -91,7 +91,7 @@ bool DocumentValidator::validate(const double currentVersion)
KMessageBox::sorry(QApplication::activeWindow(), i18n("The document was created in \"%1\" locale, which is not installed on your system. Please install that language pack. Until then, Kdenlive might not be able to correctly open the document.", mlt.attribute("LC_NUMERIC")));
}
if (separator != documentLocale.decimalPoint()) {
if (QString::fromUtf8(separator) != QString(documentLocale.decimalPoint())) {
KMessageBox::sorry(QApplication::activeWindow(), i18n("There is a locale conflict on your system. The document uses locale %1 which uses a \"%2\" as numeric separator (in system libraries) but Qt expects \"%3\". You might not be able to correctly open the project.", mlt.attribute("LC_NUMERIC"), separator, documentLocale.decimalPoint()));
//qDebug()<<"------\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
......
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