Use special value SMOOTH_SCALABLE where appropriate

It is the same as USHRT_MAX but mentioning a special value makes
the code more readable.

Change-Id: I91063e472a6130ceb47f866344709786e4b05f20
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
Konstantin Ritt 2014-11-23 07:25:57 +04:00
parent ab3efc09b3
commit 155f664ac2

View File

@ -50,7 +50,6 @@
#include <QtCore/qmath.h>
#include <stdlib.h>
#include <limits.h>
#include <algorithm>
@ -1678,7 +1677,7 @@ QList<int> QFontDatabase::pointSizes(const QString &family,
for (int l = 0; l < style->count; l++) {
const QtFontSize *size = style->pixelSizes + l;
if (size->pixelSize != 0 && size->pixelSize != USHRT_MAX) {
if (size->pixelSize != 0 && size->pixelSize != SMOOTH_SCALABLE) {
const uint pointSize = qRound(size->pixelSize * 72.0 / dpi);
if (! sizes.contains(pointSize))
sizes.append(pointSize);
@ -1781,7 +1780,7 @@ QList<int> QFontDatabase::smoothSizes(const QString &family,
for (int l = 0; l < style->count; l++) {
const QtFontSize *size = style->pixelSizes + l;
if (size->pixelSize != 0 && size->pixelSize != USHRT_MAX) {
if (size->pixelSize != 0 && size->pixelSize != SMOOTH_SCALABLE) {
const uint pointSize = qRound(size->pixelSize * 72.0 / dpi);
if (! sizes.contains(pointSize))
sizes.append(pointSize);