better context menu handling

svn path=/trunk/KDE/kdelibs/; revision=919698
This commit is contained in:
Aaron J. Seigo 2009-02-01 14:55:00 +00:00
parent 50e22d6d09
commit 9bd8fe0219

View File

@ -232,9 +232,16 @@ void WebView::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
QContextMenuEvent ce(static_cast<QContextMenuEvent::Reason>(event->reason()),
event->pos().toPoint(), event->screenPos());
d->page->event(&ce);
if (ce.isAccepted()) {
if (d->page->swallowContextMenuEvent(&ce)) {
event->accept();
} else {
d->page->updatePositionDependentActions(event->pos().toPoint());
d->page->event(&ce);
if (ce.isAccepted()) {
event->accept();
}
}
}