Cocoa: added queryKeyboardModifiers() in platform plugin
Task-number: QTBUG-37181 Change-Id: I9256d0c9b83d6e5982864dc747586cbe2322b60c Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>bb10
parent
5334a2cea7
commit
eadaaf69fb
|
|
@ -129,6 +129,7 @@ public:
|
|||
QCocoaServices *services() const;
|
||||
QVariant styleHint(StyleHint hint) const;
|
||||
|
||||
Qt::KeyboardModifiers queryKeyboardModifiers() const;
|
||||
QList<int> possibleKeys(const QKeyEvent *event) const;
|
||||
|
||||
void updateScreens();
|
||||
|
|
|
|||
|
|
@ -464,6 +464,11 @@ QVariant QCocoaIntegration::styleHint(StyleHint hint) const
|
|||
return QPlatformIntegration::styleHint(hint);
|
||||
}
|
||||
|
||||
Qt::KeyboardModifiers QCocoaIntegration::queryKeyboardModifiers() const
|
||||
{
|
||||
return QCocoaKeyMapper::queryKeyboardModifiers();
|
||||
}
|
||||
|
||||
QList<int> QCocoaIntegration::possibleKeys(const QKeyEvent *event) const
|
||||
{
|
||||
return mKeyboardMapper->possibleKeys(event);
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ class QCocoaKeyMapper
|
|||
public:
|
||||
QCocoaKeyMapper();
|
||||
~QCocoaKeyMapper();
|
||||
static Qt::KeyboardModifiers queryKeyboardModifiers();
|
||||
QList<int> possibleKeys(const QKeyEvent *event) const;
|
||||
bool updateKeyboard();
|
||||
void deleteLayouts();
|
||||
|
|
|
|||
|
|
@ -346,6 +346,11 @@ QCocoaKeyMapper::~QCocoaKeyMapper()
|
|||
deleteLayouts();
|
||||
}
|
||||
|
||||
Qt::KeyboardModifiers QCocoaKeyMapper::queryKeyboardModifiers()
|
||||
{
|
||||
return qt_mac_get_modifiers(GetCurrentEventKeyModifiers());
|
||||
}
|
||||
|
||||
bool QCocoaKeyMapper::updateKeyboard()
|
||||
{
|
||||
const UCKeyboardLayout *uchrData = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue