Make QPoint have the same layout on all platforms

Change-Id: I8330295761a4440afd81c121039237fb651d9a9c
Reviewed-on: http://codereview.qt.nokia.com/487
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Gunnar Sletta 2011-06-18 16:39:32 +02:00 committed by Qt Continuous Integration System
parent 0da3d7d5d3
commit 665d8a0454
3 changed files with 0 additions and 20 deletions

View File

@ -92,14 +92,8 @@ public:
private:
friend class QTransform;
// ### Qt 5; remove the ifdef and just have the same order on all platforms.
#if defined(Q_OS_MAC)
int yp;
int xp;
#else
int xp;
int yp;
#endif
};
Q_DECLARE_TYPEINFO(QPoint, Q_MOVABLE_TYPE);

View File

@ -2006,15 +2006,8 @@ void QRasterPaintEngine::drawPolygon(const QPoint *points, int pointCount, Polyg
if (s->penData.blend) {
int count = pointCount * 2;
QVarLengthArray<qreal> fpoints(count);
#ifdef Q_WS_MAC
for (int i=0; i<count; i+=2) {
fpoints[i] = ((int *) points)[i+1];
fpoints[i+1] = ((int *) points)[i];
}
#else
for (int i=0; i<count; ++i)
fpoints[i] = ((int *) points)[i];
#endif
QVectorPath vp((qreal *) fpoints.data(), pointCount, 0, QVectorPath::polygonFlags(mode));
if (s->flags.fast_pen) {

View File

@ -789,15 +789,8 @@ void QPaintEngineEx::drawLines(const QLine *lines, int lineCount)
qreal pts[64];
int count2 = count<<1;
#ifdef Q_WS_MAC
for (int i=0; i<count2; i+=2) {
pts[i] = ((int *) lines)[i+1];
pts[i+1] = ((int *) lines)[i];
}
#else
for (int i=0; i<count2; ++i)
pts[i] = ((int *) lines)[i];
#endif
QVectorPath path(pts, count, qpaintengineex_line_types_16, QVectorPath::LinesHint);
stroke(path, state()->pen);