The implicitly defined assignment operator for classes having custom
defined copy constructor is deprecated.
This patch adds explicit assignment operators.
XDataSeries assignment operator now deletes XDataPoints pointed by
datapoints array in the target and creates new ones for the source,
this required a change in the way XDataSeries is used in JSON parser,
which was based on default assignment operator semantics.
The vertical axis on the QA plots (pedal force, Newtons) was stuck at
600N, even if the ride data exceeded it. The code that calculated the
max force for the activity was apperently trying to throw out outliers
(defined as "more than 2500N" -- 562 lbf)... but when finding the "max
force" the value was seems to have accidentally been typed in as
"255". This created logically dead code:
maxAEPF = 600;
...
if (aepf < 255 && aepf > maxAEPF) maxAEPF = aepf;
Thus, the max is never updated.
This patch changes the filter value from 255 to 2500 (as is indicated
to be the intent elsewhere in the source file).
Functional changes from last snapshot:
b3df63378 Drag and Drop Images onto a ride
50c305b7f bluetooth FTMS fix to get device speed (#4440)
bd751988e Add Context help for Create/Edit User Metrics
809d72d00 MainWindow gets drag/drop from Overview
46545d6e7 Don't use Ctrl+C to check for new activities
07d1197c6 Update German Translation
There are also lot of changes related to QT6 refactor but,
in principle, they should not affect snapshot builds using Qt5.15
Previous changes from v3.6 release
ee39d19adf
[publish binaries]
* Qt6: Fixed a crash related to drag & drop
Qt6 changed the signature of the method mimeData in QTreeWidget and
QTableWidget from
Q...::mimeData(const QList<...>) const
to
Q...::mimeData(const QList<...>&) const
therefore ignoring local implementations and falling back to the
base-implementation with the default-serialization.
This PR supports both Qt5 and Qt6 by a selecting the matching signature
based on the Qt-version. Additionally the specifier override was
added to Q...::mimeData, Q...::mimeTypes and some drag&drop-related
event-handlers to prevent this kind of error for future versions.
* Fixed drag&drop for seasons
In Qt6, QList::count() returns q qsizetype instead of QT5s int,
therefore casting the number of seasons to int when serializing for
drag & drop
.. drag and dropping images into a ride will store them
in the media folder and add the filename to the "Images"
metadata tag which contains a list separated by newlines.
The metadata does not include the full path since we may
change the path in future releases
From int to qsizetype, and that brakes LTM charts serialization.
Since curves count is a small number and to preserve backward
compatibility, convert count result to int.
Since the empty Result has type number, adding an empty string
to the list is ignored by asString, adding number which is 0
in this case, fixes the issue.
Reported Marcen at the users forum.
The QDateTime constructor taking a QDate as argument is deprecated.
QDate::startOfDay() should be used instead when converting a QDate
to a QDateTime. This makes clear what time is used in this conversion.
In UserChart and DownloadRideDialog the deprecated signal QComboBox::currentIndexChanged(QString)
was connected to a slot without parameters. In Qt6 this created a warning.
Changed to signal QComboBox::currentIndexChanged(int)
In Qt6.4++, the templated constructor QVariant(T) is marked as =delete,
making compilation fail. By casting the return value to (const char*),
the right QVariant constructor is explicitly selected