summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-04-17 17:33:40 -0700
committerQt by Nokia <qt-info@nokia.com>2012-04-18 15:11:13 +0200
commit21102a71ff9da746b9d46b706ea2f23cfca6eb6f (patch)
treef5935423de4a4dcffd84b2ef49b4d42617e6a5eb /src/gui/kernel/qguiapplication.cpp
parent9ecce11261e35686afa736bd31431386c89f59ec (diff)
api: QGuiApplication::inputMethod should be static
Pretty much all methods in QGuiApplication are static. Also adds documentation. Change-Id: I96808dd266922432b92fe3962292e4d5b6a8ab46 Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 9ffc35a608..8cbf55de05 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -2166,12 +2166,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;
}
/*!