Merge PR #500: Add debug prints to rule engine
This commit is contained in:
commit
3c8dd98400
@ -231,16 +231,20 @@ QList<Rule> RuleEngine::evaluateTime(const QDateTime &dateTime)
|
|||||||
|
|
||||||
QList<Rule> rules;
|
QList<Rule> rules;
|
||||||
|
|
||||||
|
qCDebug(dcRuleEngineDebug()) << "Evaluating time event" << dateTime.toString();
|
||||||
|
|
||||||
foreach (const Rule &r, m_rules.values()) {
|
foreach (const Rule &r, m_rules.values()) {
|
||||||
Rule rule = m_rules.value(r.id());
|
Rule rule = m_rules.value(r.id());
|
||||||
if (!rule.enabled()) {
|
if (!rule.enabled()) {
|
||||||
qCDebug(dcRuleEngineDebug()) << "Skipping rule" + rule.name() + "because it is disabled";
|
qCDebug(dcRuleEngineDebug()) << "Skipping rule" << rule.name() << "because it is disabled";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no timeDescriptor, do nothing
|
// If no timeDescriptor, do nothing
|
||||||
if (rule.timeDescriptor().isEmpty())
|
if (rule.timeDescriptor().isEmpty()) {
|
||||||
|
qCDebug(dcRuleEngineDebug()) << "Skipping rule" << rule.name() << "because it has not time descriptors";
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if this rule is based on calendarItems
|
// Check if this rule is based on calendarItems
|
||||||
if (!rule.timeDescriptor().calendarItems().isEmpty()) {
|
if (!rule.timeDescriptor().calendarItems().isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user