mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
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
15 lines
298 B
Prolog
15 lines
298 B
Prolog
TEMPLATE = subdirs
|
|
|
|
exists(unittests.pri) {
|
|
include(unittests.pri)
|
|
}
|
|
|
|
equals(GC_UNITTESTS, active) {
|
|
SUBDIRS += seasonOffset \
|
|
season \
|
|
seasonParser
|
|
CONFIG += ordered
|
|
} else {
|
|
message("Unittests are disabled; to enable copy unittests/unittests.pri.in to unittests/unittests.pri")
|
|
}
|