summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-04-12 10:18:43 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-12 10:25:51 +0200
commitd9eeaa01d38295170a93232ae714a2a682e94635 (patch)
tree60e4ae73df751b2c8d31f0c782bae9023e66ecf9 /src
parent29bd7d02b027eb963e30eaaeef7f9bf1bcf8a7bf (diff)
downloadqtactiveqt-d9eeaa01d38295170a93232ae714a2a682e94635.tar.gz
Fix the native event filter of QAxHostWidget.
Change-Id: I9d3ce4adee894a522a50e6dcf86dcbbe5516def6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/activeqt/container/qaxwidget.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp
index f87cee2..0be6fed 100644
--- a/src/activeqt/container/qaxwidget.cpp
+++ b/src/activeqt/container/qaxwidget.cpp
@@ -126,7 +126,7 @@ public:
QWindow *hostWindow() const;
protected:
- bool winEvent(MSG *msg, long *result);
+ bool nativeEvent(const QByteArray &eventType, void *message, long *result);
bool event(QEvent *e);
bool eventFilter(QObject *o, QEvent *e);
void resizeEvent(QResizeEvent *e);
@@ -1739,11 +1739,13 @@ void QAxHostWidget::showEvent(QShowEvent *)
resizeObject();
}
-bool QAxHostWidget::winEvent(MSG *msg, long *result)
+bool QAxHostWidget::nativeEvent(const QByteArray &eventType, void *message, long *result)
{
- // FIXME: 4.10.2011: no longer implemented
- if (axhost && axhost->inPlaceObjectWindowless) {
+ qDebug(eventType.constData());
+ if (axhost && axhost->inPlaceObjectWindowless
+ && eventType == QByteArrayLiteral("windows_generic_MSG")) {
Q_ASSERT(axhost->m_spInPlaceObject);
+ MSG *msg = static_cast<MSG *>(message);
IOleInPlaceObjectWindowless *windowless = (IOleInPlaceObjectWindowless*)axhost->m_spInPlaceObject;
Q_ASSERT(windowless);
LRESULT lres;
@@ -1751,7 +1753,8 @@ bool QAxHostWidget::winEvent(MSG *msg, long *result)
if (hres == S_OK)
return true;
}
- // QWidget::winEvent(msg, result);
+
+ QWidget::nativeEvent(eventType, message, result);
return false;
}