Commit Graph

8 Commits

Author SHA1 Message Date
Joachim Kohlhammer
a00e27638f Dialog to build filter queries for similar activities (#4805)
* list all (non-zero) fields and metrics
* filter list by field / metric name
* select an operator per field (ignore, equals, contains, larger than, ...)
* available in the context menus of activity- and calendar view
2026-01-17 14:36:34 -03:00
Magnus Gille
addf1b55d3 Fix signalSafety unittest (#4773) [skip ci] 2025-12-28 12:18:26 -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
Joachim Kohlhammer
01ab7d1500 Additional line for entries in calendar day-view (#4709)
* Calendar Day-View now supports showing any field as tertiary line
  (good use: Notes)
* Additional fix: Rewriting metric name (secondary line); now
  BikeScore^TM is shown instead of BikeScore&8482;
2025-09-28 08:21:29 +02:00
Joachim Kohlhammer
f84f9a410e Added a day view to PlanningCalendarWindow (#4704)
* Reusing the existing configuration
* Linked from days in month view to the more detailed view
* Fixed color setting after construction
2025-09-15 22:08:35 -03:00
Joachim Kohlhammer
a5829c5c13 Semi automatic creation of ranges for power zones (#4543)
* Changed the UI of CPPage to inline-editing of all values in all tables
* Added a sports-specific selector for the model (cp2, cp3, ext, manual)
* Allowed to create new ranges either manually or based on the estimated
  values of the model
* Added option to reset each ranges values to those of the selected
  model
* Added message to create a new range if todays estimate differs from
  those of the currently active one
* Refined semi automatic power zones
* Added a dialog to inspect and accept only some values while adoption
* Added info messages
  * when the model does not provide FTP or PMAX
  * that AeTP is only a very rough estimate
* Added a tolerance in comparison before proposing new values
* Using the following order for defaults when adding a new manual range
  * selected row
  * last row
  * predefined defaults
* Zones-Tab: To prevent crashes, a message is shown instead of the real
  interface if a metric refresh is ongoing
* Changed Pace- and HR-Tabs to use inline editing
* Moved the unittests into the same structure as the sourcecode
* Added a simple (incomplete) unittest for kphToPace
* Improved setting the column width
* En-/Disabling the action buttons (add, delete, ...) based on the
  contents state
* Changed the layout to prevent jumping widgets when showing / hiding
  buttons
* Fixed compiler warnings from Visual-C++
* Adopt dialog: Refined layout
* Fixed the unit of "From BPM" on HR-Page
* Set the default mode to manual
Fixes #1381
2024-10-17 18:12:15 -03:00
Joachim Kohlhammer
9242f724db Implemented user defined relative date ranges (#4534)
Fixes #4512
* Added additional time range options for user defined seasons
  * Relative start (e.g. 3 months ago)
  * Duration after start / Duration before end (e.g. 2 months)
  * Year to Date end, defining the end as the closest day with todays
    day and month after start
* Refactored Season.h/cpp and SeasonParser.h/cpp for better testability
  * Kept Season, Phase, SeasonEvent, SeasonOffset, SeasonLength in
    Season.h/cpp
  * Moved all UI related classes to SeasonDialogs.h/cpp
  * Renamed SeasonParser.h/cpp to Seasons.h/cpp, moved class Seasons
    there
* Replaced deprecated Qt classes
  * Replaced QRegExp by QRegularExpression in SeasonParser
  * Rewrote parsing seasons.xml to use QXmlStreamReader instead of
    QXmlSimpleReader
* Unittesting
  * Added a simple way to implement and execute (make check) unittests
    in Golden Cheetahs source tree based on Qt Test
    (https://doc.qt.io/qt-6/qttest-index.html), tested on Linux and
    Windows
  * Implemented unittests for classes (mostly before refactoring)
    * Season
    * SeasonParser
    * SeasonOffset
2024-09-27 11:25:03 -03:00