Commit 5a0d4fe1 authored by hausmann@webkit.org's avatar hausmann@webkit.org
Browse files

Make Software Input Panel requests work with QGraphicsWebView

_and_ QWebView by sharing the event code in handleSoftwareInputPanel().

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2009-10-01
Reviewed by Tor Arne Vestbø.

* Api/qwebpage.cpp:
(QWebPagePrivate::mouseReleaseEvent):
(QWebPagePrivate::handleSoftwareInputPanel):
* Api/qwebpage_p.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0aaef196
......@@ -764,10 +764,14 @@ void QWebPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev)
ev->setAccepted(accepted);
handleClipboard(ev, ev->button());
handleSoftwareInputPanel(ev->button());
}
void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button)
{
#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
if (view && view->testAttribute(Qt::WA_InputMethodEnabled)
&& ev->button() == Qt::LeftButton && qApp->autoSipEnabled()) {
&& button == Qt::LeftButton && qApp->autoSipEnabled()) {
QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
view->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) {
......@@ -794,6 +798,7 @@ void QWebPagePrivate::mouseReleaseEvent(QMouseEvent *ev)
ev->setAccepted(accepted);
handleClipboard(ev, ev->button());
handleSoftwareInputPanel(ev->button());
}
#ifndef QT_NO_CONTEXTMENU
......
......@@ -111,6 +111,7 @@ public:
void shortcutOverrideEvent(QKeyEvent*);
void leaveEvent(QEvent*);
void handleClipboard(QEvent*, Qt::MouseButton);
void handleSoftwareInputPanel(Qt::MouseButton);
bool handleScrolling(QKeyEvent*, WebCore::Frame*);
void setInspector(QWebInspector*);
......
2009-10-01 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Tor Arne Vestbø.
Make Software Input Panel requests work with QGraphicsWebView
_and_ QWebView by sharing the event code in handleSoftwareInputPanel().
* Api/qwebpage.cpp:
(QWebPagePrivate::mouseReleaseEvent):
(QWebPagePrivate::handleSoftwareInputPanel):
* Api/qwebpage_p.h:
2009-10-01 Alexis Menard <alexis.menard@nokia.com>
Reviewed by Tor Arne Vestbø.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment