diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-04-29 14:51:25 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-04-29 14:51:25 (GMT) |
commit | 9b707c0a12e01f8b0c4432b6a5d391b8699cfd3a (patch) | |
tree | 24c920bbba7bc5d2d7dedd7c5a8756376f3c7b4b /src/gui/text | |
parent | a63298440dcddc844554e012434c3331ca239db4 (diff) | |
parent | d51939831552ef73e8f33365c1ef77322594512c (diff) | |
download | Qt-9b707c0a12e01f8b0c4432b6a5d391b8699cfd3a.zip Qt-9b707c0a12e01f8b0c4432b6a5d391b8699cfd3a.tar.gz Qt-9b707c0a12e01f8b0c4432b6a5d391b8699cfd3a.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfont.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 43f5b1e..24ff10b 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -890,7 +890,10 @@ int QFont::pointSize() const */ void QFont::setPointSize(int pointSize) { - Q_ASSERT_X (pointSize > 0, "QFont::setPointSize", "point size must be greater than 0"); + if (pointSize <= 0) { + qWarning("QFont::setPointSize: Point size <= 0 (%d), must be greater than 0", pointSize); + return; + } detach(); @@ -909,7 +912,10 @@ void QFont::setPointSize(int pointSize) */ void QFont::setPointSizeF(qreal pointSize) { - Q_ASSERT_X(pointSize > 0.0, "QFont::setPointSizeF", "point size must be greater than 0"); + if (pointSize <= 0) { + qWarning("QFont::setPointSizeF: Point size <= 0 (%d), must be greater than 0", pointSize); + return; + } detach(); |