summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfont.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-05-06 06:55:50 (GMT)
committeraxis <qt-info@nokia.com>2009-05-06 06:55:50 (GMT)
commitb246f8a8beab858468777f433f49faf62edcb07e (patch)
tree120844101aca654bf2f69fef5ea2647bf0bee13a /src/gui/text/qfont.cpp
parent5791fde8526afc49cdbeee080ead9e8a305e3cd5 (diff)
parenta1d2c3c589a03cc427dcc22d109003576add9500 (diff)
downloadQt-b246f8a8beab858468777f433f49faf62edcb07e.zip
Qt-b246f8a8beab858468777f433f49faf62edcb07e.tar.gz
Qt-b246f8a8beab858468777f433f49faf62edcb07e.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/text/qfont.cpp')
-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 0e4b378..d691f93 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -904,7 +904,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();
@@ -923,7 +926,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();