*/
void QFont::setPointSize(int pointSize)
{
- if (pointSize <= 0) {
+ if (Q_UNLIKELY(pointSize <= 0)) {
qWarning("QFont::setPointSize: Point size <= 0 (%d), must be greater than 0", pointSize);
return;
}
*/
void QFont::setPointSizeF(qreal pointSize)
{
- if (pointSize <= 0) {
+ if (Q_UNLIKELY(pointSize <= 0)) {
qWarning("QFont::setPointSizeF: Point size <= 0 (%f), must be greater than 0", pointSize);
return;
}
*/
void QFont::setPixelSize(int pixelSize)
{
- if (pixelSize <= 0) {
+ if (Q_UNLIKELY(pixelSize <= 0)) {
qWarning("QFont::setPixelSize: Pixel size <= 0 (%d)", pixelSize);
return;
}
*/
void QFont::setStretch(int factor)
{
- if (factor < 1 || factor > 4000) {
+ if (Q_UNLIKELY(factor < 1 || factor > 4000)) {
qWarning("QFont::setStretch: Parameter '%d' out of range", factor);
return;
}
QStringList l(descrip.split(QLatin1Char(',')));
int count = l.count();
- if (!count || count > 8) {
+ if (Q_UNLIKELY(!count || count > 8)) {
qWarning("QFont::fromString: Invalid description '%s'",
descrip.isEmpty() ? "(empty)" : descrip.toLatin1().data());
return false;