Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-126653

Weird implementation in QBarSet

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8
    • 6.7.2
    • Graphs: 2D
    • None
    • All
    • c2ea3b5f6 (dev), 08853c1db (6.8)

    Description

      Looking at the code of qbarset.cpp I am surprised by the following items:

       

      • QBarSet::QBarSet(const QString label, QObject *parent)

      It should read "const QString &label" I guess

      • void QBarSet::setLabel(const QString label)

      It should read "const QString &label" I guess

      • void QBarSet::append(const qreal value)

      "qreal value" should be enough

      • QBarSet &QBarSet::operator << (const qreal &value)

      "qreal value" should be enough

      • void QBarSet::insert(const int index, const qreal value)

      "int index" and "qreal value" should be enough

      • void QBarSet::remove(const int index, const int count)

      "int index" and "int count" should be enough

      • void QBarSet::replace(const int index, const qreal value)

      "int index" and "qreal value" should be enough

      • qreal QBarSet::at(const int index) const

      "int index" should be enough

      • qreal QBarSet::operator [](const int index) const{}

      "int index" should be enough

      • void QBarSet::setColor(QColor color)

      Is "const QColor& color" better, here?

      • void QBarSet::setBorderColor(QColor color)

      Is "const QColor& color" better, here?

      • void QBarSet::setLabelColor(QColor color)

      Is "const QColor& color" better, here?

      The previous remarks are also valid for QBarSetPrivate.

      In addition, the documentation of QBarSet mention two methods "setValues(QVariantList values)" and "QVariantList values()", that do not exist.

      Maybe all my remark should not be taken into account because I did not study the QtCharts code deeply but probably some of them are relevant.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kagro Kaj Grönholm
            delaune Olivier Delaune
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes