Commit Graph

23 Commits

Author SHA1 Message Date
Magnus Gille
addf1b55d3 Fix signalSafety unittest (#4773) [skip ci] 2025-12-28 12:18:26 -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
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
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
Joachim Kohlhammer
77df5b372c Train View: Improved the selection of workouts (#4400)
Added support to
* filter workouts by multiple metrics
* rate and tag workouts
* view detailed information about the selected workout
* Preserving user-content in trainDB on rescan for workouts
Fixes #411
2024-05-20 13:57:58 -03:00
Mark Liversedge
6c0c56ab5b Ignore Qt Creator build directories
.. keeps git status clean.

[skip ci]
2021-10-06 11:01:04 +01:00
Mark Liversedge
09e2ac95da Use doxygen to generate code documentation
.. run make in src/doc/doxygen to generate documentation for the
   source code in html and latex format.

.. doing this to get some basic docs going, since the codebase is
   now so large its getting difficult for even the core team to
   remember.

.. the subdirectories generated are ignored (see .gitignore)

[skip ci]
2021-10-05 09:58:56 +01:00
Joern
68b42549e8 Ignore MSVC2017 build artifacts 2019-02-10 16:18:51 +01:00
Ale Martinez
1cc8f15dba Add deploy.sh script to generate Linux AppImage
To be run after starndard Linux build
2018-04-19 12:30:49 -03:00
Mark Liversedge
caaf674ad1 Complying with DMCA takedown for WASP Packet Protocol 2017-09-26 16:48:33 +01:00
Mark Liversedge
abe25b0f66 .gitignore .user files
[skip ci]
2016-03-26 11:02:41 +00:00
Aart Goossens
0d00625e54 Added .swp to .gitignore
.swp files are swap files for VIM
2016-03-20 19:41:29 +01:00
Brian Bergstrand
d6daa1480d Add qmake Xcode generator side car patterns to ignore file 2016-01-07 21:18:50 -06:00
Magnus Gille
979972b56a Improved gitignore, ignore patch leftovers and emacs temporaries. 2015-12-31 17:17:05 -05:00
Mark Liversedge
095f9529d9 Fix kqoauth tracked files
.. remove them from git when we shouldn't track them
.. no need for multiple .gitignore files
2015-12-03 13:30:05 +00:00
Mark Liversedge
a5fa5fe17f Add qmake's '.qmake.stash' to .gitignore 2015-06-11 16:10:00 +01:00
Alejandro Martinez
ec11bb4005 Ignored /release to keep git quiet on windows 2014-12-02 13:52:51 -03:00
Jon Beverley
17a17b0c70 Ignore src/debug/ folder 2014-09-11 15:20:55 +01:00
Jon Beverley
d081aa78e6 Ignore 2014-08-15 09:04:14 +01:00
Mark Liversedge
36616fc801 Add *.pri to .gitgnore 2014-04-24 14:46:31 +01:00
Mark Liversedge
a876c8da62 QT5 -- Part 3 of 3
Fixup crashes and major issues created by porting
to QT5. These have included;

* Fix CP plot log scale
* AllPlot axes and tooltip
* DBAccess prepare/bind bug
* LTMSettings crash
* LTMWindow zoomer/picker crash
* LTMPlot axes hack

There are still issues remaining but we can start
working through them at leisure -- the product now
builds and runs.
2013-12-09 21:21:51 +00:00
Sean Rhea
612a860bfd use local version of qwt
Add top-level build.pro, gitignore top-level Makefile, point src.pro at our
own qwt dir, and adjust gcconfig.pri.in accordingly.
2009-09-20 11:13:11 -07:00
Robert Carlsen
dd14b28a7d Adding .gitignore files. Feel free to tweak them for your environment 2009-06-23 12:20:56 -04:00