diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsitem.cpp | 10 | ||||
-rw-r--r-- | src/widgets/graphicsview/qgraphicsscene.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 16 | ||||
-rw-r--r-- | src/widgets/kernel/qinputcontext.cpp | 12 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 24 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget_p.h | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qlineedit.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qlineedit_p.cpp | 10 | ||||
-rw-r--r-- | src/widgets/widgets/qlineedit_p.h | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol_p.h | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgettextcontrol.cpp | 8 |
13 files changed, 54 insertions, 54 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index 8dbcd9f81e..7fc7c3db02 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -743,7 +743,7 @@ #include <QtGui/qpixmapcache.h> #include <QtWidgets/qstyleoption.h> #include <QtGui/qevent.h> -#include <QtGui/qinputpanel.h> +#include <QtGui/qinputmethod.h> #include <QtWidgets/qgraphicseffect.h> #ifndef QT_NO_ACCESSIBILITY # include "qaccessible.h" @@ -7379,7 +7379,7 @@ void QGraphicsItem::setInputMethodHints(Qt::InputMethodHints hints) QWidget *fw = QApplication::focusWidget(); if (!fw) return; - qApp->inputPanel()->update(Qt::ImHints); + qApp->inputMethod()->update(Qt::ImHints); } /*! @@ -7397,7 +7397,7 @@ void QGraphicsItem::updateMicroFocus() for (int i = 0 ; i < scene()->views().count() ; ++i) { if (scene()->views().at(i) == fw) { if (qApp) - qApp->inputPanel()->update(Qt::ImQueryAll); + qApp->inputMethod()->update(Qt::ImQueryAll); #ifndef QT_NO_ACCESSIBILITY // ##### is this correct @@ -10215,9 +10215,9 @@ bool QGraphicsTextItem::sceneEvent(QEvent *event) // Reset the focus widget's input context, regardless // of how this item gained or lost focus. if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut) { - qApp->inputPanel()->reset(); + qApp->inputMethod()->reset(); } else { - qApp->inputPanel()->update(Qt::ImQueryInput); + qApp->inputMethod()->update(Qt::ImQueryInput); } break; case QEvent::ShortcutOverride: diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp index ce94f80a14..280aa7af8e 100644 --- a/src/widgets/graphicsview/qgraphicsscene.cpp +++ b/src/widgets/graphicsview/qgraphicsscene.cpp @@ -243,7 +243,7 @@ #include <QtWidgets/qstyleoption.h> #include <QtWidgets/qtooltip.h> #include <QtGui/qtransform.h> -#include <QtGui/qinputpanel.h> +#include <QtGui/qinputmethod.h> #include <QtWidgets/qgraphicseffect.h> #ifndef QT_NO_ACCESSIBILITY # include <QtGui/qaccessible.h> @@ -822,7 +822,7 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item, // the views, but if we are changing focus, we have to // do it ourselves. if (qApp) - qApp->inputPanel()->reset(); + qApp->inputMethod()->reset(); } focusItem = 0; diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index cb6a8c1e7c..c23622ac78 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -69,7 +69,7 @@ #include "qmessagebox.h" #include <QtWidgets/qgraphicsproxywidget.h> #include <QtGui/qstylehints.h> -#include <QtGui/qinputpanel.h> +#include <QtGui/qinputmethod.h> #include "qinputcontext.h" #include "private/qkeymapper_p.h" @@ -1976,7 +1976,7 @@ void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason) // or it is not created fully yet. || (focus_widget && (!focus_widget->testAttribute(Qt::WA_InputMethodEnabled) || !focus_widget->testAttribute(Qt::WA_WState_Created))))) { - qApp->inputPanel()->reset(); + qApp->inputMethod()->reset(); } #endif //QT_NO_IM @@ -3873,10 +3873,10 @@ bool QApplication::notify(QObject *receiver, QEvent *e) break; } case QEvent::RequestSoftwareInputPanel: - inputPanel()->show(); + inputMethod()->show(); break; case QEvent::CloseSoftwareInputPanel: - inputPanel()->hide(); + inputMethod()->hide(); break; #ifndef QT_NO_GESTURES @@ -4886,22 +4886,22 @@ QInputContext *QApplication::inputContext() const \since 4.2 \obsolete - Returns the current keyboard input locale. Replaced with QInputPanel::locale() + Returns the current keyboard input locale. Replaced with QInputMethod::locale() */ QLocale QApplication::keyboardInputLocale() { - return qApp ? qApp->inputPanel()->locale() : QLocale::c(); + return qApp ? qApp->inputMethod()->locale() : QLocale::c(); } /*! \since 4.2 \obsolete - Returns the current keyboard input direction. Replaced with QInputPanel::inputDirection() + Returns the current keyboard input direction. Replaced with QInputMethod::inputDirection() */ Qt::LayoutDirection QApplication::keyboardInputDirection() { - return qApp ? qApp->inputPanel()->inputDirection() : Qt::LeftToRight; + return qApp ? qApp->inputMethod()->inputDirection() : Qt::LeftToRight; } bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event) diff --git a/src/widgets/kernel/qinputcontext.cpp b/src/widgets/kernel/qinputcontext.cpp index 53e9cce553..fcbee624f5 100644 --- a/src/widgets/kernel/qinputcontext.cpp +++ b/src/widgets/kernel/qinputcontext.cpp @@ -65,7 +65,7 @@ #include "qmenu.h" #include "qtextformat.h" #include "qpalette.h" -#include <QtGui/qinputpanel.h> +#include <QtGui/qinputmethod.h> #include <QtGui/qevent.h> #include <stdlib.h> @@ -228,7 +228,7 @@ void QInputContext::setFocusWidget(QWidget *widget) void QInputContext::sendEvent(const QInputMethodEvent &event) { - QObject *focus = qApp->inputPanel()->inputItem(); + QObject *focus = qApp->inputMethod()->inputItem(); if (!focus) return; @@ -257,7 +257,7 @@ void QInputContext::sendEvent(const QInputMethodEvent &event) void QInputContext::mouseHandler(int x, QMouseEvent *event) { if (event->type() == QEvent::MouseButtonRelease) - qApp->inputPanel()->invokeAction(QInputPanel::Click, x); + qApp->inputMethod()->invokeAction(QInputMethod::Click, x); } @@ -280,7 +280,7 @@ QFont QInputContext::font() const */ void QInputContext::update() { - qApp->inputPanel()->update(Qt::ImQueryAll); + qApp->inputMethod()->update(Qt::ImQueryAll); } /*! @@ -291,7 +291,7 @@ void QInputContext::update() void QInputContext::widgetDestroyed(QWidget *widget) { Q_UNUSED(widget) - // nothing to be done here, as we use a weak pointer in the input panel + // nothing to be done here, as we use a weak pointer in the input method } /*! @@ -316,7 +316,7 @@ void QInputContext::widgetDestroyed(QWidget *widget) */ void QInputContext::reset() { - qApp->inputPanel()->reset(); + qApp->inputMethod()->reset(); } diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 321a374652..2a7497947d 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -78,7 +78,7 @@ #include "qinputcontext.h" #include "qfileinfo.h" #include "private/qsoftkeymanager_p.h" -#include <QtGui/qinputpanel.h> +#include <QtGui/qinputmethod.h> #include <private/qgraphicseffect_p.h> #include <qbackingstore.h> @@ -354,7 +354,7 @@ void QWidgetPrivate::updateWidgetTransform() QTransform t; QPoint p = q->mapTo(q->topLevelWidget(), QPoint(0,0)); t.translate(p.x(), p.y()); - qApp->inputPanel()->setInputItemTransform(t); + qApp->inputMethod()->setInputItemTransform(t); } } @@ -3106,10 +3106,10 @@ void QWidgetPrivate::setEnabled_helper(bool enable) if (enable) { if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) - qApp->inputPanel()->update(Qt::ImEnabled); + qApp->inputMethod()->update(Qt::ImEnabled); } else { - qApp->inputPanel()->reset(); - qApp->inputPanel()->update(Qt::ImEnabled); + qApp->inputMethod()->reset(); + qApp->inputMethod()->update(Qt::ImEnabled); } } #endif //QT_NO_IM @@ -8811,7 +8811,7 @@ void QWidget::setInputMethodHints(Qt::InputMethodHints hints) #ifndef QT_NO_IM Q_D(QWidget); d->imHints = hints; - qApp->inputPanel()->update(Qt::ImHints); + qApp->inputMethod()->update(Qt::ImHints); #endif //QT_NO_IM } @@ -10030,8 +10030,8 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) QWidget *focusWidget = d->effectiveFocusWidget(); if (on && !internalWinId() && hasFocus() && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) { - qApp->inputPanel()->reset(); - qApp->inputPanel()->update(Qt::ImEnabled); + qApp->inputMethod()->reset(); + qApp->inputMethod()->update(Qt::ImEnabled); } if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget() #ifdef Q_WS_MAC @@ -10045,7 +10045,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) d->createWinId(); if (isEnabled() && focusWidget->isEnabled() && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) { - qApp->inputPanel()->update(Qt::ImEnabled); + qApp->inputMethod()->update(Qt::ImEnabled); } #endif //QT_NO_IM break; @@ -10080,8 +10080,8 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) #ifndef QT_NO_IM if (qApp->focusObject() == this) { if (!on) - qApp->inputPanel()->reset(); - qApp->inputPanel()->update(Qt::ImEnabled); + qApp->inputMethod()->reset(); + qApp->inputMethod()->update(Qt::ImEnabled); } #endif //QT_NO_IM break; @@ -10513,7 +10513,7 @@ void QWidget::setShortcutAutoRepeat(int id, bool enable) void QWidget::updateMicroFocus() { // updating everything since this is currently called for any kind of state change - qApp->inputPanel()->update(Qt::ImQueryAll); + qApp->inputMethod()->update(Qt::ImQueryAll); #ifndef QT_NO_ACCESSIBILITY if (isVisible()) { diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index e600908e27..0da0c65aaa 100644 --- a/src/widgets/kernel/qwidget_p.h +++ b/src/widgets/kernel/qwidget_p.h @@ -59,7 +59,7 @@ #include "QtCore/qlocale.h" #include "QtCore/qset.h" #include "QtGui/qregion.h" -#include "QtGui/qinputpanel.h" +#include "QtGui/qinputmethod.h" #include "QtWidgets/qsizepolicy.h" #include "QtWidgets/qstyle.h" #include "QtWidgets/qapplication.h" @@ -416,7 +416,7 @@ public: void syncBackingStore(); void syncBackingStore(const QRegion ®ion); - // tells the input panel about the widgets transform + // tells the input method about the widgets transform void updateWidgetTransform(); void reparentFocusWidgets(QWidget *oldtlw); @@ -573,7 +573,7 @@ public: QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel( q->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) { - qApp->inputPanel()->show(); + qApp->inputMethod()->show(); } } } diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index a3958cfd1a..d6af8d6044 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2458,7 +2458,7 @@ void QComboBox::showPopup() } if (qApp) { - qApp->inputPanel()->reset(); + qApp->inputMethod()->reset(); } QScrollBar *sb = view()->horizontalScrollBar(); diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index bd4fcf6159..77d6f5422a 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1202,7 +1202,7 @@ void QLineEdit::insert(const QString &newText) void QLineEdit::clear() { Q_D(QLineEdit); - d->resetInputPanel(); + d->resetInputMethod(); d->control->clear(); } @@ -1215,7 +1215,7 @@ void QLineEdit::clear() void QLineEdit::undo() { Q_D(QLineEdit); - d->resetInputPanel(); + d->resetInputMethod(); d->control->undo(); } @@ -1226,7 +1226,7 @@ void QLineEdit::undo() void QLineEdit::redo() { Q_D(QLineEdit); - d->resetInputPanel(); + d->resetInputMethod(); d->control->redo(); } diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index 5687abde3c..e3404a62de 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -51,7 +51,7 @@ #include "qaccessible.h" #endif #ifndef QT_NO_IM -#include "qinputpanel.h" +#include "qinputmethod.h" #include "qlist.h" #endif @@ -242,17 +242,17 @@ void QLineEditPrivate::updatePasswordEchoEditing(bool editing) q->setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod()); } -void QLineEditPrivate::resetInputPanel() +void QLineEditPrivate::resetInputMethod() { Q_Q(QLineEdit); if (q->hasFocus() && qApp) { - qApp->inputPanel()->reset(); + qApp->inputMethod()->reset(); } } /*! This function is not intended as polymorphic usage. Just a shared code - fragment that calls QInputPanel::invokeAction for this + fragment that calls QInputMethod::invokeAction for this class. */ bool QLineEditPrivate::sendMouseEventToInputContext( QMouseEvent *e ) @@ -266,7 +266,7 @@ bool QLineEditPrivate::sendMouseEventToInputContext( QMouseEvent *e ) if (mousePos >= 0) { if (e->type() == QEvent::MouseButtonRelease) - qApp->inputPanel()->invokeAction(QInputPanel::Click, mousePos); + qApp->inputMethod()->invokeAction(QInputMethod::Click, mousePos); return true; } diff --git a/src/widgets/widgets/qlineedit_p.h b/src/widgets/widgets/qlineedit_p.h index 0b4f3ba232..3b7a0d1b91 100644 --- a/src/widgets/widgets/qlineedit_p.h +++ b/src/widgets/widgets/qlineedit_p.h @@ -102,7 +102,7 @@ public: void updatePasswordEchoEditing(bool); - void resetInputPanel(); + void resetInputMethod(); inline bool shouldEnableInputMethod() const { diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index c774198d8f..2f5793bcba 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -206,7 +206,7 @@ void QWidgetLineControl::commitPreedit() if (!composeMode()) return; - qApp->inputPanel()->reset(); + qApp->inputMethod()->reset(); if (!m_tentativeCommit.isEmpty()) { internalInsert(m_tentativeCommit); diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index 566b930024..1d955363e6 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -62,7 +62,7 @@ #include "QtWidgets/qstyleoption.h" #include "QtCore/qpointer.h" #include "QtGui/qclipboard.h" -#include "QtGui/qinputpanel.h" +#include "QtGui/qinputmethod.h" #include "QtCore/qpoint.h" #include "QtWidgets/qcompleter.h" #include "QtCore/qthread.h" @@ -232,7 +232,7 @@ public: void setText(const QString &txt) { if (composeMode()) - qApp->inputPanel()->reset(); + qApp->inputMethod()->reset(); m_tentativeCommit.clear(); internalSetText(txt, -1, false); } @@ -318,7 +318,7 @@ public: Qt::LayoutDirection layoutDirection() const { if (m_layoutDirection == Qt::LayoutDirectionAuto) { if (m_text.isEmpty()) - return qApp->inputPanel()->inputDirection(); + return qApp->inputMethod()->inputDirection(); return m_text.isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight; } return m_layoutDirection; diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index e4f461db76..96389b8333 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -75,7 +75,7 @@ #include <qvariant.h> #include <qurl.h> #include <qdesktopservices.h> -#include <qinputpanel.h> +#include <qinputmethod.h> #include <qtooltip.h> #include <qstyleoption.h> #include <QtWidgets/qlineedit.h> @@ -1689,7 +1689,7 @@ void QWidgetTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button _q_updateCurrentCharFormatAndSelection(); #ifndef QT_NO_IM if (contextWidget) - qApp->inputPanel()->update(Qt::ImQueryInput); + qApp->inputMethod()->update(Qt::ImQueryInput); #endif //QT_NO_IM } else { //emit q->visibilityRequest(QRectF(mousePos, QSizeF(1, 1))); @@ -1836,7 +1836,7 @@ bool QWidgetTextControlPrivate::sendMouseEventToInputContext( if (cursorPos >= 0) { if (e->type() == QEvent::MouseButtonRelease) - qApp->inputPanel()->invokeAction(QInputPanel::Click, cursorPos); + qApp->inputMethod()->invokeAction(QInputMethod::Click, cursorPos); e->setAccepted(true); return true; @@ -2755,7 +2755,7 @@ void QWidgetTextControlPrivate::commitPreedit() return; cursor.beginEditBlock(); - qApp->inputPanel()->reset(); + qApp->inputMethod()->reset(); if (!tentativeCommit.isEmpty()) { cursor.insertText(tentativeCommit); |