diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-05-03 15:43:10 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-03 16:11:58 +0200 |
commit | 6dac3f18941bd2d66218ec43f08e4fb9be869c63 (patch) | |
tree | f2664c9f31d5046f38a1403f46eb0fc162d5242c /src/gui/kernel/qguiapplication.cpp | |
parent | b4dabb9e50ce26469b0b7d71e168463abf727334 (diff) | |
parent | 1e49914fee099c4c0d634743326b50ad02e6c8f1 (diff) |
Merge "Merge remote-tracking branch 'origin/api_changes'" into refs/staging/master
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index e7c2b60305..8fd4d4a2b3 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2154,12 +2154,20 @@ bool QGuiApplication::desktopSettingsAware() return QGuiApplicationPrivate::obey_desktop_settings; } -QInputMethod *QGuiApplication::inputMethod() const +/*! + returns the input method. + + The input method returns properties about the state and position of + the virtual keyboard. It also provides information about the position of the + current focused input element. + + \sa QInputPanel + */ +QInputMethod *QGuiApplication::inputMethod() { - Q_D(const QGuiApplication); - if (!d->inputMethod) - const_cast<QGuiApplicationPrivate *>(d)->inputMethod = new QInputMethod(); - return d->inputMethod; + if (!qGuiApp->d_func()->inputMethod) + qGuiApp->d_func()->inputMethod = new QInputMethod(); + return qGuiApp->d_func()->inputMethod; } /*! |