diff --git a/src/kdefrontend/LabPlot.cpp b/src/kdefrontend/LabPlot.cpp index 484f367be6fef3eb5d24e26657624b558bfddc02..fd4e32ce356db4391e28469ca5a57e4a2c4e33b8 100644 --- a/src/kdefrontend/LabPlot.cpp +++ b/src/kdefrontend/LabPlot.cpp @@ -61,27 +61,28 @@ const QString getSystemInfo() { #else const QString buildType(i18n("Debug build")); #endif - const QLocale locale; - const QString localeInfo{QLatin1String(" (") - + i18n("Decimal point: ") + '\'' + QString(locale.decimalPoint()) + SET_NUMBER_LOCALE + const QString numberLocaleInfo{ ' ' + + i18n("Decimal point ") + '\'' + QString(numberLocale.decimalPoint()) + QLatin1String("\', ") - + i18n("Group separator: ") + '\'' + QString(locale.groupSeparator()) + + i18n("Group separator ") + '\'' + QString(numberLocale.groupSeparator()) + QLatin1String("\', ") - + i18n("Exponential: ") + '\'' + QString(locale.exponential()) + + i18n("Exponential ") + '\'' + QString(numberLocale.exponential()) + QLatin1String("\', ") - + i18n("Zero digit: ") + '\'' + QString(locale.zeroDigit()) + + i18n("Zero digit: ") + '\'' + QString(numberLocale.zeroDigit()) + QLatin1String("\', ") - + i18n("Percent: ") + '\'' + QString(locale.percent()) + + i18n("Percent: ") + '\'' + QString(numberLocale.percent()) + QLatin1String("\', ") - + i18n("Positive/Negative sign: ") + '\'' + QString(locale.positiveSign()) + '\'' - + '/' + '\'' + QString(locale.negativeSign()) - + QLatin1String("\')")}; + + i18n("Positive/Negative sign: ") + '\'' + QString(numberLocale.positiveSign()) + '\'' + + '/' + '\'' + QString(numberLocale.negativeSign()) }; + QLocale locale; return buildType + '\n' + QString("%1, %2").arg(__DATE__).arg(__TIME__) + '\n' + i18n("System: ") + QSysInfo::prettyProductName() + '\n' + i18n("Locale: ") + QLocale::languageToString(locale.language()) + ',' - + QLocale::countryToString(locale.country()) + localeInfo + '\n' + + QLocale::countryToString(locale.country()) + '\n' + + i18n("Number settings:") + numberLocaleInfo + '\n' + i18n("Architecture: ") + QSysInfo::buildAbi() + '\n' + i18n("Kernel: ") + QSysInfo::kernelType() + ' ' + QSysInfo::kernelVersion() + '\n' + i18n("C++ Compiler: ") + QString(CXX_COMPILER) + '\n' diff --git a/src/kdefrontend/SettingsGeneralPage.cpp b/src/kdefrontend/SettingsGeneralPage.cpp index bf53c32ce8564c38d8862ce50b4837f87ccd0a8f..61eb15b7c67209754cff6be60951955f36fb3ce5 100644 --- a/src/kdefrontend/SettingsGeneralPage.cpp +++ b/src/kdefrontend/SettingsGeneralPage.cpp @@ -58,7 +58,11 @@ SettingsGeneralPage::SettingsGeneralPage(QWidget* parent) : SettingsPage(parent) } SettingsGeneralPage::DecimalSeparator SettingsGeneralPage::decimalSeparator(QLocale locale) { + DEBUG("SettingsGeneralPage::decimalSeparator()") + DEBUG(" LOCALE: " << STDSTRING(locale.name())) + DEBUG(" LOCALE LANG: " << locale.language()) QChar decimalPoint{locale.decimalPoint()}; + DEBUG(" SEPARATING CHAR: " << STDSTRING(QString(decimalPoint)) ) if (decimalPoint == QChar('.')) return DecimalSeparator::Dot; else if (decimalPoint == QChar(',')) @@ -69,6 +73,10 @@ SettingsGeneralPage::DecimalSeparator SettingsGeneralPage::decimalSeparator(QLoc QLocale::Language SettingsGeneralPage::decimalSeparatorLocale() const { int currentIndex = ui.cbDecimalSeparator->currentIndex(); + DEBUG(" SYSTEM LOCALE: " << STDSTRING(QLocale().name())) + DEBUG(" SYSTEM LOCALE LANG: " << QLocale().language()) + DEBUG(" CURRENT SEPARATING CHAR: " << STDSTRING(QString(QLocale().decimalPoint())) ) + DEBUG(" GERMAN SEPARATING CHAR: " << STDSTRING(QString(QLocale(QLocale::Language::German).decimalPoint())) ) if (currentIndex == static_cast(decimalSeparator())) // system decimal separator selected return QLocale().language();