summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-04-29 14:51:25 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-04-29 14:51:25 (GMT)
commit9b707c0a12e01f8b0c4432b6a5d391b8699cfd3a (patch)
tree24c920bbba7bc5d2d7dedd7c5a8756376f3c7b4b /src/gui/text
parenta63298440dcddc844554e012434c3331ca239db4 (diff)
parentd51939831552ef73e8f33365c1ef77322594512c (diff)
downloadQt-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.cpp10
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();