aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-09-30 14:46:12 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-02 06:56:56 +0200
commit3176222ad06478b3aae752f59e14d63ffcd952c7 (patch)
treee7795af5264c0d3ec8399cc1125c92be9c77246a /src
parentb4725c0d2550322105e9004d75ee864659ccb1ab (diff)
Declarative: Compile fix for Windows.
Change-Id: I0e4d61aa400094b3b059c836ee9145c1af989f00 Reviewed-on: http://codereview.qt-project.org/5881 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/context2d/qsgcontext2d.cpp8
-rw-r--r--src/declarative/items/qsgtranslate.cpp3
2 files changed, 9 insertions, 2 deletions
diff --git a/src/declarative/items/context2d/qsgcontext2d.cpp b/src/declarative/items/context2d/qsgcontext2d.cpp
index e9cf65de84..cfcfb063dd 100644
--- a/src/declarative/items/context2d/qsgcontext2d.cpp
+++ b/src/declarative/items/context2d/qsgcontext2d.cpp
@@ -165,7 +165,13 @@ QColor qt_color_from_string(const QString& name)
while (pos < len && !isdigit(data[pos])) pos++;
if (pos >= len)
return QColor();
- alpha = qRound(strtof(&(data[pos]), 0) * 255);
+#ifndef Q_CC_MSVC
+ const float alphaF = strtof(data + pos, 0);
+#else
+ // MSVC does not have strtof
+ const double alphaF = strtod(data + pos, 0);
+#endif
+ alpha = qRound(alphaF * 255);
}
if (isRgb)
diff --git a/src/declarative/items/qsgtranslate.cpp b/src/declarative/items/qsgtranslate.cpp
index 1de5c6c3ea..577cf4d427 100644
--- a/src/declarative/items/qsgtranslate.cpp
+++ b/src/declarative/items/qsgtranslate.cpp
@@ -296,7 +296,8 @@ void QSGRotation::setAxis(Qt::Axis axis)
}
}
-struct QGraphicsRotation {
+class QGraphicsRotation {
+public:
static inline void projectedRotate(QMatrix4x4 *matrix, qreal angle, qreal x, qreal y, qreal z)
{
matrix->projectedRotate(angle, x, y, z);