From be42f5df02e75777ee059844dd98a349315e6b02 2012-02-09 13:31:00 From: Michal Klocek Date: 2012-02-09 13:31:00 Subject: [PATCH] minor. compilation fix for test widget --- diff --git a/qmlplugin/declarativechart.cpp b/qmlplugin/declarativechart.cpp index 6151af8..bcd42d4 100644 --- a/qmlplugin/declarativechart.cpp +++ b/qmlplugin/declarativechart.cpp @@ -14,9 +14,7 @@ DeclarativeChart::DeclarativeChart(QDeclarativeItem *parent) DeclarativeChart::ChartTheme DeclarativeChart::theme() { if (m_chart) - return (ChartTheme) m_chart->theme(); - else - return ThemeInvalid; + return (ChartTheme) m_chart->chartTheme(); } void DeclarativeChart::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) diff --git a/qmlplugin/declarativechart.h b/qmlplugin/declarativechart.h index f2d0b1f..99678a8 100644 --- a/qmlplugin/declarativechart.h +++ b/qmlplugin/declarativechart.h @@ -17,7 +17,6 @@ class DeclarativeChart : public QDeclarativeItem public: enum ChartTheme { - ThemeInvalid = QChart::ChartThemeInvalid, ThemeDefault, ThemeVanilla, ThemeIcy, @@ -31,7 +30,7 @@ public: // From QDeclarativeItem/QGraphicsItem void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry); public: - void setTheme(ChartTheme theme) {m_chart->setTheme((QChart::ChartThemeId) theme);} + void setTheme(ChartTheme theme) {m_chart->setChartTheme((QChart::ChartTheme) theme);} ChartTheme theme(); public: diff --git a/test/chartwidgettest/mainwidget.cpp b/test/chartwidgettest/mainwidget.cpp index 390a8ce..d648eff 100644 --- a/test/chartwidgettest/mainwidget.cpp +++ b/test/chartwidgettest/mainwidget.cpp @@ -363,7 +363,7 @@ void MainWidget::yMaxChanged(int value) void MainWidget::changeChartTheme(int themeIndex) { qDebug() << "changeChartTheme: " << themeIndex; - m_chartWidget->setTheme((QChart::ChartThemeId) themeIndex); + m_chartWidget->setChartTheme((QChart::ChartTheme) themeIndex); } void MainWidget::setPieSizeFactor(double size)