From f3721d77067d4d0f81971a4bfb1bb135bf146d8a Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Thu, 26 Apr 2012 13:00:56 +0300 Subject: get rid of Q_*_EXPORT_INLINE macros > Girish: > We should be able to remove the macro completely today, > just mark all those functions as plain inline. > With Qt5, we don't have to worry about bc yet. this fixes "import attribute ignored" warnings on mingw with -fno-keep-inline-dllexport Change-Id: I616e5de7c8d59953ce03a316b941a439fae56298 Reviewed-by: Olivier Goffart --- src/gui/painting/qmatrix.h | 14 +++++++------- src/gui/painting/qrgb.h | 18 +++++++++--------- src/gui/painting/qtransform.h | 26 +++++++++++++------------- 3 files changed, 29 insertions(+), 29 deletions(-) (limited to 'src/gui/painting') diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h index 7acc962afa..00eec33410 100644 --- a/src/gui/painting/qmatrix.h +++ b/src/gui/painting/qmatrix.h @@ -137,19 +137,19 @@ private: Q_DECLARE_TYPEINFO(QMatrix, Q_MOVABLE_TYPE); // mathematical semantics -Q_GUI_EXPORT_INLINE QPoint operator*(const QPoint &p, const QMatrix &m) +inline QPoint operator*(const QPoint &p, const QMatrix &m) { return m.map(p); } -Q_GUI_EXPORT_INLINE QPointF operator*(const QPointF &p, const QMatrix &m) +inline QPointF operator*(const QPointF &p, const QMatrix &m) { return m.map(p); } -Q_GUI_EXPORT_INLINE QLineF operator*(const QLineF &l, const QMatrix &m) +inline QLineF operator*(const QLineF &l, const QMatrix &m) { return m.map(l); } -Q_GUI_EXPORT_INLINE QLine operator*(const QLine &l, const QMatrix &m) +inline QLine operator*(const QLine &l, const QMatrix &m) { return m.map(l); } -Q_GUI_EXPORT_INLINE QPolygon operator *(const QPolygon &a, const QMatrix &m) +inline QPolygon operator *(const QPolygon &a, const QMatrix &m) { return m.map(a); } -Q_GUI_EXPORT_INLINE QPolygonF operator *(const QPolygonF &a, const QMatrix &m) +inline QPolygonF operator *(const QPolygonF &a, const QMatrix &m) { return m.map(a); } -Q_GUI_EXPORT_INLINE QRegion operator *(const QRegion &r, const QMatrix &m) +inline QRegion operator *(const QRegion &r, const QMatrix &m) { return m.map(r); } Q_GUI_EXPORT QPainterPath operator *(const QPainterPath &p, const QMatrix &m); diff --git a/src/gui/painting/qrgb.h b/src/gui/painting/qrgb.h index 6d046be1d5..dd59069236 100644 --- a/src/gui/painting/qrgb.h +++ b/src/gui/painting/qrgb.h @@ -53,31 +53,31 @@ typedef unsigned int QRgb; // RGB triplet const QRgb RGB_MASK = 0x00ffffff; // masks RGB values -Q_GUI_EXPORT_INLINE int qRed(QRgb rgb) // get red part of RGB +inline int qRed(QRgb rgb) // get red part of RGB { return ((rgb >> 16) & 0xff); } -Q_GUI_EXPORT_INLINE int qGreen(QRgb rgb) // get green part of RGB +inline int qGreen(QRgb rgb) // get green part of RGB { return ((rgb >> 8) & 0xff); } -Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb) // get blue part of RGB +inline int qBlue(QRgb rgb) // get blue part of RGB { return (rgb & 0xff); } -Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb) // get alpha part of RGBA +inline int qAlpha(QRgb rgb) // get alpha part of RGBA { return rgb >> 24; } -Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)// set RGB value +inline QRgb qRgb(int r, int g, int b)// set RGB value { return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } -Q_GUI_EXPORT_INLINE QRgb qRgba(int r, int g, int b, int a)// set RGBA value +inline QRgb qRgba(int r, int g, int b, int a)// set RGBA value { return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } -Q_GUI_EXPORT_INLINE int qGray(int r, int g, int b)// convert R,G,B to gray 0..255 +inline int qGray(int r, int g, int b)// convert R,G,B to gray 0..255 { return (r*11+g*16+b*5)/32; } -Q_GUI_EXPORT_INLINE int qGray(QRgb rgb) // convert RGB to gray 0..255 +inline int qGray(QRgb rgb) // convert RGB to gray 0..255 { return qGray(qRed(rgb), qGreen(rgb), qBlue(rgb)); } -Q_GUI_EXPORT_INLINE bool qIsGray(QRgb rgb) +inline bool qIsGray(QRgb rgb) { return qRed(rgb) == qGreen(rgb) && qRed(rgb) == qBlue(rgb); } QT_END_NAMESPACE diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h index 2e56da1873..9fd713d21f 100644 --- a/src/gui/painting/qtransform.h +++ b/src/gui/painting/qtransform.h @@ -361,34 +361,34 @@ Q_GUI_EXPORT QDebug operator<<(QDebug, const QTransform &); /****** end stream functions *******************/ // mathematical semantics -Q_GUI_EXPORT_INLINE QPoint operator*(const QPoint &p, const QTransform &m) +inline QPoint operator*(const QPoint &p, const QTransform &m) { return m.map(p); } -Q_GUI_EXPORT_INLINE QPointF operator*(const QPointF &p, const QTransform &m) +inline QPointF operator*(const QPointF &p, const QTransform &m) { return m.map(p); } -Q_GUI_EXPORT_INLINE QLineF operator*(const QLineF &l, const QTransform &m) +inline QLineF operator*(const QLineF &l, const QTransform &m) { return m.map(l); } -Q_GUI_EXPORT_INLINE QLine operator*(const QLine &l, const QTransform &m) +inline QLine operator*(const QLine &l, const QTransform &m) { return m.map(l); } -Q_GUI_EXPORT_INLINE QPolygon operator *(const QPolygon &a, const QTransform &m) +inline QPolygon operator *(const QPolygon &a, const QTransform &m) { return m.map(a); } -Q_GUI_EXPORT_INLINE QPolygonF operator *(const QPolygonF &a, const QTransform &m) +inline QPolygonF operator *(const QPolygonF &a, const QTransform &m) { return m.map(a); } -Q_GUI_EXPORT_INLINE QRegion operator *(const QRegion &r, const QTransform &m) +inline QRegion operator *(const QRegion &r, const QTransform &m) { return m.map(r); } -Q_GUI_EXPORT_INLINE QPainterPath operator *(const QPainterPath &p, const QTransform &m) +inline QPainterPath operator *(const QPainterPath &p, const QTransform &m) { return m.map(p); } -Q_GUI_EXPORT_INLINE QTransform operator *(const QTransform &a, qreal n) +inline QTransform operator *(const QTransform &a, qreal n) { QTransform t(a); t *= n; return t; } -Q_GUI_EXPORT_INLINE QTransform operator /(const QTransform &a, qreal n) +inline QTransform operator /(const QTransform &a, qreal n) { QTransform t(a); t /= n; return t; } -Q_GUI_EXPORT_INLINE QTransform operator +(const QTransform &a, qreal n) +inline QTransform operator +(const QTransform &a, qreal n) { QTransform t(a); t += n; return t; } -Q_GUI_EXPORT_INLINE QTransform operator -(const QTransform &a, qreal n) +inline QTransform operator -(const QTransform &a, qreal n) { QTransform t(a); t -= n; return t; } QT_END_NAMESPACE QT_END_HEADER -#endif +#endif // QTRANSFORM_H -- cgit v1.2.3