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) { if (role == Qt::FontRole) {
QFont myFont; QFont myFont;
myFont.setPointSize(14);
QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont); QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
myFixedFont.setPointSize(14);
switch (index.column()) { switch (index.column()) {
case 0: case 0:
[[fallthrough]]; [[fallthrough]];
case 1: case 1:
myFixedFont.setPointSize(11);
return myFixedFont; return myFixedFont;
case 2: case 2:
myFixedFont.setPointSize(myFixedFont.pointSize() + 3);
return myFixedFont; return myFixedFont;
case 3: case 3:
myFixedFont.setPointSize(myFixedFont.pointSize() + 3);
return myFixedFont; return myFixedFont;
} }
} }