MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / IsExpired

Method IsExpired

plugins/schedule/macro-schedule.cpp:244–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244bool MacroScheduleEntry::IsExpired() const
245{
246 if (!doesRepeat && lastTriggered.isValid()) {
247 return lastTriggered >= startDateTime;
248 }
249 switch (repeatEndType) {
250 case RepeatEndType::NEVER:
251 return false;
252 case RepeatEndType::AFTER_N_TIMES:
253 return timesTriggered >= repeatMaxCount;
254 case RepeatEndType::UNTIL_DATE:
255 return repeatUntilDate.isValid() &&
256 QDateTime::currentDateTime() > repeatUntilDate;
257 }
258 return false;
259}
260
261bool MacroScheduleEntry::ShouldTrigger(const QDateTime &now) const
262{

Callers 3

ColorForEntryFunction · 0.80
EntryToCalendarEventsFunction · 0.80
PopulateTableMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected