Move keyboardInput data back to QApplication

Deprecated interface, rest of Qt now adapted to
QInputPanel.

Change-Id: Iacbbcac90dd7c037a24b45df1ee868f04090b21b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
bb10
Pekka Vuorela 2012-01-16 13:43:11 +02:00 committed by Qt by Nokia
parent 90a3e6c7c4
commit cf0d5d4554
4 changed files with 25 additions and 25 deletions

View File

@ -1520,28 +1520,6 @@ uint QGuiApplicationPrivate::currentKeyPlatform()
return platform;
}
/*!
\since 4.2
\obsolete
Returns the current keyboard input locale. Replaced with QInputPanel::locale()
*/
QLocale QGuiApplication::keyboardInputLocale()
{
return qApp ? qApp->inputPanel()->locale() : QLocale::c();
}
/*!
\since 4.2
\obsolete
Returns the current keyboard input direction. Replaced with QInputPanel::inputDirection()
*/
Qt::LayoutDirection QGuiApplication::keyboardInputDirection()
{
return qApp ? qApp->inputPanel()->inputDirection() : Qt::LeftToRight;
}
/*!
\since 4.5
\fn void QGuiApplication::fontDatabaseChanged()

View File

@ -119,9 +119,6 @@ public:
static inline bool isRightToLeft() { return layoutDirection() == Qt::RightToLeft; }
static inline bool isLeftToRight() { return layoutDirection() == Qt::LeftToRight; }
QT_DEPRECATED static QLocale keyboardInputLocale();
QT_DEPRECATED static Qt::LayoutDirection keyboardInputDirection();
QStyleHints *styleHints() const;
QInputPanel *inputPanel() const;

View File

@ -4967,6 +4967,28 @@ QInputContext *QApplication::inputContext() const
}
#endif // QT_NO_IM
/*!
\since 4.2
\obsolete
Returns the current keyboard input locale. Replaced with QInputPanel::locale()
*/
QLocale QApplication::keyboardInputLocale()
{
return qApp ? qApp->inputPanel()->locale() : QLocale::c();
}
/*!
\since 4.2
\obsolete
Returns the current keyboard input direction. Replaced with QInputPanel::inputDirection()
*/
Qt::LayoutDirection QApplication::keyboardInputDirection()
{
return qApp ? qApp->inputPanel()->inputDirection() : Qt::LeftToRight;
}
bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
{
return QGuiApplication::sendSpontaneousEvent(receiver, event);

View File

@ -226,6 +226,9 @@ public:
QInputContext *inputContext() const;
#endif
QT_DEPRECATED static QLocale keyboardInputLocale();
QT_DEPRECATED static Qt::LayoutDirection keyboardInputDirection();
static int exec();
bool notify(QObject *, QEvent *);