fix some comments

This commit is contained in:
Michael Zanetti 2014-12-20 22:24:59 +01:00 committed by Michael Zanetti
parent 56ca42e1ca
commit dbe0b47035
4 changed files with 5 additions and 8 deletions

View File

@ -83,7 +83,7 @@ bool StateDescriptor::operator ==(const StateDescriptor &other) const
}
/*! Compare this StateDescriptor to the \l{State} given by \a state.
* Returns true if the given state matches the definition of the StateDescriptor */
* Returns true if the given \a state matches the definition of the StateDescriptor */
bool StateDescriptor::operator ==(const State &state) const
{
if ((m_stateTypeId != state.stateTypeId()) || (m_deviceId != state.deviceId())) {
@ -109,7 +109,7 @@ bool StateDescriptor::operator ==(const State &state) const
}
/*! Compare this StateDescriptor to the \l{State} given by \a state.
* returns true if the given state does not match the definition of the StateDescriptor */
* returns true if the given \a state does not match the definition of the StateDescriptor */
bool StateDescriptor::operator !=(const State &state) const
{
return !(operator==(state));

View File

@ -255,7 +255,7 @@ Rule GuhCore::findRule(const RuleId &ruleId)
return m_ruleEngine->findRule(ruleId);
}
/*! Calls the metheod RuleEngine::addRule(\a id, \a eventDescriptorList, \a actionList).
/*! Calls the metheod RuleEngine::addRule(\a id, \a eventDescriptorList, \a stateEvaluator \a actionList, \a enabled).
* \sa RuleEngine, */
RuleEngine::RuleError GuhCore::addRule(const RuleId &id, const QList<EventDescriptor> &eventDescriptorList, const StateEvaluator &stateEvaluator, const QList<Action> &actionList, bool enabled)
{

View File

@ -158,8 +158,8 @@ RuleEngine::RuleEngine(QObject *parent) :
}
/*! Ask the Engine to evaluate all the rules for the given \a event.
This will search all the \l{Rule}{Rules} triggered by this \l{Event}
and evaluate it's states in the system. It will return a
This will search all the \l{Rule}{Rules} triggered by the given \a event
and evaluate their states in the system. It will return a
list of all \l{Action}{Actions} that should be executed. */
QList<Action> RuleEngine::evaluateEvent(const Event &event)
{

View File

@ -66,10 +66,8 @@ void StateEvaluator::setOperatorType(Types::StateOperator operatorType)
bool StateEvaluator::evaluate() const
{
qDebug() << "evaluating:" ;
if (m_stateDescriptor.isValid()) {
Device *device = GuhCore::instance()->findConfiguredDevice(m_stateDescriptor.deviceId());
qDebug() << "have device";
if (!device) {
qWarning() << "Device not existing!";
return false;
@ -80,7 +78,6 @@ bool StateEvaluator::evaluate() const
}
if (m_stateDescriptor != device->state(m_stateDescriptor.stateTypeId())) {
// state not matching
qDebug() << "booo" << m_stateDescriptor.stateValue() << device->stateValue(m_stateDescriptor.stateTypeId());
return false;
}
}