small code improvement

This commit is contained in:
Martin Brodbeck 2018-10-08 09:52:41 +02:00
parent 725bc8f04b
commit 271aac0914

View file

@ -20,20 +20,19 @@ QVariant BasketModel::data(const QModelIndex& index, int role) const
{
if (role == Qt::FontRole) {
QFont myFont;
myFont.setPointSize(14);
QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
myFixedFont.setPointSize(14);
switch (index.column()) {
case 0:
[[fallthrough]];
case 1:
myFixedFont.setPointSize(11);
return myFixedFont;
case 2:
myFixedFont.setPointSize(myFixedFont.pointSize() + 3);
return myFixedFont;
case 3:
myFixedFont.setPointSize(myFixedFont.pointSize() + 3);
return myFixedFont;
}
}