Agenda used to display entries similar to the Calendar: Primary line for
a field, secondary line for one metric, tertiary line for a multi-line
field.
As the agenda has more space available per line, this change adds
support for multiple metrics in the secondary line. Defaults are
Duration and TriScore.
* Bidirectional linking of planned and completed activities via field "Linked Filename"
* Convenience functions in RideCache, taking care of updating all relations
* link activities
* unlink activities
* move activities
* copy planned activities
* batch copy planned activities
* shift planned activities
* Calendar
* Visual hints to show whether an activity is linked (bar on right side)
* Options to link, unlink, jump to linked activity
* Option to save an activity
* Visual hint indicating unsaved changes in an activity (italic font)
* Deleting activities clears the link
* Agenda: Hiding completed / linked activities
* Repeat Schedule: Clearing the link in copied entries
* RideImportWizard: Autolinking new activities if a planned counterpart exists
* Stricter consistency handling of linked activities
Additional:
* highlighting linked activities when clicking in calendar
* linked() datafilter access function (similar to filename())
* New dialog to link planned and completed activities
* Centralized the calendar context menus (only one location to maintain them for all views)
* Restructured the entries of all calendar context menus
They were introduced by #4779, which replaced setAxisX
which removes the previously existing default x-axis
for the new one, with addAxis which doesn't remove anything.
This change just remove the existing (default) x-axis before
to add the new one to minimize the impact in the remaining code.
src/Gui/CalendarItemDelegates.h:
ColumnDelegatingItemDelegate
- uses tr() so should call Q_OBJECT
CalendarDetailedDayDelegate
- uses tr() so should call Q_OBJECT
Moved Q_OBJECT to the top of the class for consistency and this also guarantees it's private (which it has to be).
src/Gui/ColorButton.h:
- Moved the comment from Colors.h here.
src/Gui/Colors.h:
- Removed #if 0 code that confused lupdate since it doesn't understand preprocessor macros.
To avoid ocassional errors due to race conditions,
since QWT is rebuilt only when appveyor.yml changes
the impact on performance is limited in normal cases.
Removed unused constructors
Replaced raw pointer with a unique_ptr to clearly pass ownership.
Fixed a bug where we compared if a signed integer is negative (it never is).
Fixed a case where we take the pointer to a pointer we de-reference!
warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
warning C4805: '!=': unsafe mix of type 'int' and type 'bool' in operation
warning C4305: 'argument': truncation from 'double' to 'float'
Remove the following types of build warnings:
warning C4189: local variable is initialized but not referenced
warning C4100: unreferenced parameter
warning C4101: unreferenced local variable
I have only commented out unused variables and used [[maybe_unused]] for unused parameters.
Systematically resolved 30 identified potential crash vectors and established automated regression testing to prevent strict reoccurrence.
Key Changes:
- Fixed 11 instances of unsafe `QObject::connect` calls (missing context object) in srd/Charts/AgendaWindow.cpp, FixSpikes.cpp, src/FileIO/FixSpikes.cpp, src/Gui/Agenda.cpp, src/Gui/BatchProcessingDialog.cpp, and src/Gui/IconManager.cpp. This prevents crashes caused by signals firing after the receiver has been destroyed.
- Fixed 19 instances of unsafe `QTreeWidgetItem` child access in src/Charts/LTMChartParser.cpp, src/Gui/ColorButton.cpp, src/Gui/AthletePages.cpp, and src/Gui/Pages.cpp by adding defensive `nullptr` checks before dereferencing.
- Added Python detection scripts util/check_unsafe_connects.py and util/check_unsafe_tree_child.py to statically analyze the codebase for these specific unsafe patterns.
- Integrated detection scripts into the regression test suite under `unittests/Core/signalSafety`, verifying the fixes and enforcing a strict zero-tolerance policy for future regressions.
- Added `testSplineCrash` to cover edge cases with empty spline lookups.
Display the zone names instead of a fixed Z# in the Workout Infowidget.
Since configChanged is emitted only when zones are added or modified -
but not when their names or descriptions are edited - changes to a
zone’s name or description requires selecting a different workout to
reflect the change
Fixes#4760
PR #4690 reveals a bug in the calendar:
* Go to plan view
* Add a calendar
* Reset the layout
* Switch date range -> crash
Root cause: Lambda-connections without a dedicated receiver don't get
automatically disconnected on destruction if the sender lives longer.
When resetting the layout, the old is destroyed but the connection is
still triggered -> crash
This PR adds receivers and additionally narrows down the captures
([=] -> [this, whatever I really need]
When planning a workout based on a ErgFile, the description is appended
to the Notes (never overwriting what was entered before, only
appending). This makes the description available e.g. in the agenda,
giving a quick insight of what is ahead
* Adapting visual refinements from agenda in calendar
* Removed colored background for seasons and events (instead coloring
the icons)
* Metric name shown in lighter font, removed brackets
* Added option (agenda and calendar) to remove the metric name
* Put settings of agenda in scrollarea to avoid squeezing
* Fixed clipping
* Phases and events can be created, edited, deleted in the calendar (all
views)
* LTMSidebar reacts to modified events
* Phase and Event dialogs show the associated season
* Menu entries are only active within the current season
In GenericSelectTool::moved, inside the XRANGE mode handling:
Remove pointsVector() call which copies all data.
Implement a binary search using count() and at()
methods of QXYSeries (base of QLineSeries).
This changes complexity from O(N) copy + O(log N) search to O(log N) search only (assuming at() is O(1)).
Fixes ##4442