⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 121323 in webkit


Ignore:
Timestamp:
Jun 27, 2012, 12:09:30 AM (14 years ago)
Author:
Simon Hausmann
Message:

[Qt] Avoid use of deprecated Qt API

Reviewed by Tor Arne Vestbø.

QGuiApplication::inputPanel() has been deprecated in favour of
inputMethod().

  • UIProcess/qt/QtWebPageEventHandler.cpp:

(WebKit::QtWebPageEventHandler::QtWebPageEventHandler):
(WebKit::QtWebPageEventHandler::~QtWebPageEventHandler):
(WebKit::setInputPanelVisible):
(WebKit::QtWebPageEventHandler::inputPanelVisibleChanged):
(WebKit::QtWebPageEventHandler::updateTextInputState):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r121233 r121323  
     12012-06-26  Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        [Qt] Avoid use of deprecated Qt API
     4
     5        Reviewed by Tor Arne Vestbø.
     6
     7        QGuiApplication::inputPanel() has been deprecated in favour of
     8        inputMethod().
     9
     10        * UIProcess/qt/QtWebPageEventHandler.cpp:
     11        (WebKit::QtWebPageEventHandler::QtWebPageEventHandler):
     12        (WebKit::QtWebPageEventHandler::~QtWebPageEventHandler):
     13        (WebKit::setInputPanelVisible):
     14        (WebKit::QtWebPageEventHandler::inputPanelVisibleChanged):
     15        (WebKit::QtWebPageEventHandler::updateTextInputState):
     16
    1172012-06-26  Christophe Dumez  <christophe.dumez@intel.com>
    218
  • trunk/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp

    r119400 r121323  
    3232#include <QDrag>
    3333#include <QGuiApplication>
    34 #include <QInputPanel>
     34#include <QInputMethod>
    3535#include <QMimeData>
    3636#include <QtQuick/QQuickCanvas>
     
    101101    , m_isTapHighlightActive(false)
    102102{
    103     connect(qApp->inputPanel(), SIGNAL(visibleChanged()), this, SLOT(inputPanelVisibleChanged()));
     103    connect(qApp->inputMethod(), SIGNAL(visibleChanged()), this, SLOT(inputPanelVisibleChanged()));
    104104}
    105105
    106106QtWebPageEventHandler::~QtWebPageEventHandler()
    107107{
    108     disconnect(qApp->inputPanel(), SIGNAL(visibleChanged()), this, SLOT(inputPanelVisibleChanged()));
     108    disconnect(qApp->inputMethod(), SIGNAL(visibleChanged()), this, SLOT(inputPanelVisibleChanged()));
    109109}
    110110
     
    391391static void setInputPanelVisible(bool visible)
    392392{
    393     if (qApp->inputPanel()->visible() == visible)
    394         return;
    395 
    396     qApp->inputPanel()->setVisible(visible);
     393    if (qApp->inputMethod()->visible() == visible)
     394        return;
     395
     396    qApp->inputMethod()->setVisible(visible);
    397397}
    398398
     
    403403
    404404    // We only respond to the input panel becoming visible.
    405     if (!m_webView->hasActiveFocus() || !qApp->inputPanel()->visible())
     405    if (!m_webView->hasActiveFocus() || !qApp->inputMethod()->visible())
    406406        return;
    407407
     
    423423        return;
    424424
    425     qApp->inputPanel()->update(Qt::ImQueryInput | Qt::ImEnabled);
     425    qApp->inputMethod()->update(Qt::ImQueryInput | Qt::ImEnabled);
    426426
    427427    setInputPanelVisible(editor.isContentEditable);
Note: See TracChangeset for help on using the changeset viewer.