Mark implicitly shared classes as a movable type. This can improve performance
and memory efficiency when using Qt's container classes. --HG-- branch : develop
This commit is contained in:
parent
783e3d57c2
commit
f0691d7c9f
|
@ -89,4 +89,6 @@ private:
|
||||||
qreal MaxLength() const;
|
qreal MaxLength() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VArc, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VARC_H
|
#endif // VARC_H
|
||||||
|
|
|
@ -95,4 +95,6 @@ private:
|
||||||
static int PointInCircle (const QPointF &p, const QPointF ¢er, qreal radius);
|
static int PointInCircle (const QPointF &p, const QPointF ¢er, qreal radius);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VGObject, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VGOBJECT_H
|
#endif // VGOBJECT_H
|
||||||
|
|
|
@ -69,6 +69,8 @@ private:
|
||||||
QSharedDataPointer<VPointFData> d;
|
QSharedDataPointer<VPointFData> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VPointF, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#if defined(Q_CC_INTEL)
|
#if defined(Q_CC_INTEL)
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -89,4 +89,6 @@ private:
|
||||||
static int Sign(long double ld);
|
static int Sign(long double ld);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VSpline, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VSPLINE_H
|
#endif // VSPLINE_H
|
||||||
|
|
|
@ -182,4 +182,6 @@ private:
|
||||||
QSharedDataPointer<VSplinePathData> d;
|
QSharedDataPointer<VSplinePathData> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VSplinePath, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VSPLINEPATH_H
|
#endif // VSPLINEPATH_H
|
||||||
|
|
|
@ -62,5 +62,6 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(VSplinePoint)
|
Q_DECLARE_METATYPE(VSplinePoint)
|
||||||
|
Q_DECLARE_TYPEINFO(VSplinePoint, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VSPLINEPOINT_H
|
#endif // VSPLINEPOINT_H
|
||||||
|
|
|
@ -82,4 +82,6 @@ private:
|
||||||
static QPointF SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width);
|
static QPointF SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VAbstractDetail, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VABSTRACTDETAIL_H
|
#endif // VABSTRACTDETAIL_H
|
||||||
|
|
|
@ -78,4 +78,6 @@ private:
|
||||||
void AppendWhole(QVector<QPointF> &contour, const VLayoutDetail &detail, int detJ) const;
|
void AppendWhole(QVector<QPointF> &contour, const VLayoutDetail &detail, int detJ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VContour, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VCONTOUR_H
|
#endif // VCONTOUR_H
|
||||||
|
|
|
@ -85,4 +85,6 @@ private:
|
||||||
static QVector<QPointF> RoundPoints(const QVector<QPointF> &points);
|
static QVector<QPointF> RoundPoints(const QVector<QPointF> &points);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VLayoutDetail, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VLAYOUTDETAIL_H
|
#endif // VLAYOUTDETAIL_H
|
||||||
|
|
|
@ -84,4 +84,6 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VLayoutPaper, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VLAYOUTPAPER_H
|
#endif // VLAYOUTPAPER_H
|
||||||
|
|
|
@ -54,4 +54,6 @@ private:
|
||||||
QSharedDataPointer<VCurveVariableData> d;
|
QSharedDataPointer<VCurveVariableData> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VCurveVariable, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VCURVEVARIABLE_H
|
#endif // VCURVEVARIABLE_H
|
||||||
|
|
|
@ -56,4 +56,6 @@ private:
|
||||||
QSharedDataPointer<VIncrementData> d;
|
QSharedDataPointer<VIncrementData> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VIncrement, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VINCREMENTTABLEROW_H
|
#endif // VINCREMENTTABLEROW_H
|
||||||
|
|
|
@ -60,4 +60,6 @@ private:
|
||||||
QSharedDataPointer<VInternalVariableData> d;
|
QSharedDataPointer<VInternalVariableData> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VInternalVariable, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VINTERNALVARIABLE_H
|
#endif // VINTERNALVARIABLE_H
|
||||||
|
|
|
@ -51,4 +51,6 @@ private:
|
||||||
QSharedDataPointer<VLineAngleData> d;
|
QSharedDataPointer<VLineAngleData> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VLineAngle, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VLINEANGLE_H
|
#endif // VLINEANGLE_H
|
||||||
|
|
|
@ -52,4 +52,6 @@ private:
|
||||||
QSharedDataPointer<VLengthLineData> d;
|
QSharedDataPointer<VLengthLineData> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VLengthLine, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VLINELENGTH_H
|
#endif // VLINELENGTH_H
|
||||||
|
|
|
@ -80,4 +80,6 @@ private:
|
||||||
static void ListValue(QStringList &list, qreal value, Unit patternUnit);
|
static void ListValue(QStringList &list, qreal value, Unit patternUnit);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VMeasurement, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VSTANDARDTABLEROW_H
|
#endif // VSTANDARDTABLEROW_H
|
||||||
|
|
|
@ -64,4 +64,6 @@ private:
|
||||||
QSharedDataPointer<VVariableData> d;
|
QSharedDataPointer<VVariableData> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VVariable, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VVARIABLE_H
|
#endif // VVARIABLE_H
|
||||||
|
|
|
@ -198,7 +198,7 @@ private:
|
||||||
const QMap<QString, QSharedPointer<T> > DataVar(const VarType &type) const;
|
const QMap<QString, QSharedPointer<T> > DataVar(const VarType &type) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VContainer, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Defintion of templated member functions of VContainer
|
* Defintion of templated member functions of VContainer
|
||||||
|
|
|
@ -94,4 +94,6 @@ private:
|
||||||
static QVector<QPointF> biasPoints(const QVector<QPointF> &points, const qreal &mx, const qreal &my);
|
static QVector<QPointF> biasPoints(const QVector<QPointF> &points, const qreal &mx, const qreal &my);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_TYPEINFO(VDetail, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VDETAIL_H
|
#endif // VDETAIL_H
|
||||||
|
|
|
@ -125,5 +125,6 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(VNodeDetail)
|
Q_DECLARE_METATYPE(VNodeDetail)
|
||||||
|
Q_DECLARE_TYPEINFO(VNodeDetail, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
#endif // VNODEDETAIL_H
|
#endif // VNODEDETAIL_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user