summaryrefslogtreecommitdiffstats
path: root/src/activeqt/shared/qaxtypes.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-02-22 12:09:48 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-02-22 15:27:26 +0000
commit7c5d5ab0d6ab20f0052dedddcd7df5eb1d5eaa3d (patch)
tree88b69f0965a15a6c197b6be422ecc1f38c7ee41e /src/activeqt/shared/qaxtypes.cpp
parent1ce49a21e5991821f258f3cfe124ba7a987c29ad (diff)
Remove duplicated image conversion functions.
Replace qaxPixmapToWinHBITMAP(), qaxPixmapFromWinHBITMAP() by qt_pixmapToWinHBITMAP(), qt_pixmapFromWinHBITMAP() from QtGui. The code was duplicated in ActiveQt in the early days of Qt 5 when the image conversion functions were in the QPA plugin. They were later moved back to QtGui. Change-Id: I911ba543b27b9392d143e5dfab260def4241f477 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Diffstat (limited to 'src/activeqt/shared/qaxtypes.cpp')
-rw-r--r--src/activeqt/shared/qaxtypes.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp
index ba11ac2..df3b655 100644
--- a/src/activeqt/shared/qaxtypes.cpp
+++ b/src/activeqt/shared/qaxtypes.cpp
@@ -128,6 +128,9 @@ static QFont IFontToQFont(IFont *f)
return font;
}
+Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0);
+Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0);
+
static IPictureDisp *QPixmapToIPicture(const QPixmap &pixmap)
{
IPictureDisp *pic = 0;
@@ -140,7 +143,7 @@ static IPictureDisp *QPixmapToIPicture(const QPixmap &pixmap)
desc.bmp.hpal = 0;
if (!pixmap.isNull()) {
- desc.bmp.hbitmap = qaxPixmapToWinHBITMAP(pixmap);
+ desc.bmp.hbitmap = qt_pixmapToWinHBITMAP(pixmap);
Q_ASSERT(desc.bmp.hbitmap);
}
@@ -167,7 +170,7 @@ static QPixmap IPictureToQPixmap(IPicture *ipic)
if (!hbm)
return QPixmap();
- return qaxPixmapFromWinHBITMAP(hbm);
+ return qt_pixmapFromWinHBITMAP(hbm);
}
static QDateTime DATEToQDateTime(DATE ole)