summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2012-02-01 09:43:18 +0200
committerQt by Nokia <qt-info@nokia.com>2012-02-03 11:01:34 +0100
commitc802a5d272cde1f18a8debfb50b02ab1c682c2fc (patch)
tree995138a95baa7a285d5912f6bd9fe8c24f38a405 /src
parent0160f58d4ba5efd3beacaca3ce122554a90f1eb4 (diff)
Remove QInputContext
This has only been around as compatibility interface for Qt4 but is now replaced by QPlatformInputContext. Change-Id: I677dbbea46311bf39f6c5ca9dc3fb5009abe924a Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qevent.cpp2
-rw-r--r--src/tools/uic/qclass_lib_map.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp10
-rw-r--r--src/widgets/kernel/kernel.pri2
-rw-r--r--src/widgets/kernel/qapplication.cpp38
-rw-r--r--src/widgets/kernel/qapplication.h6
-rw-r--r--src/widgets/kernel/qapplication_p.h7
-rw-r--r--src/widgets/kernel/qapplication_qpa.cpp7
-rw-r--r--src/widgets/kernel/qinputcontext.cpp414
-rw-r--r--src/widgets/kernel/qinputcontext.h127
-rw-r--r--src/widgets/kernel/qwidget.cpp25
-rw-r--r--src/widgets/kernel/qwidget.h3
-rw-r--r--src/widgets/styles/qstyle.cpp2
13 files changed, 9 insertions, 638 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 502ec304df..543f5453ff 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -1510,7 +1510,7 @@ QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos)
Cursor attributes and render them as specified.
\endlist
- \sa QInputContext
+ \sa QInputMethod
*/
/*!
diff --git a/src/tools/uic/qclass_lib_map.h b/src/tools/uic/qclass_lib_map.h
index f0f1c8ae16..11be47ce64 100644
--- a/src/tools/uic/qclass_lib_map.h
+++ b/src/tools/uic/qclass_lib_map.h
@@ -678,10 +678,6 @@ QT_CLASS_LIB(QPictureFormatInterface, QtGui, qpictureformatplugin.h)
QT_CLASS_LIB(QPictureFormatPlugin, QtGui, qpictureformatplugin.h)
QT_CLASS_LIB(QPixmap, QtGui, qpixmap.h)
QT_CLASS_LIB(QPixmapCache, QtGui, qpixmapcache.h)
-QT_CLASS_LIB(QInputContext, QtWidgets, qinputcontext.h)
-QT_CLASS_LIB(QInputContextFactory, QtWidgets, qinputcontextfactory.h)
-QT_CLASS_LIB(QInputContextFactoryInterface, QtWidgets, qinputcontextplugin.h)
-QT_CLASS_LIB(QInputContextPlugin, QtWidgets, qinputcontextplugin.h)
QT_CLASS_LIB(QAbstractItemDelegate, QtWidgets, qabstractitemdelegate.h)
QT_CLASS_LIB(QAbstractItemView, QtWidgets, qabstractitemview.h)
QT_CLASS_LIB(QAbstractProxyModel, QtWidgets, qabstractproxymodel.h)
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 7fc7c3db02..ba3b4962e7 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -7327,7 +7327,7 @@ void QGraphicsItem::inputMethodEvent(QInputMethodEvent *event)
surrounding text and reconversions. \a query specifies which
property is queried.
- \sa inputMethodEvent(), QInputMethodEvent, QInputContext
+ \sa inputMethodEvent(), QInputMethodEvent
*/
QVariant QGraphicsItem::inputMethodQuery(Qt::InputMethodQuery query) const
{
@@ -7354,7 +7354,7 @@ QVariant QGraphicsItem::inputMethodQuery(Qt::InputMethodQuery query) const
\since 4.6
- \sa setInputMethodHints(), inputMethodQuery(), QInputContext
+ \sa setInputMethodHints(), inputMethodQuery()
*/
Qt::InputMethodHints QGraphicsItem::inputMethodHints() const
{
@@ -7367,7 +7367,7 @@ Qt::InputMethodHints QGraphicsItem::inputMethodHints() const
\since 4.6
- \sa inputMethodHints(), inputMethodQuery(), QInputContext
+ \sa inputMethodHints(), inputMethodQuery()
*/
void QGraphicsItem::setInputMethodHints(Qt::InputMethodHints hints)
{
@@ -7387,7 +7387,7 @@ void QGraphicsItem::setInputMethodHints(Qt::InputMethodHints hints)
\since 4.7
- \sa QInputContext
+ \sa QInputMethod
*/
void QGraphicsItem::updateMicroFocus()
{
@@ -7695,7 +7695,7 @@ void QGraphicsObject::ungrabGesture(Qt::GestureType gesture)
\since 4.7
- \sa QInputContext
+ \sa QInputMethod
*/
void QGraphicsObject::updateMicroFocus()
{
diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri
index 1a28000aff..32934dc705 100644
--- a/src/widgets/kernel/kernel.pri
+++ b/src/widgets/kernel/kernel.pri
@@ -20,7 +20,6 @@ HEADERS += \
kernel/qiconloader_p.h \
kernel/qiconengine.h \
kernel/qiconengineplugin.h \
- kernel/qinputcontext.h \
kernel/qlayout.h \
kernel/qlayout_p.h \
kernel/qlayoutengine_p.h \
@@ -58,7 +57,6 @@ SOURCES += \
kernel/qiconloader.cpp \
kernel/qiconengine.cpp \
kernel/qiconengineplugin.cpp \
- kernel/qinputcontext.cpp \
kernel/qlayout.cpp \
kernel/qlayoutengine.cpp \
kernel/qlayoutitem.cpp \
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index c23622ac78..ae15c9f62a 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -71,7 +71,6 @@
#include <QtGui/qstylehints.h>
#include <QtGui/qinputmethod.h>
-#include "qinputcontext.h"
#include "private/qkeymapper_p.h"
#ifdef Q_WS_X11
@@ -141,8 +140,6 @@ Q_CORE_EXPORT void qt_call_post_routines();
QApplicationPrivate *QApplicationPrivate::self = 0;
-QInputContext *QApplicationPrivate::inputContext = 0;
-
#ifdef Q_WS_WINCE
int QApplicationPrivate::autoMaximizeThreshold = -1;
bool QApplicationPrivate::autoSipEnabled = false;
@@ -4847,41 +4844,6 @@ int QApplication::keyboardInputInterval()
\sa QCoreApplication::instance()
*/
-#ifndef QT_NO_IM
-// ************************************************************************
-// Input Method support
-// ************************************************************************
-
-/*
- This function replaces the QInputContext instance used by the application
- with \a inputContext.
-
- Qt takes ownership of the given \a inputContext.
-*/
-void QApplicationPrivate::setInputContext(QInputContext *newInputContext)
-{
- Q_Q(QApplication);
-
- if (newInputContext == inputContext)
- return;
- if (!newInputContext) {
- qWarning("QApplicationPrivate::setInputContext: called with 0 input context");
- return;
- }
- delete inputContext;
- inputContext = newInputContext;
- inputContext->setParent(q);
-}
-
-/*!
- Returns the QInputContext instance used by the application.
-*/
-QInputContext *QApplication::inputContext() const
-{
- return QApplicationPrivate::inputContext;
-}
-#endif // QT_NO_IM
-
/*!
\since 4.2
\obsolete
diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
index ace557bfb7..b613b0f7c0 100644
--- a/src/widgets/kernel/qapplication.h
+++ b/src/widgets/kernel/qapplication.h
@@ -62,7 +62,6 @@ class QDesktopWidget;
class QStyle;
class QEventLoop;
class QIcon;
-class QInputContext;
template <typename T> class QList;
class QLocale;
class QPlatformNativeInterface;
@@ -220,10 +219,6 @@ public:
virtual void saveState(QSessionManager& sm);
#endif
-#ifndef QT_NO_IM
- QInputContext *inputContext() const;
-#endif
-
QT_DEPRECATED static QLocale keyboardInputLocale();
QT_DEPRECATED static Qt::LayoutDirection keyboardInputDirection();
@@ -300,7 +295,6 @@ private:
friend class QAction;
#if defined(Q_WS_QWS)
- friend class QInputContext;
friend class QWSDirectPainterSurface;
friend class QDirectPainter;
friend class QDirectPainterPrivate;
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index b6fbfa1684..601c511438 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -79,7 +79,6 @@ QT_BEGIN_NAMESPACE
class QClipboard;
class QGraphicsScene;
-class QInputContext;
class QObject;
class QWidget;
class QSocketNotifier;
@@ -249,12 +248,6 @@ public:
QPoint toolTipPos, toolTipGlobalPos, hoverGlobalPos;
QPointer<QWidget> toolTipWidget;
-#ifndef QT_NO_IM
- void setInputContext(QInputContext *);
-#endif
-
- static QInputContext *inputContext;
-
static Qt::MouseButtons mouse_buttons;
static Qt::KeyboardModifiers modifier_buttons;
diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp
index e3429dc17c..e221df7ef7 100644
--- a/src/widgets/kernel/qapplication_qpa.cpp
+++ b/src/widgets/kernel/qapplication_qpa.cpp
@@ -54,7 +54,6 @@
#include "private/qplatformintegrationfactory_qpa_p.h"
#include <qdesktopwidget.h>
-#include <qinputcontext.h>
#include <QPlatformCursor>
#include <qdebug.h>
#include <QWindowSystemInterface>
@@ -395,10 +394,6 @@ void qt_init(QApplicationPrivate *priv, int type)
QColormap::initialize();
qApp->setObjectName(appName);
-
-#ifndef QT_NO_QWS_INPUTMETHODS
- priv->setInputContext(new QInputContext(qApp));
-#endif
}
#ifdef Q_OS_WIN
@@ -418,8 +413,6 @@ void qt_cleanup()
{
QPixmapCache::clear();
QColormap::cleanup();
- delete QApplicationPrivate::inputContext;
- QApplicationPrivate::inputContext = 0;
QApplicationPrivate::active_window = 0; //### this should not be necessary
#ifdef Q_OS_WIN
diff --git a/src/widgets/kernel/qinputcontext.cpp b/src/widgets/kernel/qinputcontext.cpp
deleted file mode 100644
index fcbee624f5..0000000000
--- a/src/widgets/kernel/qinputcontext.cpp
+++ /dev/null
@@ -1,414 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/****************************************************************************
-**
-** Implementation of QInputContext class
-**
-** Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved.
-**
-** This file is written to contribute to Nokia Corporation and/or its subsidiary(-ies) under their own
-** license. You may use this file under your Qt license. Following
-** description is copied from their original file headers. Contact
-** immodule-qt@freedesktop.org if any conditions of this licensing are
-** not clear to you.
-**
-****************************************************************************/
-
-//#define QT_NO_IM_PREEDIT_RELOCATION
-
-#include "qinputcontext.h"
-
-#ifndef QT_NO_IM
-
-#include "qplatformdefs.h"
-
-#include "qapplication.h"
-#include "qmenu.h"
-#include "qtextformat.h"
-#include "qpalette.h"
-#include <QtGui/qinputmethod.h>
-#include <QtGui/qevent.h>
-
-#include <stdlib.h>
-#include <limits.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QInputContext
- \brief The QInputContext class abstracts the input method dependent data and composing state.
-
- \ingroup i18n
- \inmodule QtWidgets
-
- An input method is responsible for inputting complex text that cannot
- be inputted via simple keymap. It converts a sequence of input
- events (typically key events) into a text string through the input
- method specific converting process. The class of the processes are
- widely ranging from simple finite state machine to complex text
- translator that pools a whole paragraph of a text with text
- editing capability to perform grammar and semantic analysis.
-
- To abstract such different input method specific intermediate
- information, Qt offers the QInputContext as base class. The
- concept is well known as 'input context' in the input method
- domain. An input context is created for a text widget in response
- to a demand. It is ensured that an input context is prepared for
- an input method before input to a text widget.
-
- Multiple input contexts that belong to a single input method
- may concurrently coexist. Suppose multi-window text editor. Each
- text widget of window A and B holds different QInputContext
- instance which contains different state information such as
- partially composed text.
-
- \section1 Groups of Functions
-
- \table
- \header \o Context \o Functions
-
- \row \o Receiving information \o
- x11FilterEvent(),
- filterEvent(),
- mouseHandler()
-
- \row \o Sending back composed text \o
- sendEvent()
-
- \row \o State change notification \o
- setFocusWidget(),
- reset()
-
- \row \o Context information \o
- identifierName(),
- language(),
- font(),
- isComposing()
-
- \endtable
-
- \section1 Licensing Information
-
- \legalese
- Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved.
-
- This file is written to contribute to Nokia Corporation and/or its subsidiary(-ies) under their own
- license. You may use this file under your Qt license. Following
- description is copied from their original file headers. Contact
- immodule-qt@freedesktop.org if any conditions of this licensing are
- not clear to you.
- \endlegalese
-
- \sa QInputContextPlugin, QInputContextFactory, QApplication::setInputContext()
-*/
-
-/*!
- Constructs an input context with the given \a parent.
-*/
-QInputContext::QInputContext(QObject* parent)
- : QObject(parent)
-{
-}
-
-
-/*!
- Destroys the input context.
-*/
-QInputContext::~QInputContext()
-{
-}
-
-/*!
- Returns the widget that has an input focus for this input
- context.
-
- The return value may differ from holderWidget() if the input
- context is shared between several text widgets.
-
- \warning To ensure platform independence and support flexible
- configuration of widgets, ordinary input methods should not call
- this function directly.
-
- \sa setFocusWidget()
-*/
-QWidget *QInputContext::focusWidget() const
-{
- bool enabled = false;
- if (qApp->focusWidget()) {
- QInputMethodQueryEvent query(Qt::ImEnabled);
- QGuiApplication::sendEvent(qApp->focusWidget(), &query);
- enabled = query.value(Qt::ImEnabled).toBool();
- }
- return enabled ? qobject_cast<QWidget *>(qApp->focusWidget()) : 0;
-}
-
-
-/*!
- Sets the \a widget that has an input focus for this input context.
-
- \warning Ordinary input methods must not call this function
- directly.
-
- \sa focusWidget()
-*/
-void QInputContext::setFocusWidget(QWidget *widget)
-{
- // not honored
-}
-
-/*!
- \fn bool QInputContext::isComposing() const
- \obsolete
-
- This function indicates whether InputMethodStart event had been
- sent to the current focus widget. It is ensured that an input
- context can send InputMethodCompose or InputMethodEnd event safely
- if this function returned true.
-
- The state is automatically being tracked through sendEvent().
-
- \sa sendEvent()
-*/
-
-
-/*!
- Sends an input method event specified by \a event to the current focus
- widget. Implementations of QInputContext should call this method to
- send the generated input method events and not
- QApplication::sendEvent(), as the events might have to get dispatched
- to a different application on some platforms.
-
- Some complex input methods route the handling to several child
- contexts (e.g. to enable language switching). To account for this,
- QInputContext will check if the parent object is a QInputContext. If
- yes, it will call the parents sendEvent() implementation instead of
- sending the event directly.
-
- \sa QInputMethodEvent
-*/
-void QInputContext::sendEvent(const QInputMethodEvent &event)
-{
-
- QObject *focus = qApp->inputMethod()->inputItem();
- if (!focus)
- return;
-
- QInputMethodEvent e(event);
- QApplication::sendEvent(focus, &e);
-}
-
-
-/*!
- This function can be reimplemented in a subclass to handle mouse
- press, release, double-click, and move events within the preedit
- text. You can use the function to implement mouse-oriented user
- interface such as text selection or popup menu for candidate
- selection.
-
- The \a x parameter is the offset within the string that was sent
- with the InputMethodCompose event. The alteration boundary of \a
- x is ensured as character boundary of preedit string accurately.
-
- The \a event parameter is the event that was sent to the editor
- widget. The event type is QEvent::MouseButtonPress,
- QEvent::MouseButtonRelease, QEvent::MouseButtonDblClick or
- QEvent::MouseMove. The event's button and state indicate
- the kind of operation that was performed.
-*/
-void QInputContext::mouseHandler(int x, QMouseEvent *event)
-{
- if (event->type() == QEvent::MouseButtonRelease)
- qApp->inputMethod()->invokeAction(QInputMethod::Click, x);
-}
-
-
-/*!
- Returns the font of the current input widget
-*/
-QFont QInputContext::font() const
-{
- QWidget *focus = focusWidget();
- if (!focus)
- return QApplication::font();
-
- return qvariant_cast<QFont>(focus->inputMethodQuery(Qt::ImFont));
-}
-
-/*!
- This virtual function is called when a state in the focus widget
- has changed. QInputContext can then use
- QWidget::inputMethodQuery() to query the new state of the widget.
-*/
-void QInputContext::update()
-{
- qApp->inputMethod()->update(Qt::ImQueryAll);
-}
-
-/*!
- This virtual function is called when the specified \a widget is
- destroyed. The \a widget is a widget on which this input context
- is installed.
-*/
-void QInputContext::widgetDestroyed(QWidget *widget)
-{
- Q_UNUSED(widget)
- // nothing to be done here, as we use a weak pointer in the input method
-}
-
-/*!
- \fn void QInputContext::reset()
-
- This function can be reimplemented in a subclass to reset the
- state of the input method.
-
- This function is called by several widgets to reset input
- state. For example, a text widget call this function before
- inserting a text to make widget ready to accept a text.
-
- Default implementation is sufficient for simple input method. You
- can override this function to reset external input method engines
- in complex input method. In the case, call QInputContext::reset()
- to ensure proper termination of inputting.
-
- In a reimplementation of reset(), you must not send any
- QInputMethodEvent containing preedit text. You can only commit
- string and attributes; otherwise, you risk breaking input state
- consistency.
-*/
-void QInputContext::reset()
-{
- qApp->inputMethod()->reset();
-}
-
-
-/*!
- \fn QString QInputContext::identifierName()
-
- This function must be implemented in any subclasses to return the
- identifier name of the input method.
-
- Return value is the name to identify and specify input methods for
- the input method switching mechanism and so on. The name has to be
- consistent with QInputContextPlugin::keys(). The name has to
- consist of ASCII characters only.
-
- There are two different names with different responsibility in the
- input method domain. This function returns one of them. Another
- name is called 'display name' that stands for the name for
- endusers appeared in a menu and so on.
-
- \sa QInputContextPlugin::keys(), QInputContextPlugin::displayName()
-*/
-QString QInputContext::identifierName()
-{
- return QLatin1String("qpa");
-}
-
-
-/*!
- \fn QString QInputContext::language()
-
- This function must be implemented in any subclasses to return a
- language code (e.g. "zh_CN", "zh_TW", "zh_HK", "ja", "ko", ...)
- of the input context. If the input context can handle multiple
- languages, return the currently used one. The name has to be
- consistent with QInputContextPlugin::language().
-
- This information will be used by language tagging feature in
- QInputMethodEvent. It is required to distinguish unified han characters
- correctly. It enables proper font and character code
- handling. Suppose CJK-awared multilingual web browser
- (that automatically modifies fonts in CJK-mixed text) and XML editor
- (that automatically inserts lang attr).
-*/
-QString QInputContext::language()
-{
- return QString();
-}
-
-
-/*!
- This is a preliminary interface for Qt 4.
-*/
-QList<QAction *> QInputContext::actions()
-{
- return QList<QAction *>();
-}
-
-/*!
- \enum QInputContext::StandardFormat
-
- \value PreeditFormat The preedit text.
- \value SelectionFormat The selection text.
-
- \sa standardFormat()
-*/
-
-/*!
- Returns a QTextFormat object that specifies the format for
- component \a s.
-*/
-QTextFormat QInputContext::standardFormat(StandardFormat s) const
-{
- QWidget *focus = focusWidget();
- const QPalette &pal = focus ? focus->palette() : QApplication::palette();
-
- QTextCharFormat fmt;
- QColor bg;
- switch (s) {
- case QInputContext::PreeditFormat: {
- fmt.setUnderlineStyle(QTextCharFormat::DashUnderline);
- break;
- }
- case QInputContext::SelectionFormat: {
- bg = pal.text().color();
- fmt.setBackground(QBrush(bg));
- fmt.setForeground(pal.background());
- break;
- }
- }
- return fmt;
-}
-
-QT_END_NAMESPACE
-
-#endif //Q_NO_IM
diff --git a/src/widgets/kernel/qinputcontext.h b/src/widgets/kernel/qinputcontext.h
deleted file mode 100644
index b199c91575..0000000000
--- a/src/widgets/kernel/qinputcontext.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/****************************************************************************
-**
-** Definition of QInputContext class
-**
-** Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved.
-**
-** This file is written to contribute to Nokia Corporation and/or its subsidiary(-ies) under their own
-** license. You may use this file under your Qt license. Following
-** description is copied from their original file headers. Contact
-** immodule-qt@freedesktop.org if any conditions of this licensing are
-** not clear to you.
-**
-****************************************************************************/
-
-#ifndef QINPUTCONTEXT_H
-#define QINPUTCONTEXT_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qglobal.h>
-#include <QtGui/qevent.h>
-#include <QtCore/qstring.h>
-#include <QtCore/qlist.h>
-#include <QtWidgets/qaction.h>
-
-#ifndef QT_NO_IM
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class QWidget;
-class QFont;
-class QPopupMenu;
-class QInputContextPrivate;
-
-class Q_WIDGETS_EXPORT QInputContext : public QObject
-{
- Q_OBJECT
-public:
- explicit QInputContext(QObject* parent = 0);
- virtual ~QInputContext();
-
- virtual QString identifierName();
- virtual QString language();
-
- virtual void reset();
- virtual void update();
-
- virtual void mouseHandler( int x, QMouseEvent *event);
- virtual QFont font() const;
-
- QWidget *focusWidget() const;
- virtual void setFocusWidget( QWidget *w );
-
- virtual void widgetDestroyed(QWidget *w);
-
- virtual QList<QAction *> actions();
-
- void sendEvent(const QInputMethodEvent &event);
-
- virtual bool isComposing() const { return false; }
-
- enum StandardFormat {
- PreeditFormat,
- SelectionFormat
- };
- QTextFormat standardFormat(StandardFormat s) const;
-private:
- friend class QWidget;
- friend class QWidgetPrivate;
- friend class QInputContextFactory;
- friend class QApplication;
-private: // Disabled copy constructor and operator=
- QInputContext( const QInputContext & );
- QInputContext &operator=( const QInputContext & );
-
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif //Q_NO_IM
-
-#endif // QINPUTCONTEXT_H
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 2a7497947d..4709a89d27 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -75,7 +75,6 @@
#include "qdebug.h"
#include "private/qstylesheetstyle_p.h"
#include "private/qstyle_p.h"
-#include "qinputcontext.h"
#include "qfileinfo.h"
#include "private/qsoftkeymanager_p.h"
#include <QtGui/qinputmethod.h>
@@ -358,24 +357,6 @@ void QWidgetPrivate::updateWidgetTransform()
}
}
-/*!
- This function returns the QInputContext for this widget. By
- default the input context is inherited from the widgets
- parent. For toplevels it is inherited from QApplication.
-
- You can override this and set a special input context for this
- widget by using the setInputContext() method.
-
- \sa setInputContext()
-*/
-QInputContext *QWidget::inputContext()
-{
- if (!testAttribute(Qt::WA_InputMethodEnabled))
- return 0;
-
- return qApp->inputContext();
-}
-
#ifdef QT_KEYPAD_NAVIGATION
QPointer<QWidget> QWidgetPrivate::editingWidget;
@@ -8752,7 +8733,7 @@ void QWidget::inputMethodEvent(QInputMethodEvent *event)
\a query specifies which property is queried.
- \sa inputMethodEvent(), QInputMethodEvent, QInputContext, inputMethodHints
+ \sa inputMethodEvent(), QInputMethodEven, inputMethodHints
*/
QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const
{
@@ -8790,7 +8771,7 @@ QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const
\since 4.6
- \sa inputMethodQuery(), QInputContext
+ \sa inputMethodQuery()
*/
Qt::InputMethodHints QWidget::inputMethodHints() const
{
@@ -10507,8 +10488,6 @@ void QWidget::setShortcutAutoRepeat(int id, bool enable)
/*!
Updates the widget's micro focus.
-
- \sa QInputContext
*/
void QWidget::updateMicroFocus()
{
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index f24941d856..0f13d0b7f6 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -90,7 +90,6 @@ class QDragLeaveEvent;
class QDropEvent;
class QShowEvent;
class QHideEvent;
-class QInputContext;
class QIcon;
class QBackingStore;
class QPlatformWindow;
@@ -599,8 +598,6 @@ public:
void ensurePolished() const;
- QInputContext *inputContext();
-
bool isAncestorOf(const QWidget *child) const;
#ifdef QT_KEYPAD_NAVIGATION
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index e323cdc8b6..3ff5aea0ca 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1594,7 +1594,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value RSIP_OnMouseClick Requests an input panel if the user clicks on the
widget.
- \sa QEvent::RequestSoftwareInputPanel, QInputContext
+ \sa QInputMethod
*/
/*!