Use macro for priority values instead of constants.

This commit is contained in:
Phenom 2017-11-04 13:57:55 +01:00
parent c5c406bb98
commit 8072d245f3
3 changed files with 15 additions and 10 deletions

View file

@ -198,13 +198,13 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
case COLUMN_PRIORITY:
{
double dblValue = index.data().toDouble();
if (dblValue == 0.0)
if (dblValue == PRIORITY_NULL)
temp = "";
else if (dblValue == 0.1)
else if (dblValue == PRIORITY_FASTER)
temp = tr("Faster");
else if (dblValue == 0.2)
else if (dblValue == PRIORITY_AVERAGE)
temp = tr("Average");
else if (dblValue == 0.3)
else if (dblValue == PRIORITY_SLOWER)
temp = tr("Slower");
else
temp = QString::number((uint32_t)dblValue);