Event flags should be checked as bits, not values

This becomes obvious with the new severity bits introduced in the Suunto
EON Steel parser.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2016-07-23 16:01:26 +09:00 committed by Dirk Hohndel
parent 177e21076b
commit f718fdab80

View file

@ -134,8 +134,8 @@ void DiveEventItem::setupToolTipString()
// warn of high or low pO₂ and are turning it into a set point change event
name += "\n" + tr("Manual switch to OC");
} else {
name += internalEvent->flags == SAMPLE_FLAGS_BEGIN ? tr(" begin", "Starts with space!") :
internalEvent->flags == SAMPLE_FLAGS_END ? tr(" end", "Starts with space!") : "";
name += internalEvent->flags & SAMPLE_FLAGS_BEGIN ? tr(" begin", "Starts with space!") :
internalEvent->flags & SAMPLE_FLAGS_END ? tr(" end", "Starts with space!") : "";
}
// qDebug() << name;
setToolTip(name);