All values of category get read from holiday file
Categories were not correct read from the holiday file. When more than one category was defined for one holiday, the first category was written the category list as often as how many categories were there.
One index in holidayparserplan.cpp was corrected. Now all categories are in the output
before:
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() This regionCode = "calendar_systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Is valid? = true
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Country code = "CALENDAR"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Language code = "systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Name = "Multiple Calendar Systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Description = "A test file for multiple calendar systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems()
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Parsing region = "calendar_systems" year = 2020 calendar = "gregorian"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-01-01" Duration = 1 Name = "New Years Day00" category = ("public", "public", "public", "public", "public")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-01-01" Duration = 1 Name = "New Years Day01 seasonal" category = ("seasonal", "seasonal")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-03-20" Duration = 1 Name = "März-Tagundnachtgleiche" category = ("seasonal")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-04-21" Duration = 1 Name = "Bangla New Year" category = ("public", "public")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-06-20" Duration = 1 Name = "Sommersonnenwende" category = ("seasonal")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-09-22" Duration = 1 Name = "September-Tagundnachtgleiche" category = ("seasonal")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-12-21" Duration = 1 Name = "Wintersonnenwende" category = ("seasonal")
After:
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() This regionCode = "calendar_systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Is valid? = true
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Country code = "CALENDAR"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Language code = "systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Name = "Multiple Calendar Systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Description = "A test file for multiple calendar systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems()
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Parsing region = "calendar_systems" year = 2020 calendar = "gregorian"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-01-01" Duration = 1 Name = "New Years Day00" category = ("public", "religious", "seasonal", "cultural", "civil")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-01-01" Duration = 1 Name = "New Years Day01 seasonal" category = ("seasonal", "public")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-03-20" Duration = 1 Name = "März-Tagundnachtgleiche" category = ("seasonal")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-04-21" Duration = 1 Name = "Bangla New Year" category = ("public", "cultural")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-06-20" Duration = 1 Name = "Sommersonnenwende" category = ("seasonal")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-09-22" Duration = 1 Name = "September-Tagundnachtgleiche" category = ("seasonal")
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-12-21" Duration = 1 Name = "Wintersonnenwende" category = ("seasonal")
Edited by Alois Spitzbart