| 218 | } |
| 219 | |
| 220 | QDateTime MacroScheduleEntry::NextTriggerTime() const |
| 221 | { |
| 222 | if (!lastTriggered.isValid()) { |
| 223 | return startDateTime; |
| 224 | } |
| 225 | if (!doesRepeat) { |
| 226 | // If the start was moved beyond the last trigger, treat as not yet fired. |
| 227 | if (startDateTime > lastTriggered) { |
| 228 | return startDateTime; |
| 229 | } |
| 230 | return QDateTime(); // one-shot already triggered |
| 231 | } |
| 232 | |
| 233 | QDateTime next = startDateTime; |
| 234 | while (next <= lastTriggered) { |
| 235 | QDateTime candidate = advanceFrom(next); |
| 236 | if (!candidate.isValid()) { |
| 237 | return QDateTime(); |
| 238 | } |
| 239 | next = candidate; |
| 240 | } |
| 241 | return next; |
| 242 | } |
| 243 | |
| 244 | bool MacroScheduleEntry::IsExpired() const |
| 245 | { |
no outgoing calls
no test coverage detected