Remove QKeyMapper::changeKeyboard()
As described in QTBUG-27681, we no longer send KeyboardLayoutChange events in Qt 5 and up. We have QInputMethod::localeChanged, but that doesn't cover the cases where the input language stays the same, but the layout is changed. None of our widgets react to KeyboardLayoutChange these days, but ideally we should send KeyboardLayoutChange if we can plumb it from the platforms. However that plumbing wouldn't live in QKeyMapper, and having it around as dead code doesn't help, so remove it for now, and track the work to implement it in QTBUG-27681. Task-number: QTBUG-27681 Change-Id: I480590550f3bc741b829fb30aa85393b07d5c16f Reviewed-by: Liang Qi <liang.qi@qt.io>bb10
parent
eb4103e0b9
commit
fdd2fc2c71
|
|
@ -47,21 +47,6 @@ QList<int> QKeyMapper::possibleKeys(QKeyEvent *e)
|
|||
return result;
|
||||
}
|
||||
|
||||
extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); // in qapplication_*.cpp
|
||||
void QKeyMapper::changeKeyboard()
|
||||
{
|
||||
// ## TODO: Support KeyboardLayoutChange on QPA
|
||||
#if 0
|
||||
// inform all toplevel widgets of the change
|
||||
QEvent e(QEvent::KeyboardLayoutChange);
|
||||
QWidgetList list = QApplication::topLevelWidgets();
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
QWidget *w = list.at(i);
|
||||
qt_sendSpontaneousEvent(w, &e);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Q_GLOBAL_STATIC(QKeyMapper, keymapper)
|
||||
/*!
|
||||
Returns the pointer to the single instance of QKeyMapper in the application.
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ public:
|
|||
~QKeyMapper();
|
||||
|
||||
static QKeyMapper *instance();
|
||||
static void changeKeyboard();
|
||||
static QList<int> possibleKeys(QKeyEvent *e);
|
||||
|
||||
QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(QKeyMapper)
|
||||
|
|
|
|||
Loading…
Reference in New Issue