From a1ef8de9fe8d41a858137fdc85ff29029ea01abe 2012-03-15 11:47:50 From: Jani Honkonen Date: 2012-03-15 11:47:50 Subject: [PATCH] We have so many stupid warnings that "treat warnings as errors" flag is needed... --- diff --git a/src/barchart/bar.cpp b/src/barchart/bar.cpp index 34fff83..a88cc84 100644 --- a/src/barchart/bar.cpp +++ b/src/barchart/bar.cpp @@ -7,11 +7,11 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE Bar::Bar(QString category, QGraphicsItem *parent) : QGraphicsObject(parent), - mCategory(category), mXpos(0), mYpos(0), mWidth(0), - mHeight(0) + mHeight(0), + mCategory(category) { setAcceptedMouseButtons(Qt::LeftButton|Qt::RightButton); setAcceptHoverEvents(true); diff --git a/src/barchart/barpresenterbase.cpp b/src/barchart/barpresenterbase.cpp index 467cace..8daf8b4 100644 --- a/src/barchart/barpresenterbase.cpp +++ b/src/barchart/barpresenterbase.cpp @@ -15,11 +15,11 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE BarPresenterBase::BarPresenterBase(QBarSeries *series, QChart *parent) : ChartItem(parent), + mHeight(0), + mWidth(0), mLayoutSet(false), mSeries(series), - mChart(parent), - mWidth(0), - mHeight(0) + mChart(parent) { connect(series,SIGNAL(showToolTip(QPoint,QString)),this,SLOT(showToolTip(QPoint,QString))); // connect(series,SIGNAL(enableSeparators(bool)),this,SLOT(enableSeparators(bool))); diff --git a/src/barchart/qbarseries.cpp b/src/barchart/qbarseries.cpp index 8c4551d..7fba083 100644 --- a/src/barchart/qbarseries.cpp +++ b/src/barchart/qbarseries.cpp @@ -39,8 +39,8 @@ QBarSeries::QBarSeries(QStringList categories, QObject *parent) { m_model = NULL; m_mapCategories = -1; - m_mapBarBottom - 1; - m_mapBarTop - 1; + m_mapBarBottom = -1; + m_mapBarTop = -1; } /*! diff --git a/src/chartdataset.cpp b/src/chartdataset.cpp index 27c0357..93c56d6 100644 --- a/src/chartdataset.cpp +++ b/src/chartdataset.cpp @@ -218,7 +218,7 @@ void ChartDataSet::calculateDomain(QSeries* series,Domain* domain) const } case QSeries::SeriesTypePie: { - QPieSeries *pieSeries = static_cast(series); + //QPieSeries *pieSeries = static_cast(series); // TODO: domain stuff break; } diff --git a/src/qchartglobal.h b/src/qchartglobal.h index 6997936..792b0e0 100644 --- a/src/qchartglobal.h +++ b/src/qchartglobal.h @@ -27,6 +27,7 @@ #include #include +/* static QDebug chartDebug(int numargs,...) { va_list valist; @@ -38,4 +39,5 @@ static QDebug chartDebug(int numargs,...) va_end(valist); return qDebug()<rowCount(); else // data is in a row, so return the number of items in single row - m_model->columnCount(); - else - // model is not specified, return the number of points in the series internal data store - return m_x.size(); + return m_model->columnCount(); + } + + // model is not specified, return the number of points in the series internal data store + return m_x.size(); } /*!