From 466bdf19397addda4e263d8dd506061392f31ff1 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Fri, 12 Jan 2024 00:22:20 +0100 Subject: [PATCH] There are two overloads for QStringList and QVector (#3977) These are not required in Qt6, as QStringList is an QVector --- src/Charts/GenericChart.cpp | 3 +++ src/Charts/GenericChart.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/Charts/GenericChart.cpp b/src/Charts/GenericChart.cpp index 62b68dde5..d31704a76 100644 --- a/src/Charts/GenericChart.cpp +++ b/src/Charts/GenericChart.cpp @@ -151,6 +151,8 @@ GenericChart::addCurve(QString name, QVector xseries, QVector ys return true; } +#if QT_VERSION < 0x060000 +// In Qt 6, QStringList is a QVector, so we don't need an additional overload // helper for python - no aggregateby, no annotations bool GenericChart::addCurve(QString name, QVector xseries, QVector yseries, QStringList fseries, QString xname, QString yname, @@ -163,6 +165,7 @@ GenericChart::addCurve(QString name, QVector xseries, QVector ys opengl, legend, datalabels, fill, RideMetric::Average, QList()); return true; } +#endif // configure axis, after curves added bool diff --git a/src/Charts/GenericChart.h b/src/Charts/GenericChart.h index 6e731a993..4506f40bb 100644 --- a/src/Charts/GenericChart.h +++ b/src/Charts/GenericChart.h @@ -319,10 +319,14 @@ class GenericChart : public QWidget { int line, int symbol, int size, QString color, int opacity, bool opengl, bool legend, bool datalabels, bool fill, RideMetric::MetricType mtype, QListannotations); +#if QT_VERSION < 0x060000 + // In Qt 6, QStringList is a QVector, so we don't need an additional overload + // helper for Python and R charts fseries is a stringlist bool addCurve(QString name, QVector xseries, QVector yseries, QStringList fseries, QString xname, QString yname, QStringList labels, QStringList colors, int line, int symbol, int size, QString color, int opacity, bool opengl, bool legend, bool datalabels, bool fill); +#endif // configure axis, after curves added bool configureAxis(QString name, bool visible, int align, double min, double max,