Use the dead Mac path in QWasmEventTranslator::translateDeadKey
The path for is_mac is unused. Use it by querying the platform from the new WASM plugin web platform API. Task-number: QTBUG-105213 Change-Id: I9a8922b5e9d215090dbdcc534c056c2cc068c009 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
parent
947a9d2aaf
commit
e8e584090b
@ -244,12 +244,12 @@ static Qt::Key find(const KeyMapping (&map)[N], Qt::Key key) noexcept
|
||||
return find_impl(map, map + N, key);
|
||||
}
|
||||
|
||||
Qt::Key QWasmEventTranslator::translateDeadKey(Qt::Key deadKey, Qt::Key accentBaseKey, bool is_mac)
|
||||
Qt::Key QWasmEventTranslator::translateDeadKey(Qt::Key deadKey, Qt::Key accentBaseKey)
|
||||
{
|
||||
Qt::Key wasmKey = Qt::Key_unknown;
|
||||
|
||||
if (deadKey == Qt::Key_QuoteLeft ) {
|
||||
if (is_mac) { // ` macOS: Key_Dead_Grave
|
||||
if (platform() == Platform::MacOS) { // ` macOS: Key_Dead_Grave
|
||||
wasmKey = find(graveKeyTable, accentBaseKey);
|
||||
} else {
|
||||
wasmKey = find(diaeresisKeyTable, accentBaseKey);
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
Q_SIGNALS:
|
||||
void getWindowAt(const QPoint &point, QWindow **window);
|
||||
private:
|
||||
static Qt::Key translateDeadKey(Qt::Key deadKey, Qt::Key accentBaseKey, bool is_mac = false);
|
||||
static Qt::Key translateDeadKey(Qt::Key deadKey, Qt::Key accentBaseKey);
|
||||
|
||||
private:
|
||||
static quint64 getTimestamp();
|
||||
|
Loading…
Reference in New Issue
Block a user