From 0c28821d2895e246295884891df02e924eb8e359 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 1 May 2020 01:14:53 +0200 Subject: [PATCH] cleanup: replace Q_ASSERT by qWarning These two Q_ASSERTs made no sense - their expression (a string literal) always evaluated to true. A qWarning() was intended here. Signed-off-by: Berthold Stoeger --- 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 6001ef0ea..ecd64aba0 100644 --- a/profile-widget/diveeventitem.cpp +++ b/profile-widget/diveeventitem.cpp @@ -262,7 +262,7 @@ int DiveEventItem::depthAtTime(int time) { QModelIndexList result = dataModel->match(dataModel->index(0, DivePlotDataModel::TIME), Qt::DisplayRole, time); if (result.isEmpty()) { - Q_ASSERT("can't find a spot in the dataModel"); + qWarning("can't find a spot in the dataModel"); hide(); return DEPTH_NOT_FOUND; } @@ -276,7 +276,7 @@ void DiveEventItem::recalculatePos(int speed) QModelIndexList result = dataModel->match(dataModel->index(0, DivePlotDataModel::TIME), Qt::DisplayRole, internalEvent->time.seconds); if (result.isEmpty()) { - Q_ASSERT("can't find a spot in the dataModel"); + qWarning("can't find a spot in the dataModel"); hide(); return; }