summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/painting/qpaintengine.cpp3
-rw-r--r--src/gui/painting/qpainter.h1
-rw-r--r--src/gui/painting/qregion.cpp10
-rw-r--r--src/gui/text/qtextengine_p.h1
-rw-r--r--src/gui/util/qgridlayoutengine_p.h1
5 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp
index d59d843f8a..020392409d 100644
--- a/src/gui/painting/qpaintengine.cpp
+++ b/src/gui/painting/qpaintengine.cpp
@@ -310,6 +310,7 @@ struct QT_Point {
int x;
int y;
};
+Q_DECLARE_TYPEINFO(QT_Point, Q_PRIMITIVE_TYPE);
/*!
\fn void QPaintEngine::drawPolygon(const QPointF *points, int pointCount,
@@ -340,6 +341,8 @@ struct QT_PointF {
qreal x;
qreal y;
};
+Q_DECLARE_TYPEINFO(QT_PointF, Q_PRIMITIVE_TYPE);
+
/*!
\overload
diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h
index bd745e41ba..5743d97405 100644
--- a/src/gui/painting/qpainter.h
+++ b/src/gui/painting/qpainter.h
@@ -486,6 +486,7 @@ private:
friend class QPreviewPaintEngine;
friend class QTextEngine;
};
+Q_DECLARE_TYPEINFO(QPainter::PixmapFragment, Q_RELOCATABLE_TYPE);
Q_DECLARE_OPERATORS_FOR_FLAGS(QPainter::RenderHints)
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 35c4abb3ac..d38479c4b1 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -1047,7 +1047,15 @@ void addSegmentsToPath(Segment *segment, QPainterPath &path)
}
}
-}
+} // unnamed namespace
+
+// the following is really a lie, because Segments cannot be relocated, as they
+// reference each other by address. For the same reason, they aren't even copyable,
+// but the code works with the compiler-generated (wrong) copy and move special
+// members, so use this as an optimization. The only container these are used in
+// (a QVarLengthArray in qt_regionToPath()) is resized once up-front, so doesn't
+// have a problem with this, but benefits from not having to run Segment ctors:
+Q_DECLARE_TYPEINFO(Segment, Q_PRIMITIVE_TYPE);
Q_GUI_EXPORT QPainterPath qt_regionToPath(const QRegion &region)
{
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index ab08f2d5e5..56c9825cc1 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -180,6 +180,7 @@ struct QGlyphAttributes {
uchar reserved : 2;
};
Q_STATIC_ASSERT(sizeof(QGlyphAttributes) == 1);
+Q_DECLARE_TYPEINFO(QGlyphAttributes, Q_PRIMITIVE_TYPE);
struct QGlyphLayout
{
diff --git a/src/gui/util/qgridlayoutengine_p.h b/src/gui/util/qgridlayoutengine_p.h
index b3ed2d287b..d79d4cc9c9 100644
--- a/src/gui/util/qgridlayoutengine_p.h
+++ b/src/gui/util/qgridlayoutengine_p.h
@@ -210,6 +210,7 @@ public:
return *t;
}
};
+Q_DECLARE_TYPEINFO(QGridLayoutBox, Q_MOVABLE_TYPE); // cannot be Q_PRIMITIVE_TYPE, as q_maximumSize, say, is != 0
bool operator==(const QGridLayoutBox &box1, const QGridLayoutBox &box2);
inline bool operator!=(const QGridLayoutBox &box1, const QGridLayoutBox &box2)