From f718fdab80ccbc718e76f5f8e39bdfe3964ce1a6 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 23 Jul 2016 16:01:26 +0900 Subject: [PATCH] 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 Signed-off-by: Dirk Hohndel --- profile-widget/diveeventitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp index c90857417..9acc643ad 100644 --- a/profile-widget/diveeventitem.cpp +++ b/profile-widget/diveeventitem.cpp @@ -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);