Fix edition of alphanumeric input on equipments.

This patch fixes the edition of alphanumeric input,
columns like depth accepted '23ft', '20m' or '30', with
an inplicit conversion to the unit. But the code ignored
that the input could have a 'ft' or 'm' ( ot anything else
for that matter.

Signed-off-by: Taiane Ramos <exhora.tat@gmail.com>
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-11-13 15:49:26 -02:00 committed by Dirk Hohndel
parent 9c90d6790a
commit 9f8577a5ea

View file

@ -195,7 +195,9 @@ void CylindersModel::passInData(const QModelIndex& index, const QVariant& value)
}
}
#define CHANGED(_t,_u1,_u2) value._t() != data(index, role).toString().remove(_u1).remove(_u2)._t()
#define CHANGED(_t,_u1,_u2) \
value.toString().remove(_u1).remove(_u2)._t() != \
data(index, role).toString().remove(_u1).remove(_u2)._t()
bool CylindersModel::setData(const QModelIndex& index, const QVariant& value, int role)
{