diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-05-03 10:18:36 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2012-05-03 12:26:09 +0200 |
commit | 1e49914fee099c4c0d634743326b50ad02e6c8f1 (patch) | |
tree | 422eedb9ddcb16fa9f5a653737b4c78d8930eeae /src/gui/kernel/qguiapplication.cpp | |
parent | 1eac22a1b9dad7f843916afa9b7c820aa1c23777 (diff) | |
parent | c0d249019b098890fb8e5e9e144c2dd8029a670c (diff) |
Merge remote-tracking branch 'origin/api_changes'
Conflicts:
src/corelib/global/qglobal.cpp
src/corelib/global/qlogging.cpp
src/gui/kernel/qguiapplication.h
src/gui/kernel/qwindow.cpp
src/gui/kernel/qwindow.h
tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
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; } /*! |