Removed obsolete custom input context support
Removed from QWidgetPrivate and QWidgetTextControl. Now using only application specific input context. Change-Id: Id25882e72026f58dab51a18e5d04a11225429963 Reviewed-on: http://codereview.qt-project.org/6427 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>bb10
parent
e5ce564b1d
commit
76ca6642a9
|
|
@ -372,15 +372,6 @@ void QWidgetPrivate::updateWidgetTransform()
|
|||
}
|
||||
}
|
||||
|
||||
QInputContext *QWidgetPrivate::inputContext() const
|
||||
{
|
||||
#ifndef QT_NO_IM
|
||||
return qApp->inputContext();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
This function returns the QInputContext for this widget. By
|
||||
default the input context is inherited from the widgets
|
||||
|
|
@ -397,7 +388,7 @@ QInputContext *QWidget::inputContext()
|
|||
if (!testAttribute(Qt::WA_InputMethodEnabled))
|
||||
return 0;
|
||||
|
||||
return d->inputContext();
|
||||
return qApp->inputContext();
|
||||
}
|
||||
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@
|
|||
#endif
|
||||
|
||||
#if defined(Q_WS_QWS)
|
||||
#include "QtWidgets/qinputcontext.h"
|
||||
#include "QtGui/qscreen_qws.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -569,7 +568,6 @@ public:
|
|||
// sub-classes that their internals are about to be released.
|
||||
virtual void aboutToDestroy() {}
|
||||
|
||||
QInputContext *inputContext() const;
|
||||
inline QWidget *effectiveFocusWidget() {
|
||||
QWidget *w = q_func();
|
||||
while (w->focusProxy())
|
||||
|
|
@ -699,7 +697,6 @@ public:
|
|||
static QWidgetMapper *mapper;
|
||||
static QWidgetSet *allWidgets;
|
||||
#if !defined(QT_NO_IM)
|
||||
QPointer<QInputContext> ic;
|
||||
Qt::InputMethodHints imHints;
|
||||
#endif
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
|
|
|
|||
|
|
@ -1658,7 +1658,7 @@ void QWidgetTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button
|
|||
_q_updateCurrentCharFormatAndSelection();
|
||||
#ifndef QT_NO_IM
|
||||
if (contextWidget) {
|
||||
if (QInputContext *ic = inputContext()) {
|
||||
if (QInputContext *ic = qApp->inputContext()) {
|
||||
ic->update();
|
||||
}
|
||||
}
|
||||
|
|
@ -1789,7 +1789,7 @@ bool QWidgetTextControlPrivate::sendMouseEventToInputContext(
|
|||
|
||||
QTextLayout *layout = cursor.block().layout();
|
||||
if (contextWidget && layout && !layout->preeditAreaText().isEmpty()) {
|
||||
QInputContext *ctx = inputContext();
|
||||
QInputContext *ctx = qApp->inputContext();
|
||||
int cursorPos = q->hitTest(pos, Qt::FuzzyHit) - cursor.position();
|
||||
|
||||
if (cursorPos < 0 || cursorPos > layout->preeditAreaText().length()) {
|
||||
|
|
@ -2140,7 +2140,7 @@ QMenu *QWidgetTextControl::createStandardContextMenu(const QPointF &pos, QWidget
|
|||
|
||||
#if !defined(QT_NO_IM)
|
||||
if (d->contextWidget) {
|
||||
QInputContext *qic = d->inputContext();
|
||||
QInputContext *qic = qApp->inputContext();
|
||||
if (qic) {
|
||||
QList<QAction *> imActions = qic->actions();
|
||||
for (int i = 0; i < imActions.size(); ++i)
|
||||
|
|
@ -3028,14 +3028,6 @@ void QWidgetTextControlPrivate::_q_copyLink()
|
|||
#endif
|
||||
}
|
||||
|
||||
QInputContext *QWidgetTextControlPrivate::inputContext()
|
||||
{
|
||||
QInputContext *ctx = contextWidget->inputContext();
|
||||
if (!ctx && contextWidget->parentWidget())
|
||||
ctx = contextWidget->parentWidget()->inputContext();
|
||||
return ctx;
|
||||
}
|
||||
|
||||
int QWidgetTextControl::hitTest(const QPointF &point, Qt::HitTestAccuracy accuracy) const
|
||||
{
|
||||
Q_D(const QWidgetTextControl);
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QMimeData;
|
||||
class QAbstractScrollArea;
|
||||
class QInputContext;
|
||||
|
||||
class QWidgetTextControlPrivate : public QObjectPrivate
|
||||
{
|
||||
|
|
@ -172,8 +171,6 @@ public:
|
|||
|
||||
void append(const QString &text, Qt::TextFormat format = Qt::AutoText);
|
||||
|
||||
QInputContext *inputContext();
|
||||
|
||||
QTextDocument *doc;
|
||||
bool cursorOn;
|
||||
QTextCursor cursor;
|
||||
|
|
|
|||
Loading…
Reference in New Issue