summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2016-09-05 10:58:50 (GMT)
committerDavid Faure <faure@kde.org>2016-09-05 10:58:50 (GMT)
commit9f86e56335df43fd11fc1249002715640dd51517 (patch)
tree83ce836e1369d89e4ae50e38e7f5dd4a88ce77a8
parent9555d6a56435cedc9fd9eb727c7fceab69ed5d03 (diff)
Fix compilation with gcc6, the code was comparing a char* and a QChar.
-rw-r--r--src/core.cpp2
-rw-r--r--src/doc/documentvalidator.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core.cpp b/src/core.cpp
index 40311e7..c2d2fcc 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -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
diff --git a/src/doc/documentvalidator.cpp b/src/doc/documentvalidator.cpp
index 2122cba..595f76f 100644
--- a/src/doc/documentvalidator.cpp
+++ b/src/doc/documentvalidator.cpp
@@ -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