Commit Graph

11209 Commits

Author SHA1 Message Date
Poncho
a45bb2503c linux/51-garmin-usb.rules: use mode 0660 and tag uaccess (#4775) [skip ci]
Use a more modern approach for device access.

The uaccess tag makes udev apply a dynamic user ACL to the device node, which
makes the device usable to logged-in users.

See https://wiki.archlinux.org/title/Udev#Allowing_regular_users_to_use_devices
2025-12-26 20:19:01 -03:00
Paul Johnson
8a19c38b3a QSqlQuery copy constructor deprecated in Qt6.2 (#4771)
The QSqlQuery assignment and copy constructor are deprecated since Qt6.2, and will be removed in Qt7, see https://doc.qt.io/qt-6/qsqlquery-obsolete.html
2025-12-24 08:28:05 -03:00
Paul Johnson
4eaec533aa Remove type truncation warnings (#4770)
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'
2025-12-23 10:21:11 -03:00
Paul Johnson
1a0cd74c19 Remove Qt6 stateChanged deprecation warning (#4766)
From QT6.7.0 QCheckBox::stateChanged() is being replaced with QCheckBox::checkStateChanged(), and stateChanged() is deprecated in Qt6.9.0
2025-12-22 16:32:57 -03:00
Paul Johnson
7caa7582dd Remove Windows crash handler compile warning (#4765)
Warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead.
2025-12-22 13:37:36 -03:00
Paul Johnson
9cff593c68 Remove unused variables and parameter warnings (#4767)
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.
2025-12-22 09:59:31 -03:00
Alejandro Martinez
b0b65e4e1f Update minimum Qt version 6.6.1 recommended 6.8.3 2025-12-21 21:35:44 -03:00
Magnus Gille
03ca4fdbc3 Parallelize builds and upgrade build environments (#4749)
* Parallelize QWT builds
* Upgrade macOS Builds to Sonoma with Xcode 15.2 and Qt 6.6
* Upgrade Windows builds to Visual Studio 2022
2025-12-21 18:24:27 -03:00
Alejandro Martinez
be01a861b8 Fix crash when importing compressed zip files
The bug was introduced by #4751 when QScopedPointer was replaced
by std::unique_ptr but release() was not called to replace take().
2025-12-19 14:05:52 -03:00
Paul Johnson
78fb79cfe1 Correct initial view change for navigation model (#4735)
Change startupView flag from static to member variable in AthleteTab class
2025-12-18 18:34:40 -03:00
Paul Johnson
c67d913f11 Deprecate QT5 support (#4751)
* Remove Qt5 Compatibility
* Remove QT compiler directives < QT6.5.3, set QT6.5.3 as minimum GC version
* Remove references to QT5 Video
Fixes #4750
2025-12-18 10:37:55 -03:00
Magnus Gille
9bb90e3737 Fix crash safety issues: Unsafe signal connections and tree child access (#4761)
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.
2025-12-17 13:52:38 -03:00
Magnus Gille
2dc2d02e80 QFileDialog::getOpenFileName returns an empty string on cancel (#4762)
There's no need to throw a message box up
2025-12-17 08:33:44 -03:00
Joachim Kohlhammer
396a3535c0 Workout Infowidget: Showing real zone name (#4763)
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
2025-12-16 21:23:33 -03:00
Alejandro Martinez
e63f6ff6fc IconManager - Use normalized values for Sport
To match getFilepath using RideItem::sport,
which is the normalized Sport value.
2025-12-16 20:04:12 -03:00
Joachim Kohlhammer
a31a2795ac Add missing receiver parameter to lambda signal connections (#4759)
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]
2025-12-14 17:17:33 -03:00
Alejandro Martinez
4177327a8b Update snapshot builds
To test Plan view and Calendar/Agenda refinements.
[publish binaries]
2025-12-14 11:01:25 -03:00
Paul Johnson
bd3b0dfb0e Fix to prevent view pages being collapsed by the splitter (#4758) 2025-12-14 11:00:36 -03:00
Paul Johnson
3a75464182 Fix the LTM sidebar initial width for new athletes (#4757) 2025-12-14 10:59:42 -03:00
Joachim Kohlhammer
7117389fb2 Planning workout: Adding description to Notes (#4755)
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
2025-12-14 09:39:20 -03:00
Joachim Kohlhammer
2d0e2a9b7d Adapting visual refinements from agenda in calendar (#4754)
* 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
2025-12-14 09:37:37 -03:00
Joachim Kohlhammer
f17257885b Modify phases and events in calendar (#4753)
* 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
2025-12-14 09:36:52 -03:00
Paul Johnson
4488b6e4f4 Rebrand Diary View to Plan View (#4690)
It shares Trends sidebar minus the charts library.
Initially hosting Calendar, Agenda and Expected PMCs.
Let's see how it works and evolve.
2025-12-13 19:06:31 -03:00
Magnus Gille
0207eddaae Optimization of User Chart Hover Performance (#4748)
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
2025-12-13 15:43:45 -03:00
Alejandro Martinez
5060d09f15 Switch to gcc-11 for Linux builds on AppVeyor
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]
2025-12-13 12:28:35 -03:00
Alejandro Martinez
84b26c5977 Disable Travi-ci integration
[skip ci]
Currently we use it only to generate Qt5 AppImages for Linux
and we are about to deprecate Qt5 support.
2025-12-13 12:20:49 -03:00
Alejandro Martinez
ed79319105 Remove unused DLL from Windows Qt6 installer 2025-12-10 19:28:59 -03:00
Magnus Gille
bf20980dd1 Improve the build speed by 2-3X by using PCH (#4746)
* 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.
2025-12-10 15:38:29 -03:00
Magnus Gille
06ed87db09 #else constexpr doesn't do anything it's just a compiler warning (#4743) 2025-12-09 10:11:56 -03:00
Joachim Kohlhammer
bcf486cfc3 Moved the agenda to a dedicated chart (#4740)
* 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
2025-12-08 10:00:27 -03:00
Paul Johnson
79ce8735fe Fix for isolate axis hides labels when using bars #4705 (#4741)
The pen wasn't set for bar charts, and the hack relies upon the pen's color value to set the visibility of the labels.
Fixes #4705
2025-12-07 17:50:41 -03:00
Paul Johnson
6b7e7555df Fix calendar chart color issue (#4739) 2025-12-06 07:03:48 -03:00
Alejandro Martinez
7cdb14ca7a Enable debug for Segment matching at runtime
Using the command line paramter: --debug-rules gc.routes.debug=true
2025-12-02 12:33:21 -03:00
Alejandro Martinez
9e8ed1717a Fix invisible label on Interval Metadata selector
Reported at the users forum when using Dark themes.
Continuation of 1dd7faa
2025-11-30 09:54:43 -03:00
Alejandro Martinez
49c337d365 Update snapshot builds
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]
2025-11-28 20:46:22 -03:00
Alejandro Martinez
69093d5ff7 Revert "Made planned activities functionality optional"
This reverts commit da3743a66b.
It was a temporary fix to release v3.7.1
2025-11-27 19:56:03 -03:00
Alejandro Martinez
bd06fa96b1 Revert "Made the agenda view of Calendar optional"
This reverts commit 5d58b75fe1.
It was a temporary fix to release v3.7.1
2025-11-27 19:55:24 -03:00
Alejandro Martinez
9fbeb4e37c Trigger v3.7.1 release
[publish binaries]
v3.7-SP1
2025-11-19 20:45:37 -03:00
Joachim Kohlhammer
5d58b75fe1 Made the agenda view of Calendar optional 2025-11-19 20:18:41 -03:00
Joachim Kohlhammer
da3743a66b Made planned activities functionality optional 2025-11-19 20:18:41 -03:00
Joachim Kohlhammer
5e5f4af72f Renamed PlanningCalendar to Calendar (class and label) 2025-11-19 20:18:41 -03:00
Alejandro Martinez
b02f7bad7e Refactor Security Fix - disable ignoreSslErrors
Moved sslErrors to CloudService since CloudDB is an optional component
and c827d9f fails to compile when CloudDB is not included.
2025-11-19 19:52:38 -03:00
Alejandro Martinez
c827d9f273 Security Fix - disable ignoreSslErrors
[publish binaries]
2025-11-18 12:59:26 -03:00
Alejandro Martinez
a7200a31ff Update snapshot builds
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]
2025-11-15 16:22:39 -03:00
Joachim Kohlhammer
f21808d97c Calendar: Additionally respecting homefilters (#4733)
When collecting the activities for the planning calendar, only the
filter was used. Now the homefilter is considered as well.

See https://groups.google.com/g/golden-cheetah-developers/c/viSV80ze3r8/m/lbkJnG1jCAAJ
2025-11-14 12:38:54 -03:00
Joachim Kohlhammer
e9270b5d1a Calendar: Configurable colors for Phases and Events (#4732)
Repurposed unused GColor-ids:
CCALCELL -> CCALPHASE
CCALHEAD -> CCALEVENT
2025-11-10 15:33:20 -03:00
Joachim Kohlhammer
db2cc86b6d Bugfix (Calendar): Parallel activities ending after midnight (#4729)
When having two parallel activities ending after midnight, they were not
layouted correctly in day- and week view of the calendar.
This change fixes that, showing them side by side and not overlapping
any more.
2025-11-10 15:00:24 -03:00
Joachim Kohlhammer
84d7272f6d Calendar: Agenda View (#4727)
* Read-only view to show
  * missed planned activities (configurable number of days to look back)
  * todays planned activities, phases and events
  * upcoming planned activities, phases and events (configurable number
    of days to look ahead)
* Color of planned activities is now user configurable (coming from
  global color theme)
* Added a hint to show whether a filter is active (all calendar views)
* Configuration: Reorganized in tabs
* Refactoring: Created enums for all user roles used in the calendar
  (all views, all delegates) to improve readability; removed data that
  was only written but never read
2025-11-10 12:08:27 -03:00
Paul Johnson
d12f14f4a4 Mini Calendar non analysis startup view fix (#4731) 2025-11-10 09:11:38 -03:00
Joachim Kohlhammer
81a4a2da24 Using MultiMetricSelector in FavouriteMetricsPage (#4728)
As the same type of metrics selector was needed for the settings of the
PlanningCalendarView, a reusable widget MultiMetricSelector was created
in #4679, duplicating code from FavouriteMetricsPage.

This change elminates the duplication and uses the MultiMetricSelector
also in the global settings.

A user visible change for FavouriteMetricsPage is the new filter field
for available metrics.
2025-11-09 18:35:34 -03:00