Commit 3f49140a authored by Volker Krause's avatar Volker Krause
Browse files

Explicitly list relevant lunar phase events

BUG: 454801
parent 51d71ab6
Pipeline #184825 passed with stage
in 1 minute and 37 seconds
......@@ -41,7 +41,8 @@ void AstronomicalEventsPlugin::loadEventsForDateRange(const QDate &startDate, co
for (QDate date = startDate; date <= endDate && date.isValid(); date = date.addDays(1)) {
if (m_lunarPhaseShown) {
const auto phase = KHolidays::LunarPhase::phaseAtDate(date);
if (phase != KHolidays::LunarPhase::None) {
if (phase == KHolidays::LunarPhase::NewMoon || phase == KHolidays::LunarPhase::FirstQuarter || phase == KHolidays::LunarPhase::LastQuarter
|| phase == KHolidays::LunarPhase::FullMoon) {
CalendarEvents::EventData lunarPhaseData;
lunarPhaseData.setIsAllDay(true);
lunarPhaseData.setTitle(KHolidays::LunarPhase::phaseName(phase));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment