Get rid of most warnings related to QInputMethod
Change-Id: Id0b1235a5dc209c5c06e0a64613364c89e733005 Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
This commit is contained in:
parent
6e8d306ca7
commit
03da3d7f5c
@ -97,12 +97,7 @@ QObject *QInputMethod::inputItem() const
|
||||
void QInputMethod::setInputItem(QObject *inputItem)
|
||||
{
|
||||
Q_D(QInputMethod);
|
||||
|
||||
if (d->inputItem.data() == inputItem)
|
||||
return;
|
||||
|
||||
d->inputItem = inputItem;
|
||||
emit inputItemChanged();
|
||||
d->setInputItem(inputItem);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -299,7 +294,7 @@ void QInputMethod::update(Qt::InputMethodQueries queries)
|
||||
if (queries & Qt::ImEnabled) {
|
||||
QObject *focus = qApp->focusObject();
|
||||
bool enabled = d->objectAcceptsInputMethod(focus);
|
||||
setInputItem(enabled ? focus : 0);
|
||||
d->setInputItem(enabled ? focus : 0);
|
||||
QPlatformInputContextPrivate::setInputMethodAccepted(enabled);
|
||||
}
|
||||
|
||||
@ -365,9 +360,8 @@ void QInputMethodPrivate::q_connectFocusObject()
|
||||
|
||||
void QInputMethodPrivate::q_checkFocusObject(QObject *object)
|
||||
{
|
||||
Q_Q(QInputMethod);
|
||||
bool enabled = objectAcceptsInputMethod(object);
|
||||
q->setInputItem(enabled ? object : 0);
|
||||
setInputItem(enabled ? object : 0);
|
||||
}
|
||||
|
||||
bool QInputMethodPrivate::objectAcceptsInputMethod(QObject *object)
|
||||
|
@ -69,6 +69,17 @@ public:
|
||||
{
|
||||
return inputMethod->d_func();
|
||||
}
|
||||
inline void setInputItem(QObject *item)
|
||||
{
|
||||
Q_Q(QInputMethod);
|
||||
|
||||
if (inputItem.data() == item)
|
||||
return;
|
||||
|
||||
inputItem = item;
|
||||
emit q->inputItemChanged();
|
||||
}
|
||||
|
||||
void q_connectFocusObject();
|
||||
void q_checkFocusObject(QObject *object);
|
||||
bool objectAcceptsInputMethod(QObject *object);
|
||||
|
Loading…
Reference in New Issue
Block a user