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
Using gcc-13 makes the generated AppImage to require a newer libstdc++ version
than some currently supported distributions include by default.
This way we don't need Travis-ci generated Qt5 AppImages anymore
and we can deprecate Qt5 support.
[publish binaries]
* Improve the build speed by 2-3X by using PCH. This avoids rebuilding large parts of QT and C++ std headers over and over.
* Unfortunately QMake is too opinionated for this to work on macOS so it is used on Windows and Linux only.
* Remove qwindowsvistastyle.dll opengl32sw.dll from QT6 as they're not needed.
* Revert fa84a37 since we don't need it anymore.
* New chart: Agenda
* Removed the agenda from the calendar chart
* Reworked the agenda
* Separate panes for activities, phases, events
* Phases and events can be edited from this chart
* Showing descriptions of activities and events (optional)
* TimeUtils: New functions to convert days to weeks or months for user
friendly UIs
* EditPhaseDialog: Enforcing from-date < to-date
* Hack: Since ids of events are not filled, matching them by comparing
all available fields when selecting the instance to edit
Main changes from v3.7-sp1 release:
Enable Add Planned Activity from Activities menu
Enable Plan Activity from Calendar conxtext menu
Enable Agenda view of Calendar chart
[publish binaries]
Main changes from v3.7 release:
f21808d97 Calendar: Additionally respecting homefilters (#4733)
e9270b5d1 Calendar: Configurable colors for Phases and Events (#4732)
db2cc86b6 Bugfix (Calendar): Parallel activities ending after midnight (#4729)
84d7272f6 Calendar: Agenda View (#4727)
d12f14f4a Mini Calendar non analysis startup view fix (#4731)
81a4a2da2 Using MultiMetricSelector in FavouriteMetricsPage (#4728)
0b0f533a9 Don't translate Date to Data in Italian
99b6d5144 AppVeyor - Upgrade Windows builds to Qt 6.8.3
9f3b8bc10 Configurable initial startup view (#4718)
f63773f09 Fix formulas not working on Trends for additional athletes
78da12884 Stabilized ListEditDelegate (#4725)
c8da333ab Using to non-native filedialog on MacOS for DirectoryPathWidget (#4720)
0ce00abd5 Fix ride navigator asterisk column visible for additional athletes (#4722)
f9fd1840e New configuration-options for Calendar (#4716)
59dc7948c Switch perspective on Trends activity click thru
9a3ca625d Calendar: Week view (#4715)
20a0facd4 Trainmode: Show textcues in WorkoutPlotWindow (#4710)
45b366b68 WorkoutWizard - Fix copy/paste error
f7a2aede2 Trainmode: ZWO-Files Cooldown (#4711)
98959d8d1 Explicitly applying the palette to the measures-tabs (#4707)
a883b3fb0 Keep time when inserting / deleting restdays (#4708)
01ab7d150 Additional line for entries in calendar day-view (#4709)
d0d5105bd Athlete Measures on Calendar Day View (#4706)
36c98119d Fix Gaps - Don't fill stationary gaps shorter than tolerance
e75ab1077 Fix Gaps - Fill stationary gaps with zeroes
03b047369 Upgrade Linux builds on AppVeyor to Qt6
f49849b44 Rename AppImage generated by Travis-ci
3d7858b17 Manage Perspectives - display switch/filter expression (#4698)
f84f9a410 Added a day view to PlanningCalendarWindow (#4704)
1bad0c999 Avoid crashes dereferencing a NULL pointer
3fc373110 New button: Download default icons and mapping (#4703)
2653aa08e Running speed read from Footpod ANT+ device (#4701)
ed929366a If any of the active devices is a footpod, simulated speed
will not be used, as it is a treadmill (#4702)
4de3f4302 New "completervalues" filter function (#4694)
be5515633 Global config dialog to assign icons to Sport / SubSport (#4695)
a1ddf9b8e New dialog to repeat planned workouts (#4692)
4b6dd0cab Use long format for DOB
3ff01d36a Fix error in default user metric code
22fe08fde Use qDebug instead of qCritical the message is not an error
cdcd47e4c Added a confirmation dialog when deleting activities on the calendar (#4691)
490565541 Fix XData offset in ComparePane
7f584aa02 Upgrade FIT SDK to 21.171
b7429db20 Deprecate DiaryWindow
49cbe3db0 New monthly calendar (#4679)
a1008db76 Show workout for planned activity in TrainView (#4686)
81ba70ee3 Overview Bubble tile - fix missing points
d24afec85 Summary Fields - Include relevant metrics only
63e2496fd Metric override icon incorrectly displayed in Trends Overview (#4684)
6e9a1f930 Update Expected PMC (TriScore) as User Chart.
91b666709 LTM Charts - Fix perspective filter
be0592dd6 User Chart - Fix leyends and labels on Pie chart
8162d7de2 Improve support for CORE sensor (#4668)
d55c7ecd7 Refactor DataFilter completers
4d95f439b Train Elevation Chart - Avoid flooding debug log
2e2374761 Allow expanding Manage Named Filters dialog
21fe82f3c Exclude planned activities from Cloud Service upload list
9713b09e8 Recognize Mitja Zupanic
6cf470b2a Manual Activity Wizard - Fix Duration discarded
fb6a2cf81 Manual Activity Wizard - Use normalized sport
f0b9f75b7 Laps Editor - range and decimals depend on units
97eab8bc3 Add Expected PMC (Coggan) sample chart
c0e7b9193 Add Expected PMC (TriScore) sample chart
d4dd12cfb DataFilter - Add planned|expected to lts/sts/sb/rr
74e4dd116 Add isRun to DataFilter
605cbe028 Metrics Trends - Plot expected load on the past
72961b655 Add Planned to DataFilter
5e7fdca41 Highlight planned activities in navigator
b2e0cf875 Update Spanish translation (#4671)
38cf95e24 New gc-blank.png image (#4669)
64536a0ee DataFilter - Add planned|expected options to pmc
bd367e607 Add planned/expected PMC to R/Python APIs
9726e70e7 Add planned/expected PMC to Metrics Trends charts
56ff6ff73 Add planned workouts / activities (#4666)
b5fe5a32c Natural sort order for workouts in train mode (#4667)
80cbc11a0 Aerolab - Fix imperial units in eoffset label
30efd9fa7 Fix some typos in Xert integration
9c6d361da Single instance of SpecialFields (#4660)
e099e89d7 Reworked the dialog for manually creating activities (#4656)
55f95e594 Overview Metric Tile - support for metric overrides (#4649)
e5d4ab114 Fix Strava upload Train simulations as VirtualRide
6764546da Correct the format of the "Start Date" and "Start Time" in the
activities summary text field. (#4648)
83797126b Calculating expected load also based on past stress (#4651)
9c666ad55 Use the right Context for FreeSearch
047ab8079 Update German translation
ae6ebd9aa FitRideFile - Avoid duplicated XData series names
5c32910af Avoid crash on WPrime computation
f22c3796d Fix Workout Wizard window title and style
c1bb636db DiaryWindow::rideSelected - Ignore same activity
e10ad628f FitRideFile - Fix regression with native TCORE
969f8c22d Ensure Device Type Tile reflects change on edit (#4633)
7e3d0a435 Upgrade Qt to 6.5.3 for AppVeyor macOS builds
a97cc9aea Restore colored zones code to QWT curve
34db86d14 Update macOS plist to v3.7 Fixes#4631
[publish binaries]