From 7ec1c27e662dfd4393491f90bfcb9c868cc0a23f Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 10 Jan 2011 20:21:05 +0100 Subject: Fix static build on Windows with MinGW. Q_DECL_IMPORT is still __declspec(dllimport), which is unsuitable for static code. Commit edbc656b changed Q_DECL_IMPORT_IMPORT to Q_CORE_EXPORT when declaring QtCore functions in svg. Now we change Q_DECL_IMPORT to Q_GUI_EXPORT when declaring QtGui functions into opengl and openvg. Also removed the redundant keyword "extern" from the function declarations. Merge-request: 2540 Reviewed-by: Oswald Buddenhagen Reviewed-by: mariusSO --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 ++-- src/opengl/qglframebufferobject.cpp | 4 ++-- src/opengl/qglpixelbuffer.cpp | 4 ++-- src/opengl/qglpixmapfilter.cpp | 6 +++--- src/opengl/qpaintengine_opengl.cpp | 2 +- src/opengl/qpixmapdata_gl.cpp | 4 ++-- src/openvg/qpaintengine_vg.cpp | 8 ++++---- src/openvg/qpixmapdata_vg.cpp | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 9ab8d2e..ad2852e 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -102,7 +102,7 @@ extern Q_GUI_EXPORT bool qt_cleartype_enabled; extern bool qt_applefontsmoothing_enabled; #endif -Q_DECL_IMPORT extern QImage qt_imageForBrush(int brushStyle, bool invert); +Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert); ////////////////////////////////// Private Methods ////////////////////////////////////////// @@ -1154,7 +1154,7 @@ void QGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush) d->fill(path); } -extern Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp +Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index adf3ceb..6161d9b 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -1171,8 +1171,8 @@ void QGLFramebufferObject::drawTexture(const QPointF &point, QMacCompatGLuint te } #endif -Q_DECL_IMPORT extern int qt_defaultDpiX(); -Q_DECL_IMPORT extern int qt_defaultDpiY(); +Q_GUI_EXPORT int qt_defaultDpiX(); +Q_GUI_EXPORT int qt_defaultDpiY(); /*! \reimp */ int QGLFramebufferObject::metric(PaintDeviceMetric metric) const diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index 735590f..61bce23 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -416,8 +416,8 @@ QPaintEngine *QGLPixelBuffer::paintEngine() const #endif } -Q_DECL_IMPORT extern int qt_defaultDpiX(); -Q_DECL_IMPORT extern int qt_defaultDpiY(); +Q_GUI_EXPORT int qt_defaultDpiX(); +Q_GUI_EXPORT int qt_defaultDpiY(); /*! \reimp */ int QGLPixelBuffer::metric(PaintDeviceMetric metric) const diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index 0369d56..2187deb 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -63,8 +63,8 @@ QT_BEGIN_NAMESPACE // qpixmapfilter.cpp -Q_DECL_IMPORT void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed = 0); -Q_DECL_IMPORT QImage qt_halfScaled(const QImage &source); +Q_GUI_EXPORT void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed = 0); +Q_GUI_EXPORT QImage qt_halfScaled(const QImage &source); void QGLPixmapFilterBase::bindTexture(const QPixmap &src) const { @@ -436,7 +436,7 @@ static inline uint nextMultiple(uint x, uint multiplier) return x + multiplier - mod; } -Q_DECL_IMPORT void qt_memrotate90_gl(const quint32 *src, int srcWidth, int srcHeight, int srcStride, +Q_GUI_EXPORT void qt_memrotate90_gl(const quint32 *src, int srcWidth, int srcHeight, int srcStride, quint32 *dest, int dstStride); bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF &) const diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 2f1b8fd..2c01ac4 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -79,7 +79,7 @@ QT_BEGIN_NAMESPACE -Q_DECL_IMPORT extern QImage qt_imageForBrush(int brushStyle, bool invert); //in qbrush.cpp +Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert); //in qbrush.cpp #ifdef QT_MAC_USE_COCOA extern void *qt_current_nsopengl_context(); // qgl_mac.mm #endif diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 3549f9d..9980f2d 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -739,8 +739,8 @@ QGLTexture* QGLPixmapData::texture() const return &m_texture; } -Q_DECL_IMPORT extern int qt_defaultDpiX(); -Q_DECL_IMPORT extern int qt_defaultDpiY(); +Q_GUI_EXPORT int qt_defaultDpiX(); +Q_GUI_EXPORT int qt_defaultDpiY(); int QGLPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const { diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 09cbc36..b90811d 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -77,8 +77,8 @@ static const qreal aliasedCoordinateDelta = 0.5 - 0.015625; #if !defined(QVG_NO_DRAW_GLYPHS) -Q_DECL_IMPORT extern int qt_defaultDpiX(); -Q_DECL_IMPORT extern int qt_defaultDpiY(); +Q_GUI_EXPORT int qt_defaultDpiX(); +Q_GUI_EXPORT int qt_defaultDpiY(); class QVGPaintEnginePrivate; @@ -526,7 +526,7 @@ void QVGPaintEnginePrivate::setTransform vgLoadMatrix(mat); } -Q_DECL_IMPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); +Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev) { @@ -994,7 +994,7 @@ VGPath QVGPaintEnginePrivate::roundedRectPath(const QRectF &rect, qreal xRadius, return vgpath; } -Q_DECL_IMPORT extern QImage qt_imageForBrush(int style, bool invert); +Q_GUI_EXPORT QImage qt_imageForBrush(int style, bool invert); static QImage colorizeBitmap(const QImage &image, const QColor &color) { diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index 3f768fd..e4b1d02 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -404,8 +404,8 @@ void QVGPixmapData::reclaimImages() destroyImages(); } -Q_DECL_IMPORT extern int qt_defaultDpiX(); -Q_DECL_IMPORT extern int qt_defaultDpiY(); +Q_GUI_EXPORT int qt_defaultDpiX(); +Q_GUI_EXPORT int qt_defaultDpiY(); int QVGPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const { -- cgit v0.12