##// END OF EJS Templates
We have so many stupid warnings that "treat warnings as errors" flag is needed...
Jani Honkonen -
r609:a1ef8de9fe8d
parent child
Show More
@@ -7,11 +7,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE
7
7
8 Bar::Bar(QString category, QGraphicsItem *parent)
8 Bar::Bar(QString category, QGraphicsItem *parent)
9 : QGraphicsObject(parent),
9 : QGraphicsObject(parent),
10 mCategory(category),
11 mXpos(0),
10 mXpos(0),
12 mYpos(0),
11 mYpos(0),
13 mWidth(0),
12 mWidth(0),
14 mHeight(0)
13 mHeight(0),
14 mCategory(category)
15 {
15 {
16 setAcceptedMouseButtons(Qt::LeftButton|Qt::RightButton);
16 setAcceptedMouseButtons(Qt::LeftButton|Qt::RightButton);
17 setAcceptHoverEvents(true);
17 setAcceptHoverEvents(true);
@@ -15,11 +15,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE
15
15
16 BarPresenterBase::BarPresenterBase(QBarSeries *series, QChart *parent) :
16 BarPresenterBase::BarPresenterBase(QBarSeries *series, QChart *parent) :
17 ChartItem(parent),
17 ChartItem(parent),
18 mHeight(0),
19 mWidth(0),
18 mLayoutSet(false),
20 mLayoutSet(false),
19 mSeries(series),
21 mSeries(series),
20 mChart(parent),
22 mChart(parent)
21 mWidth(0),
22 mHeight(0)
23 {
23 {
24 connect(series,SIGNAL(showToolTip(QPoint,QString)),this,SLOT(showToolTip(QPoint,QString)));
24 connect(series,SIGNAL(showToolTip(QPoint,QString)),this,SLOT(showToolTip(QPoint,QString)));
25 // connect(series,SIGNAL(enableSeparators(bool)),this,SLOT(enableSeparators(bool)));
25 // connect(series,SIGNAL(enableSeparators(bool)),this,SLOT(enableSeparators(bool)));
@@ -39,8 +39,8 QBarSeries::QBarSeries(QStringList categories, QObject *parent)
39 {
39 {
40 m_model = NULL;
40 m_model = NULL;
41 m_mapCategories = -1;
41 m_mapCategories = -1;
42 m_mapBarBottom - 1;
42 m_mapBarBottom = -1;
43 m_mapBarTop - 1;
43 m_mapBarTop = -1;
44 }
44 }
45
45
46 /*!
46 /*!
@@ -218,7 +218,7 void ChartDataSet::calculateDomain(QSeries* series,Domain* domain) const
218 }
218 }
219
219
220 case QSeries::SeriesTypePie: {
220 case QSeries::SeriesTypePie: {
221 QPieSeries *pieSeries = static_cast<QPieSeries *>(series);
221 //QPieSeries *pieSeries = static_cast<QPieSeries *>(series);
222 // TODO: domain stuff
222 // TODO: domain stuff
223 break;
223 break;
224 }
224 }
@@ -27,6 +27,7
27 #include <stdarg.h>
27 #include <stdarg.h>
28 #include <QDebug>
28 #include <QDebug>
29
29
30 /*
30 static QDebug chartDebug(int numargs,...)
31 static QDebug chartDebug(int numargs,...)
31 {
32 {
32 va_list valist;
33 va_list valist;
@@ -38,4 +39,5 static QDebug chartDebug(int numargs,...)
38 va_end(valist);
39 va_end(valist);
39 return qDebug()<<QString().append(function).append("(").append(file).append(":%1)").arg(line);
40 return qDebug()<<QString().append(function).append("(").append(file).append(":%1)").arg(line);
40 }
41 }
42 */
41 #endif
43 #endif
@@ -130,3 +130,5 win32:QMAKE_DISTCLEAN += /Q \
130 $$CHART_BUILD_HEADER_DIR \
130 $$CHART_BUILD_HEADER_DIR \
131 $$CHART_BUILD_LIB_DIR
131 $$CHART_BUILD_LIB_DIR
132
132
133 # treat warnings as errors
134 QMAKE_CXXFLAGS += -Werror
@@ -189,14 +189,15 int QXYSeries::count() const
189 {
189 {
190 Q_ASSERT(m_x.size() == m_y.size());
190 Q_ASSERT(m_x.size() == m_y.size());
191
191
192 if (m_model)
192 if (m_model) {
193 if (m_mapOrientation == Qt::Vertical)
193 if (m_mapOrientation == Qt::Vertical)
194 // data is in a column, so return the number of items in single column
194 // data is in a column, so return the number of items in single column
195 return m_model->rowCount();
195 return m_model->rowCount();
196 else
196 else
197 // data is in a row, so return the number of items in single row
197 // data is in a row, so return the number of items in single row
198 m_model->columnCount();
198 return m_model->columnCount();
199 else
199 }
200
200 // model is not specified, return the number of points in the series internal data store
201 // model is not specified, return the number of points in the series internal data store
201 return m_x.size();
202 return m_x.size();
202 }
203 }
General Comments 0
You need to be logged in to leave comments. Login now