summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-18 08:57:17 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-18 08:57:17 (GMT)
commit0cea0e45523283d6c31998672f97b0343c1388f2 (patch)
tree9a44eb984a8513270f23250f8d7750bdd9797266 /src/gui
parentfd36b47e8758562fc9ff350f292fc9ae9ed91d4e (diff)
parent99fede9d683b312fa79f45aa60c38bcb143c38fd (diff)
downloadQt-0cea0e45523283d6c31998672f97b0343c1388f2.zip
Qt-0cea0e45523283d6c31998672f97b0343c1388f2.tar.gz
Qt-0cea0e45523283d6c31998672f97b0343c1388f2.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: EABI and BWINS DEF file updates for Symbian Further RVCT4 fixes for Symbian Symbol visibility fixes for RVCT4 on Symbian Symbol visibility fixes for RVCT4 on Symbian Symbol visibility fixes for RVCT4 on Symbian Fixed automatic patching of self-signed packages Webkit got bigger, make it link again on armlink Set library path properly for all systems Make debugging floating point mistakes much easier. Simplify docs a bit Fix check for arm based systems Fix option(recursive)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qtransform.cpp43
-rw-r--r--src/gui/text/qstatictext.cpp4
-rw-r--r--src/gui/text/qtextlayout.cpp2
3 files changed, 46 insertions, 3 deletions
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index 988d678..80b7520 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -47,6 +47,7 @@
#include "qpainterpath.h"
#include "qvariant.h"
#include <qmath.h>
+#include <qnumeric.h>
#include <private/qbezier_p.h>
@@ -410,6 +411,12 @@ QTransform &QTransform::translate(qreal dx, qreal dy)
{
if (dx == 0 && dy == 0)
return *this;
+#ifndef QT_NO_DEBUG
+ if (qIsNaN(dx) | qIsNaN(dy)) {
+ qWarning() << "QTransform::translate with NaN called";
+ return *this;
+ }
+#endif
switch(inline_type()) {
case TxNone:
@@ -447,6 +454,12 @@ QTransform &QTransform::translate(qreal dx, qreal dy)
*/
QTransform QTransform::fromTranslate(qreal dx, qreal dy)
{
+#ifndef QT_NO_DEBUG
+ if (qIsNaN(dx) | qIsNaN(dy)) {
+ qWarning() << "QTransform::fromTranslate with NaN called";
+ return QTransform();
+}
+#endif
QTransform transform(1, 0, 0, 0, 1, 0, dx, dy, 1, true);
if (dx == 0 && dy == 0)
transform.m_type = TxNone;
@@ -466,6 +479,12 @@ QTransform & QTransform::scale(qreal sx, qreal sy)
{
if (sx == 1 && sy == 1)
return *this;
+#ifndef QT_NO_DEBUG
+ if (qIsNaN(sx) | qIsNaN(sy)) {
+ qWarning() << "QTransform::scale with NaN called";
+ return *this;
+ }
+#endif
switch(inline_type()) {
case TxNone:
@@ -501,6 +520,12 @@ QTransform & QTransform::scale(qreal sx, qreal sy)
*/
QTransform QTransform::fromScale(qreal sx, qreal sy)
{
+#ifndef QT_NO_DEBUG
+ if (qIsNaN(sx) | qIsNaN(sy)) {
+ qWarning() << "QTransform::fromScale with NaN called";
+ return QTransform();
+}
+#endif
QTransform transform(sx, 0, 0, 0, sy, 0, 0, 0, 1, true);
if (sx == 1. && sy == 1.)
transform.m_type = TxNone;
@@ -520,6 +545,12 @@ QTransform & QTransform::shear(qreal sh, qreal sv)
{
if (sh == 0 && sv == 0)
return *this;
+#ifndef QT_NO_DEBUG
+ if (qIsNaN(sh) | qIsNaN(sv)) {
+ qWarning() << "QTransform::shear with NaN called";
+ return *this;
+ }
+#endif
switch(inline_type()) {
case TxNone:
@@ -575,6 +606,12 @@ QTransform & QTransform::rotate(qreal a, Qt::Axis axis)
{
if (a == 0)
return *this;
+#ifndef QT_NO_DEBUG
+ if (qIsNaN(a)) {
+ qWarning() << "QTransform::rotate with NaN called";
+ return *this;
+ }
+#endif
qreal sina = 0;
qreal cosa = 0;
@@ -660,6 +697,12 @@ QTransform & QTransform::rotate(qreal a, Qt::Axis axis)
*/
QTransform & QTransform::rotateRadians(qreal a, Qt::Axis axis)
{
+#ifndef QT_NO_DEBUG
+ if (qIsNaN(a)) {
+ qWarning() << "QTransform::rotateRadians with NaN called";
+ return *this;
+ }
+#endif
qreal sina = qSin(a);
qreal cosa = qCos(a);
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 06b0d3b..d7bf34e 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -387,8 +387,8 @@ QStaticTextPrivate *QStaticTextPrivate::get(const QStaticText *q)
return q->data.data();
}
-extern int qt_defaultDpiX();
-extern int qt_defaultDpiY();
+Q_GUI_EXPORT extern int qt_defaultDpiX();
+Q_GUI_EXPORT extern int qt_defaultDpiY();
namespace {
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 312d135..ce7915d 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -305,7 +305,7 @@ Qt::LayoutDirection QTextInlineObject::textDirection() const
Once the layout is done, these lines can be drawn on a paint
device.
- Here's some pseudo code that presents the layout phase:
+ Here's some code snippet that presents the layout phase:
\snippet doc/src/snippets/code/src_gui_text_qtextlayout.cpp 0
The text can be drawn by calling the layout's draw() function: