From e26d82d56bc95d0e2b06bf41813e885486a2ea6c Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 18 Sep 2014 14:50:03 +0300 Subject: Misc fixes - Default value for localizeNumbers is now false, as it would look weird if numbers were localized in otherwise unlocalized app. - Added locale property to qml ChartView. - Added registrations for latest revisions of all QML types for 2.0, since apparently this is necessary to make them visible when importing Charts 2.0 Change-Id: I46997b3af4458c6dbf6755a19e01115d5393013a Reviewed-by: Titta Heikkala --- src/axis/chartaxiselement.cpp | 2 +- src/chartpresenter.cpp | 2 +- src/qchart.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/axis/chartaxiselement.cpp b/src/axis/chartaxiselement.cpp index 310555e7..c006b166 100644 --- a/src/axis/chartaxiselement.cpp +++ b/src/axis/chartaxiselement.cpp @@ -29,7 +29,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE static const char *labelFormatMatchString = "%[\\-\\+#\\s\\d\\.lhjztL]*([dicuoxfegXFEG])"; -static const char *labelFormatMatchLocalizedString = "^([^%]*)%\\.?(\\d)*([defgiEG])(.*)$"; +static const char *labelFormatMatchLocalizedString = "^([^%]*)%\\.(\\d+)([defgiEG])(.*)$"; static QRegExp *labelFormatMatcher = 0; static QRegExp *labelFormatMatcherLocalized = 0; class StaticLabelFormatMatcherDeleter diff --git a/src/chartpresenter.cpp b/src/chartpresenter.cpp index 619f400f..e83a7fbc 100644 --- a/src/chartpresenter.cpp +++ b/src/chartpresenter.cpp @@ -45,7 +45,7 @@ ChartPresenter::ChartPresenter(QChart *chart, QChart::ChartType type) m_background(0), m_plotAreaBackground(0), m_title(0), - m_localizeNumbers(true) + m_localizeNumbers(false) { if (type == QChart::ChartTypeCartesian) m_layout = new CartesianChartLayout(this); diff --git a/src/qchart.cpp b/src/qchart.cpp index b103ed9b..16391b9a 100644 --- a/src/qchart.cpp +++ b/src/qchart.cpp @@ -150,7 +150,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE When \c{true}, all generated numbers appearing in various series and axis labels will be localized using the QLocale set with the locale property. When \c{false}, the "C" locale is always used. - Defaults to \c{true}. + Defaults to \c{false}. \note This property doesn't affect QDateTimeAxis labels, which always use the QLocale set with the locale property. -- cgit v1.2.3