summaryrefslogtreecommitdiffstats
path: root/src/activeqt/control/qaxserverbase.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/control/qaxserverbase.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/control/qaxserverbase.cpp')
-rw-r--r--src/activeqt/control/qaxserverbase.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index d6af214..b131e76 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -3097,6 +3097,8 @@ HRESULT WINAPI QAxServerBase::Save(LPCOLESTR fileName, BOOL fRemember)
return E_FAIL;
}
+Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0);
+
//**** IViewObject
/*
Draws the widget into the provided device context.
@@ -3135,7 +3137,7 @@ HRESULT WINAPI QAxServerBase::Draw(DWORD dwAspect, LONG /* lindex */, void * /*
::LPtoDP(hicTargetDev, (LPPOINT)&rc, 2);
const QPixmap pm = qt.widget->grab();
- HBITMAP hbm = qaxPixmapToWinHBITMAP(pm);
+ HBITMAP hbm = qt_pixmapToWinHBITMAP(pm);
HDC hdc = CreateCompatibleDC(0);
SelectObject(hdc, hbm);
::StretchBlt(hdcDraw, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hdc, 0, 0,pm.width(), pm.height(), SRCCOPY);