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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-05-01 01:14:53 +02:00 committed by Dirk Hohndel
parent 3ed36b2ab5
commit 0c28821d28

View file

@ -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;
}