summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-04-30 10:19:38 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-30 10:38:54 +0200
commit7f79e04a22673dc2b8ae264452d851f5a13d11cd (patch)
tree572065f0121fef73533e91c11d828c0cef422301
parente1084919118eae19abc43e06de24dd8467dc6356 (diff)
downloadqtactiveqt-7f79e04a22673dc2b8ae264452d851f5a13d11cd.tar.gz
fix memory leak in QAxServerBase::internalActivate
There is no need to call QStringToBSTR, because the method IOleInPlaceUIWindow::SetActiveObject expects an POLESTR, not a PBSTR. Task-number: QTBUG-30890 Change-Id: I98e42d400400cae849198d2d9c7cbb9c6de7991d Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
-rw-r--r--src/activeqt/control/qaxserverbase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index 97f46b3..d0b0db4 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -3778,7 +3778,7 @@ HRESULT QAxServerBase::internalActivate()
}
if (m_spInPlaceFrame) {
- hr = m_spInPlaceFrame->SetActiveObject(this, QStringToBSTR(class_name));
+ hr = m_spInPlaceFrame->SetActiveObject(this, (wchar_t*)class_name.utf16());
if (!FAILED(hr)) {
menuBar = (qt.widget && !qax_disable_inplaceframe) ? qt.widget->findChild<QMenuBar*>() : 0;
if (menuBar && !menuBar->isVisible()) {
@@ -3796,7 +3796,7 @@ HRESULT QAxServerBase::internalActivate()
}
}
if (spInPlaceUIWindow) {
- spInPlaceUIWindow->SetActiveObject(this, QStringToBSTR(class_name));
+ spInPlaceUIWindow->SetActiveObject(this, (wchar_t*)class_name.utf16());
spInPlaceUIWindow->SetBorderSpace(0);
}
}