aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);