Deps: Update to Qt 6.7.0 and SDL 2.30.2

This commit is contained in:
Stenzek 2024-04-04 17:04:52 +10:00
parent 0a17cf7db8
commit 5c56d4e869
No known key found for this signature in database
10 changed files with 47 additions and 598 deletions

View File

@ -1,5 +1,5 @@
if(ENABLE_SDL2)
find_package(SDL2 2.30.1 REQUIRED)
find_package(SDL2 2.30.2 REQUIRED)
endif()
if(NOT WIN32 AND NOT ANDROID)
# From PCSX2: On macOS, Mono.framework contains an ancient version of libpng. We don't want that.

View File

@ -29,14 +29,14 @@ export MACOSX_DEPLOYMENT_TARGET=11.0
INSTALLDIR="$1"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.30.1
SDL=SDL2-2.30.2
ZLIB=1.3.1
ZSTD=1.5.5
LIBPNG=1.6.43
LIBJPEG=9f
LIBWEBP=1.3.2
MOLTENVK=1.2.8
QT=6.6.2
QT=6.7.0
if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
@ -60,18 +60,18 @@ CMAKE_ARCH_ARM64=-DCMAKE_OSX_ARCHITECTURES="arm64"
CMAKE_ARCH_UNIVERSAL=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cat > SHASUMS <<EOF
01215ffbc8cfc4ad165ba7573750f15ddda1f971d5a66e9dcaffd37c587f473a $SDL.tar.gz
891d66ac8cae51361d3229e3336ebec1c407a8a2a063b61df14f5fdf3ab5ac31 $SDL.tar.gz
9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 zlib-$ZLIB.tar.gz
9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4 zstd-$ZSTD.tar.gz
6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c libpng-$LIBPNG.tar.xz
2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 libwebp-$LIBWEBP.tar.gz
04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b jpegsrc.v$LIBJPEG.tar.gz
85beaf8abfcc54d9da0ff0257ae311abd9e7aa96e53da37e1c37d6bc04ac83cd v$MOLTENVK.tar.gz
b89b426b9852a17d3e96230ab0871346574d635c7914480a2a27f98ff942677b qtbase-everywhere-src-$QT.tar.xz
71584c9136d4983ad19fa2d017abbae57b055eb90c62a36bf3f45d6d21a87cb3 qtimageformats-everywhere-src-$QT.tar.xz
5a231d59ef1b42bfbaa5174d4ff39f8e1b4ba070ef984a70b069b4b2576d8181 qtsvg-everywhere-src-$QT.tar.xz
e6d49e9f52111287f77878ecb8b708cce682f10b03ba2476d9247603bc6c4746 qttools-everywhere-src-$QT.tar.xz
ca3ac090ef3aa12566c26b482c106f1f986c5a3444e7003f379726a550530c77 qttranslations-everywhere-src-$QT.tar.xz
11b2e29e2e52fb0e3b453ea13bbe51a10fdff36e1c192d8868c5a40233b8b254 qtbase-everywhere-src-$QT.tar.xz
516ce07ec8dd5a11c59816fe33ddb71d4f691d0ebbc1798ac338f23b86c029a7 qtimageformats-everywhere-src-$QT.tar.xz
1518f40e08ff5e6153a6e26e5b95b033413ac143b70795dc1317e7f73ebf922d qtsvg-everywhere-src-$QT.tar.xz
c8da6b239e82fe1e23465cbf0936c0da5a334438d3fb433e19c503cbb1abee7b qttools-everywhere-src-$QT.tar.xz
26fc8047062ca4bacd1bd953be86fd39c6e0a5f5e9920c72ba9d40876cea4b56 qttranslations-everywhere-src-$QT.tar.xz
EOF
curl -L \

View File

@ -44,9 +44,9 @@ cd "%BUILDDIR%"
set LIBJPEG=9f
set LIBPNG=1643
set QT=6.6.2
set QTMINOR=6.6
set SDL=SDL2-2.30.1
set QT=6.7.0
set QTMINOR=6.7
set SDL=SDL2-2.30.2
set WEBP=1.3.2
set ZLIB=1.3.1
set ZLIBSHORT=131
@ -54,12 +54,12 @@ set ZSTD=1.5.5
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1643.zip fc466a1e638e635d6c66363bdf3f38555b81b0141d0b06ba45b49ccca327436d || goto error
call :downloadfile "jpegsr%LIBJPEG%.zip" https://ijg.org/files/jpegsr%LIBJPEG%.zip 6255da8c89e09d694e6800688c76145eb6870a76ac0d36c74fccd61b3940aafa || goto error
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" c15ded54e9f32f8a1f9ed3e3dc072837a320ed23c5d0e95b7c18ecbe05c1187b || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 3582dbc46df280365fc5d5e6cc8fcfc72ddbddbd330a03a98eec24b8b44fa4d0 || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 2176b623c9141b1136d57ff9ca1ed12e3636146b53c6feed2083e1cbecff6454 || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 84ba758ef06b93532f2d098f0d08d7bbddf6f3e6273c9e0d3a58498338f85b18 || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" c760fbd229de8a02e793fa41ddd6843cd2cb9c93a4e99bc5384c646599aee996 || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" a061e8d61eb7c03823ead92fe46b5722ed7b8119aeb84157d80f10a53c77d262 || goto error
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 09a822abf6e97f80d09cf9c46115faebb3476b0d56c1c035aec8ec3f88382ae7 || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 31a1e0c69bb37e6631de02f8cf0b75afdc2ce44890c32dac38d362c251c12483 || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 450c0b1c3cd51e2e110fceaf60e157641c2698d18b12a3552d43fa1539bfdbbc || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" b869be09ccb72949a3311dc87ac702b6e854edfd5bff2bc2cc4d7fd549b1869a || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" cfaf16a33ebecd950f19e80c7a8ecc512263d57079fe78ea4b79fa1898233c08 || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 69241747af86bc5b6c2829de4a28d56d3c1119dd21c379b84615178d45b8f3aa || goto error
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 || goto error
call :downloadfile "zlib%ZLIBSHORT%.zip" "https://zlib.net/zlib%ZLIBSHORT%.zip" 72af66d44fcc14c22013b46b814d5d2514673dda3d115e64b690c1ad636e7b17 || goto error
call :downloadfile "zstd-%ZSTD%.zip" "https://github.com/facebook/zstd/archive/refs/tags/v%ZSTD%.zip" c5c8daa1d40dabc51790c62a5b86af2b36dfc4e1a738ff10dc4a46ea4e68ee51 || goto error

View File

@ -42,9 +42,9 @@ cd "%BUILDDIR%"
set LIBJPEG=9f
set LIBPNG=1643
set QT=6.6.2
set QTMINOR=6.6
set SDL=SDL2-2.30.1
set QT=6.7.0
set QTMINOR=6.7
set SDL=SDL2-2.30.2
set WEBP=1.3.2
set ZLIB=1.3.1
set ZLIBSHORT=131
@ -52,12 +52,12 @@ set ZSTD=1.5.5
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1643.zip fc466a1e638e635d6c66363bdf3f38555b81b0141d0b06ba45b49ccca327436d || goto error
call :downloadfile "jpegsr%LIBJPEG%.zip" https://ijg.org/files/jpegsr%LIBJPEG%.zip 6255da8c89e09d694e6800688c76145eb6870a76ac0d36c74fccd61b3940aafa || goto error
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" c15ded54e9f32f8a1f9ed3e3dc072837a320ed23c5d0e95b7c18ecbe05c1187b || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 3582dbc46df280365fc5d5e6cc8fcfc72ddbddbd330a03a98eec24b8b44fa4d0 || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 2176b623c9141b1136d57ff9ca1ed12e3636146b53c6feed2083e1cbecff6454 || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 84ba758ef06b93532f2d098f0d08d7bbddf6f3e6273c9e0d3a58498338f85b18 || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" c760fbd229de8a02e793fa41ddd6843cd2cb9c93a4e99bc5384c646599aee996 || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" a061e8d61eb7c03823ead92fe46b5722ed7b8119aeb84157d80f10a53c77d262 || goto error
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 09a822abf6e97f80d09cf9c46115faebb3476b0d56c1c035aec8ec3f88382ae7 || goto error
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 31a1e0c69bb37e6631de02f8cf0b75afdc2ce44890c32dac38d362c251c12483 || goto error
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 450c0b1c3cd51e2e110fceaf60e157641c2698d18b12a3552d43fa1539bfdbbc || goto error
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" b869be09ccb72949a3311dc87ac702b6e854edfd5bff2bc2cc4d7fd549b1869a || goto error
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" cfaf16a33ebecd950f19e80c7a8ecc512263d57079fe78ea4b79fa1898233c08 || goto error
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 69241747af86bc5b6c2829de4a28d56d3c1119dd21c379b84615178d45b8f3aa || goto error
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 || goto error
call :downloadfile "zlib%ZLIBSHORT%.zip" "https://zlib.net/zlib%ZLIBSHORT%.zip" 72af66d44fcc14c22013b46b814d5d2514673dda3d115e64b690c1ad636e7b17 || goto error
call :downloadfile "zstd-%ZSTD%.zip" "https://github.com/facebook/zstd/archive/refs/tags/v%ZSTD%.zip" c5c8daa1d40dabc51790c62a5b86af2b36dfc4e1a738ff10dc4a46ea4e68ee51 || goto error

View File

@ -14,8 +14,8 @@ LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
LIBJPEG=9f
LIBPNG=1.6.43
LIBWEBP=1.3.2
SDL=SDL2-2.30.1
QT=6.6.2
SDL=SDL2-2.30.2
QT=6.7.0
ZLIB=1.3.1
ZSTD=1.5.5
@ -27,15 +27,15 @@ fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.
04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b jpegsrc.v$LIBJPEG.tar.gz
6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c libpng-$LIBPNG.tar.xz
2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 libwebp-$LIBWEBP.tar.gz
01215ffbc8cfc4ad165ba7573750f15ddda1f971d5a66e9dcaffd37c587f473a $SDL.tar.gz
891d66ac8cae51361d3229e3336ebec1c407a8a2a063b61df14f5fdf3ab5ac31 $SDL.tar.gz
9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 zlib-$ZLIB.tar.gz
9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4 zstd-$ZSTD.tar.gz
b89b426b9852a17d3e96230ab0871346574d635c7914480a2a27f98ff942677b qtbase-everywhere-src-$QT.tar.xz
71584c9136d4983ad19fa2d017abbae57b055eb90c62a36bf3f45d6d21a87cb3 qtimageformats-everywhere-src-$QT.tar.xz
5a231d59ef1b42bfbaa5174d4ff39f8e1b4ba070ef984a70b069b4b2576d8181 qtsvg-everywhere-src-$QT.tar.xz
e6d49e9f52111287f77878ecb8b708cce682f10b03ba2476d9247603bc6c4746 qttools-everywhere-src-$QT.tar.xz
ca3ac090ef3aa12566c26b482c106f1f986c5a3444e7003f379726a550530c77 qttranslations-everywhere-src-$QT.tar.xz
9bcdd5cef7ae304e3e0435dac495367ccfb010d09f664b596ba330361941dd78 qtwayland-everywhere-src-$QT.tar.xz
11b2e29e2e52fb0e3b453ea13bbe51a10fdff36e1c192d8868c5a40233b8b254 qtbase-everywhere-src-$QT.tar.xz
516ce07ec8dd5a11c59816fe33ddb71d4f691d0ebbc1798ac338f23b86c029a7 qtimageformats-everywhere-src-$QT.tar.xz
1518f40e08ff5e6153a6e26e5b95b033413ac143b70795dc1317e7f73ebf922d qtsvg-everywhere-src-$QT.tar.xz
c8da6b239e82fe1e23465cbf0936c0da5a334438d3fb433e19c503cbb1abee7b qttools-everywhere-src-$QT.tar.xz
26fc8047062ca4bacd1bd953be86fd39c6e0a5f5e9920c72ba9d40876cea4b56 qttranslations-everywhere-src-$QT.tar.xz
d73470e4217da388d8cd2a517ee8bb373853f33c569306e80f04397845157aea qtwayland-everywhere-src-$QT.tar.xz
EOF
curl -C - -L \

View File

@ -1,35 +1,15 @@
{
"name": "sdl2",
"buildsystem": "autotools",
"no-autogen": true,
"config-opts": [
"--disable-dbus",
"--without-x",
"--disable-video-opengl",
"--disable-video-opengles",
"--disable-video-vulkan",
"--disable-wayland-shared",
"--disable-ime",
"--disable-oss",
"--disable-alsa",
"--disable-jack",
"--disable-esd",
"--disable-pipewire",
"--disable-pulseaudio",
"--disable-arts",
"--disable-nas",
"--disable-sndio",
"--disable-fusionsound",
"--disable-diskaudio"
],
"buildsystem": "cmake-ninja",
"builddir": true,
"build-options": {
"strip": true
},
"sources": [
{
"type": "archive",
"url": "https://libsdl.org/release/SDL2-2.30.1.tar.gz",
"sha256": "01215ffbc8cfc4ad165ba7573750f15ddda1f971d5a66e9dcaffd37c587f473a"
"url": "https://libsdl.org/release/SDL2-2.30.2.tar.gz",
"sha256": "891d66ac8cae51361d3229e3336ebec1c407a8a2a063b61df14f5fdf3ab5ac31"
}
],
"cleanup": [
@ -38,8 +18,7 @@
"/lib/*.a",
"/lib/*.la",
"/lib/cmake",
"/lib/pkgconfig",
"/share/aclocal"
"/lib/pkgconfig"
]
}

View File

@ -1,7 +1,7 @@
{
"app-id": "org.duckstation.DuckStation",
"runtime": "org.kde.Platform",
"runtime-version": "6.6",
"runtime-version": "6.7",
"sdk": "org.kde.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.llvm17"

View File

@ -1,4 +1,4 @@
find_package(Qt6 6.6.2 COMPONENTS Core Gui Widgets Network LinguistTools REQUIRED)
find_package(Qt6 6.6.0 COMPONENTS Core Gui Widgets Network LinguistTools REQUIRED)
include(CopyBaseTranslations)

View File

@ -180,7 +180,11 @@ static constexpr KeyCodeName s_qt_key_names[] = {{Qt::Key_Escape, "Escape", ICON
{Qt::Key_twosuperior, "twosuperior", nullptr},
{Qt::Key_threesuperior, "threesuperior", nullptr},
{Qt::Key_acute, "acute", nullptr},
#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0))
{Qt::Key_micro, "micro", nullptr},
#else
{Qt::Key_mu, "mu", nullptr},
#endif
{Qt::Key_paragraph, "paragraph", nullptr},
{Qt::Key_periodcentered, "periodcentered", nullptr},
{Qt::Key_cedilla, "cedilla", nullptr},

View File

@ -124,540 +124,6 @@ void ResizeColumnsForTreeView(QTreeView* view, const std::initializer_list<int>&
ResizeColumnsForView(view, widths);
}
static const std::map<int, QString> s_qt_key_names = {
{Qt::Key_Escape, QStringLiteral("Escape")},
{Qt::Key_Tab, QStringLiteral("Tab")},
{Qt::Key_Backtab, QStringLiteral("Backtab")},
{Qt::Key_Backspace, QStringLiteral("Backspace")},
{Qt::Key_Return, QStringLiteral("Return")},
{Qt::Key_Enter, QStringLiteral("Enter")},
{Qt::Key_Insert, QStringLiteral("Insert")},
{Qt::Key_Delete, QStringLiteral("Delete")},
{Qt::Key_Pause, QStringLiteral("Pause")},
{Qt::Key_Print, QStringLiteral("Print")},
{Qt::Key_SysReq, QStringLiteral("SysReq")},
{Qt::Key_Clear, QStringLiteral("Clear")},
{Qt::Key_Home, QStringLiteral("Home")},
{Qt::Key_End, QStringLiteral("End")},
{Qt::Key_Left, QStringLiteral("Left")},
{Qt::Key_Up, QStringLiteral("Up")},
{Qt::Key_Right, QStringLiteral("Right")},
{Qt::Key_Down, QStringLiteral("Down")},
{Qt::Key_PageUp, QStringLiteral("PageUp")},
{Qt::Key_PageDown, QStringLiteral("PageDown")},
{Qt::Key_Shift, QStringLiteral("Shift")},
{Qt::Key_Control, QStringLiteral("Control")},
{Qt::Key_Meta, QStringLiteral("Meta")},
{Qt::Key_Alt, QStringLiteral("Alt")},
{Qt::Key_CapsLock, QStringLiteral("CapsLock")},
{Qt::Key_NumLock, QStringLiteral("NumLock")},
{Qt::Key_ScrollLock, QStringLiteral("ScrollLock")},
{Qt::Key_F1, QStringLiteral("F1")},
{Qt::Key_F2, QStringLiteral("F2")},
{Qt::Key_F3, QStringLiteral("F3")},
{Qt::Key_F4, QStringLiteral("F4")},
{Qt::Key_F5, QStringLiteral("F5")},
{Qt::Key_F6, QStringLiteral("F6")},
{Qt::Key_F7, QStringLiteral("F7")},
{Qt::Key_F8, QStringLiteral("F8")},
{Qt::Key_F9, QStringLiteral("F9")},
{Qt::Key_F10, QStringLiteral("F10")},
{Qt::Key_F11, QStringLiteral("F11")},
{Qt::Key_F12, QStringLiteral("F12")},
{Qt::Key_F13, QStringLiteral("F13")},
{Qt::Key_F14, QStringLiteral("F14")},
{Qt::Key_F15, QStringLiteral("F15")},
{Qt::Key_F16, QStringLiteral("F16")},
{Qt::Key_F17, QStringLiteral("F17")},
{Qt::Key_F18, QStringLiteral("F18")},
{Qt::Key_F19, QStringLiteral("F19")},
{Qt::Key_F20, QStringLiteral("F20")},
{Qt::Key_F21, QStringLiteral("F21")},
{Qt::Key_F22, QStringLiteral("F22")},
{Qt::Key_F23, QStringLiteral("F23")},
{Qt::Key_F24, QStringLiteral("F24")},
{Qt::Key_F25, QStringLiteral("F25")},
{Qt::Key_F26, QStringLiteral("F26")},
{Qt::Key_F27, QStringLiteral("F27")},
{Qt::Key_F28, QStringLiteral("F28")},
{Qt::Key_F29, QStringLiteral("F29")},
{Qt::Key_F30, QStringLiteral("F30")},
{Qt::Key_F31, QStringLiteral("F31")},
{Qt::Key_F32, QStringLiteral("F32")},
{Qt::Key_F33, QStringLiteral("F33")},
{Qt::Key_F34, QStringLiteral("F34")},
{Qt::Key_F35, QStringLiteral("F35")},
{Qt::Key_Super_L, QStringLiteral("Super_L")},
{Qt::Key_Super_R, QStringLiteral("Super_R")},
{Qt::Key_Menu, QStringLiteral("Menu")},
{Qt::Key_Hyper_L, QStringLiteral("Hyper_L")},
{Qt::Key_Hyper_R, QStringLiteral("Hyper_R")},
{Qt::Key_Help, QStringLiteral("Help")},
{Qt::Key_Direction_L, QStringLiteral("Direction_L")},
{Qt::Key_Direction_R, QStringLiteral("Direction_R")},
{Qt::Key_Space, QStringLiteral("Space")},
{Qt::Key_Any, QStringLiteral("Any")},
{Qt::Key_Exclam, QStringLiteral("Exclam")},
{Qt::Key_QuoteDbl, QStringLiteral("QuoteDbl")},
{Qt::Key_NumberSign, QStringLiteral("NumberSign")},
{Qt::Key_Dollar, QStringLiteral("Dollar")},
{Qt::Key_Percent, QStringLiteral("Percent")},
{Qt::Key_Ampersand, QStringLiteral("Ampersand")},
{Qt::Key_Apostrophe, QStringLiteral("Apostrophe")},
{Qt::Key_ParenLeft, QStringLiteral("ParenLeft")},
{Qt::Key_ParenRight, QStringLiteral("ParenRight")},
{Qt::Key_Asterisk, QStringLiteral("Asterisk")},
{Qt::Key_Plus, QStringLiteral("Plus")},
{Qt::Key_Comma, QStringLiteral("Comma")},
{Qt::Key_Minus, QStringLiteral("Minus")},
{Qt::Key_Period, QStringLiteral("Period")},
{Qt::Key_Slash, QStringLiteral("Slash")},
{Qt::Key_0, QStringLiteral("0")},
{Qt::Key_1, QStringLiteral("1")},
{Qt::Key_2, QStringLiteral("2")},
{Qt::Key_3, QStringLiteral("3")},
{Qt::Key_4, QStringLiteral("4")},
{Qt::Key_5, QStringLiteral("5")},
{Qt::Key_6, QStringLiteral("6")},
{Qt::Key_7, QStringLiteral("7")},
{Qt::Key_8, QStringLiteral("8")},
{Qt::Key_9, QStringLiteral("9")},
{Qt::Key_Colon, QStringLiteral("Colon")},
{Qt::Key_Semicolon, QStringLiteral("Semicolon")},
{Qt::Key_Less, QStringLiteral("Less")},
{Qt::Key_Equal, QStringLiteral("Equal")},
{Qt::Key_Greater, QStringLiteral("Greater")},
{Qt::Key_Question, QStringLiteral("Question")},
{Qt::Key_At, QStringLiteral("At")},
{Qt::Key_A, QStringLiteral("A")},
{Qt::Key_B, QStringLiteral("B")},
{Qt::Key_C, QStringLiteral("C")},
{Qt::Key_D, QStringLiteral("D")},
{Qt::Key_E, QStringLiteral("E")},
{Qt::Key_F, QStringLiteral("F")},
{Qt::Key_G, QStringLiteral("G")},
{Qt::Key_H, QStringLiteral("H")},
{Qt::Key_I, QStringLiteral("I")},
{Qt::Key_J, QStringLiteral("J")},
{Qt::Key_K, QStringLiteral("K")},
{Qt::Key_L, QStringLiteral("L")},
{Qt::Key_M, QStringLiteral("M")},
{Qt::Key_N, QStringLiteral("N")},
{Qt::Key_O, QStringLiteral("O")},
{Qt::Key_P, QStringLiteral("P")},
{Qt::Key_Q, QStringLiteral("Q")},
{Qt::Key_R, QStringLiteral("R")},
{Qt::Key_S, QStringLiteral("S")},
{Qt::Key_T, QStringLiteral("T")},
{Qt::Key_U, QStringLiteral("U")},
{Qt::Key_V, QStringLiteral("V")},
{Qt::Key_W, QStringLiteral("W")},
{Qt::Key_X, QStringLiteral("X")},
{Qt::Key_Y, QStringLiteral("Y")},
{Qt::Key_Z, QStringLiteral("Z")},
{Qt::Key_BracketLeft, QStringLiteral("BracketLeft")},
{Qt::Key_Backslash, QStringLiteral("Backslash")},
{Qt::Key_BracketRight, QStringLiteral("BracketRight")},
{Qt::Key_AsciiCircum, QStringLiteral("AsciiCircum")},
{Qt::Key_Underscore, QStringLiteral("Underscore")},
{Qt::Key_QuoteLeft, QStringLiteral("QuoteLeft")},
{Qt::Key_BraceLeft, QStringLiteral("BraceLeft")},
{Qt::Key_Bar, QStringLiteral("Bar")},
{Qt::Key_BraceRight, QStringLiteral("BraceRight")},
{Qt::Key_AsciiTilde, QStringLiteral("AsciiTilde")},
{Qt::Key_nobreakspace, QStringLiteral("nobreakspace")},
{Qt::Key_exclamdown, QStringLiteral("exclamdown")},
{Qt::Key_cent, QStringLiteral("cent")},
{Qt::Key_sterling, QStringLiteral("sterling")},
{Qt::Key_currency, QStringLiteral("currency")},
{Qt::Key_yen, QStringLiteral("yen")},
{Qt::Key_brokenbar, QStringLiteral("brokenbar")},
{Qt::Key_section, QStringLiteral("section")},
{Qt::Key_diaeresis, QStringLiteral("diaeresis")},
{Qt::Key_copyright, QStringLiteral("copyright")},
{Qt::Key_ordfeminine, QStringLiteral("ordfeminine")},
{Qt::Key_guillemotleft, QStringLiteral("guillemotleft")},
{Qt::Key_notsign, QStringLiteral("notsign")},
{Qt::Key_hyphen, QStringLiteral("hyphen")},
{Qt::Key_registered, QStringLiteral("registered")},
{Qt::Key_macron, QStringLiteral("macron")},
{Qt::Key_degree, QStringLiteral("degree")},
{Qt::Key_plusminus, QStringLiteral("plusminus")},
{Qt::Key_twosuperior, QStringLiteral("twosuperior")},
{Qt::Key_threesuperior, QStringLiteral("threesuperior")},
{Qt::Key_acute, QStringLiteral("acute")},
{Qt::Key_mu, QStringLiteral("mu")},
{Qt::Key_paragraph, QStringLiteral("paragraph")},
{Qt::Key_periodcentered, QStringLiteral("periodcentered")},
{Qt::Key_cedilla, QStringLiteral("cedilla")},
{Qt::Key_onesuperior, QStringLiteral("onesuperior")},
{Qt::Key_masculine, QStringLiteral("masculine")},
{Qt::Key_guillemotright, QStringLiteral("guillemotright")},
{Qt::Key_onequarter, QStringLiteral("onequarter")},
{Qt::Key_onehalf, QStringLiteral("onehalf")},
{Qt::Key_threequarters, QStringLiteral("threequarters")},
{Qt::Key_questiondown, QStringLiteral("questiondown")},
{Qt::Key_Agrave, QStringLiteral("Agrave")},
{Qt::Key_Aacute, QStringLiteral("Aacute")},
{Qt::Key_Acircumflex, QStringLiteral("Acircumflex")},
{Qt::Key_Atilde, QStringLiteral("Atilde")},
{Qt::Key_Adiaeresis, QStringLiteral("Adiaeresis")},
{Qt::Key_Aring, QStringLiteral("Aring")},
{Qt::Key_AE, QStringLiteral("AE")},
{Qt::Key_Ccedilla, QStringLiteral("Ccedilla")},
{Qt::Key_Egrave, QStringLiteral("Egrave")},
{Qt::Key_Eacute, QStringLiteral("Eacute")},
{Qt::Key_Ecircumflex, QStringLiteral("Ecircumflex")},
{Qt::Key_Ediaeresis, QStringLiteral("Ediaeresis")},
{Qt::Key_Igrave, QStringLiteral("Igrave")},
{Qt::Key_Iacute, QStringLiteral("Iacute")},
{Qt::Key_Icircumflex, QStringLiteral("Icircumflex")},
{Qt::Key_Idiaeresis, QStringLiteral("Idiaeresis")},
{Qt::Key_ETH, QStringLiteral("ETH")},
{Qt::Key_Ntilde, QStringLiteral("Ntilde")},
{Qt::Key_Ograve, QStringLiteral("Ograve")},
{Qt::Key_Oacute, QStringLiteral("Oacute")},
{Qt::Key_Ocircumflex, QStringLiteral("Ocircumflex")},
{Qt::Key_Otilde, QStringLiteral("Otilde")},
{Qt::Key_Odiaeresis, QStringLiteral("Odiaeresis")},
{Qt::Key_multiply, QStringLiteral("multiply")},
{Qt::Key_Ooblique, QStringLiteral("Ooblique")},
{Qt::Key_Ugrave, QStringLiteral("Ugrave")},
{Qt::Key_Uacute, QStringLiteral("Uacute")},
{Qt::Key_Ucircumflex, QStringLiteral("Ucircumflex")},
{Qt::Key_Udiaeresis, QStringLiteral("Udiaeresis")},
{Qt::Key_Yacute, QStringLiteral("Yacute")},
{Qt::Key_THORN, QStringLiteral("THORN")},
{Qt::Key_ssharp, QStringLiteral("ssharp")},
{Qt::Key_division, QStringLiteral("division")},
{Qt::Key_ydiaeresis, QStringLiteral("ydiaeresis")},
{Qt::Key_AltGr, QStringLiteral("AltGr")},
{Qt::Key_Multi_key, QStringLiteral("Multi_key")},
{Qt::Key_Codeinput, QStringLiteral("Codeinput")},
{Qt::Key_SingleCandidate, QStringLiteral("SingleCandidate")},
{Qt::Key_MultipleCandidate, QStringLiteral("MultipleCandidate")},
{Qt::Key_PreviousCandidate, QStringLiteral("PreviousCandidate")},
{Qt::Key_Mode_switch, QStringLiteral("Mode_switch")},
{Qt::Key_Kanji, QStringLiteral("Kanji")},
{Qt::Key_Muhenkan, QStringLiteral("Muhenkan")},
{Qt::Key_Henkan, QStringLiteral("Henkan")},
{Qt::Key_Romaji, QStringLiteral("Romaji")},
{Qt::Key_Hiragana, QStringLiteral("Hiragana")},
{Qt::Key_Katakana, QStringLiteral("Katakana")},
{Qt::Key_Hiragana_Katakana, QStringLiteral("Hiragana_Katakana")},
{Qt::Key_Zenkaku, QStringLiteral("Zenkaku")},
{Qt::Key_Hankaku, QStringLiteral("Hankaku")},
{Qt::Key_Zenkaku_Hankaku, QStringLiteral("Zenkaku_Hankaku")},
{Qt::Key_Touroku, QStringLiteral("Touroku")},
{Qt::Key_Massyo, QStringLiteral("Massyo")},
{Qt::Key_Kana_Lock, QStringLiteral("Kana_Lock")},
{Qt::Key_Kana_Shift, QStringLiteral("Kana_Shift")},
{Qt::Key_Eisu_Shift, QStringLiteral("Eisu_Shift")},
{Qt::Key_Eisu_toggle, QStringLiteral("Eisu_toggle")},
{Qt::Key_Hangul, QStringLiteral("Hangul")},
{Qt::Key_Hangul_Start, QStringLiteral("Hangul_Start")},
{Qt::Key_Hangul_End, QStringLiteral("Hangul_End")},
{Qt::Key_Hangul_Hanja, QStringLiteral("Hangul_Hanja")},
{Qt::Key_Hangul_Jamo, QStringLiteral("Hangul_Jamo")},
{Qt::Key_Hangul_Romaja, QStringLiteral("Hangul_Romaja")},
{Qt::Key_Hangul_Jeonja, QStringLiteral("Hangul_Jeonja")},
{Qt::Key_Hangul_Banja, QStringLiteral("Hangul_Banja")},
{Qt::Key_Hangul_PreHanja, QStringLiteral("Hangul_PreHanja")},
{Qt::Key_Hangul_PostHanja, QStringLiteral("Hangul_PostHanja")},
{Qt::Key_Hangul_Special, QStringLiteral("Hangul_Special")},
{Qt::Key_Dead_Grave, QStringLiteral("Dead_Grave")},
{Qt::Key_Dead_Acute, QStringLiteral("Dead_Acute")},
{Qt::Key_Dead_Circumflex, QStringLiteral("Dead_Circumflex")},
{Qt::Key_Dead_Tilde, QStringLiteral("Dead_Tilde")},
{Qt::Key_Dead_Macron, QStringLiteral("Dead_Macron")},
{Qt::Key_Dead_Breve, QStringLiteral("Dead_Breve")},
{Qt::Key_Dead_Abovedot, QStringLiteral("Dead_Abovedot")},
{Qt::Key_Dead_Diaeresis, QStringLiteral("Dead_Diaeresis")},
{Qt::Key_Dead_Abovering, QStringLiteral("Dead_Abovering")},
{Qt::Key_Dead_Doubleacute, QStringLiteral("Dead_Doubleacute")},
{Qt::Key_Dead_Caron, QStringLiteral("Dead_Caron")},
{Qt::Key_Dead_Cedilla, QStringLiteral("Dead_Cedilla")},
{Qt::Key_Dead_Ogonek, QStringLiteral("Dead_Ogonek")},
{Qt::Key_Dead_Iota, QStringLiteral("Dead_Iota")},
{Qt::Key_Dead_Voiced_Sound, QStringLiteral("Dead_Voiced_Sound")},
{Qt::Key_Dead_Semivoiced_Sound, QStringLiteral("Dead_Semivoiced_Sound")},
{Qt::Key_Dead_Belowdot, QStringLiteral("Dead_Belowdot")},
{Qt::Key_Dead_Hook, QStringLiteral("Dead_Hook")},
{Qt::Key_Dead_Horn, QStringLiteral("Dead_Horn")},
{Qt::Key_Back, QStringLiteral("Back")},
{Qt::Key_Forward, QStringLiteral("Forward")},
{Qt::Key_Stop, QStringLiteral("Stop")},
{Qt::Key_Refresh, QStringLiteral("Refresh")},
{Qt::Key_VolumeDown, QStringLiteral("VolumeDown")},
{Qt::Key_VolumeMute, QStringLiteral("VolumeMute")},
{Qt::Key_VolumeUp, QStringLiteral("VolumeUp")},
{Qt::Key_BassBoost, QStringLiteral("BassBoost")},
{Qt::Key_BassUp, QStringLiteral("BassUp")},
{Qt::Key_BassDown, QStringLiteral("BassDown")},
{Qt::Key_TrebleUp, QStringLiteral("TrebleUp")},
{Qt::Key_TrebleDown, QStringLiteral("TrebleDown")},
{Qt::Key_MediaPlay, QStringLiteral("MediaPlay")},
{Qt::Key_MediaStop, QStringLiteral("MediaStop")},
{Qt::Key_MediaPrevious, QStringLiteral("MediaPrevious")},
{Qt::Key_MediaNext, QStringLiteral("MediaNext")},
{Qt::Key_MediaRecord, QStringLiteral("MediaRecord")},
{Qt::Key_MediaPause, QStringLiteral("MediaPause")},
{Qt::Key_MediaTogglePlayPause, QStringLiteral("MediaTogglePlayPause")},
{Qt::Key_HomePage, QStringLiteral("HomePage")},
{Qt::Key_Favorites, QStringLiteral("Favorites")},
{Qt::Key_Search, QStringLiteral("Search")},
{Qt::Key_Standby, QStringLiteral("Standby")},
{Qt::Key_OpenUrl, QStringLiteral("OpenUrl")},
{Qt::Key_LaunchMail, QStringLiteral("LaunchMail")},
{Qt::Key_LaunchMedia, QStringLiteral("LaunchMedia")},
{Qt::Key_Launch0, QStringLiteral("Launch0")},
{Qt::Key_Launch1, QStringLiteral("Launch1")},
{Qt::Key_Launch2, QStringLiteral("Launch2")},
{Qt::Key_Launch3, QStringLiteral("Launch3")},
{Qt::Key_Launch4, QStringLiteral("Launch4")},
{Qt::Key_Launch5, QStringLiteral("Launch5")},
{Qt::Key_Launch6, QStringLiteral("Launch6")},
{Qt::Key_Launch7, QStringLiteral("Launch7")},
{Qt::Key_Launch8, QStringLiteral("Launch8")},
{Qt::Key_Launch9, QStringLiteral("Launch9")},
{Qt::Key_LaunchA, QStringLiteral("LaunchA")},
{Qt::Key_LaunchB, QStringLiteral("LaunchB")},
{Qt::Key_LaunchC, QStringLiteral("LaunchC")},
{Qt::Key_LaunchD, QStringLiteral("LaunchD")},
{Qt::Key_LaunchE, QStringLiteral("LaunchE")},
{Qt::Key_LaunchF, QStringLiteral("LaunchF")},
{Qt::Key_MonBrightnessUp, QStringLiteral("MonBrightnessUp")},
{Qt::Key_MonBrightnessDown, QStringLiteral("MonBrightnessDown")},
{Qt::Key_KeyboardLightOnOff, QStringLiteral("KeyboardLightOnOff")},
{Qt::Key_KeyboardBrightnessUp, QStringLiteral("KeyboardBrightnessUp")},
{Qt::Key_KeyboardBrightnessDown, QStringLiteral("KeyboardBrightnessDown")},
{Qt::Key_PowerOff, QStringLiteral("PowerOff")},
{Qt::Key_WakeUp, QStringLiteral("WakeUp")},
{Qt::Key_Eject, QStringLiteral("Eject")},
{Qt::Key_ScreenSaver, QStringLiteral("ScreenSaver")},
{Qt::Key_WWW, QStringLiteral("WWW")},
{Qt::Key_Memo, QStringLiteral("Memo")},
{Qt::Key_LightBulb, QStringLiteral("LightBulb")},
{Qt::Key_Shop, QStringLiteral("Shop")},
{Qt::Key_History, QStringLiteral("History")},
{Qt::Key_AddFavorite, QStringLiteral("AddFavorite")},
{Qt::Key_HotLinks, QStringLiteral("HotLinks")},
{Qt::Key_BrightnessAdjust, QStringLiteral("BrightnessAdjust")},
{Qt::Key_Finance, QStringLiteral("Finance")},
{Qt::Key_Community, QStringLiteral("Community")},
{Qt::Key_AudioRewind, QStringLiteral("AudioRewind")},
{Qt::Key_BackForward, QStringLiteral("BackForward")},
{Qt::Key_ApplicationLeft, QStringLiteral("ApplicationLeft")},
{Qt::Key_ApplicationRight, QStringLiteral("ApplicationRight")},
{Qt::Key_Book, QStringLiteral("Book")},
{Qt::Key_CD, QStringLiteral("CD")},
{Qt::Key_Calculator, QStringLiteral("Calculator")},
{Qt::Key_ToDoList, QStringLiteral("ToDoList")},
{Qt::Key_ClearGrab, QStringLiteral("ClearGrab")},
{Qt::Key_Close, QStringLiteral("Close")},
{Qt::Key_Copy, QStringLiteral("Copy")},
{Qt::Key_Cut, QStringLiteral("Cut")},
{Qt::Key_Display, QStringLiteral("Display")},
{Qt::Key_DOS, QStringLiteral("DOS")},
{Qt::Key_Documents, QStringLiteral("Documents")},
{Qt::Key_Excel, QStringLiteral("Excel")},
{Qt::Key_Explorer, QStringLiteral("Explorer")},
{Qt::Key_Game, QStringLiteral("Game")},
{Qt::Key_Go, QStringLiteral("Go")},
{Qt::Key_iTouch, QStringLiteral("iTouch")},
{Qt::Key_LogOff, QStringLiteral("LogOff")},
{Qt::Key_Market, QStringLiteral("Market")},
{Qt::Key_Meeting, QStringLiteral("Meeting")},
{Qt::Key_MenuKB, QStringLiteral("MenuKB")},
{Qt::Key_MenuPB, QStringLiteral("MenuPB")},
{Qt::Key_MySites, QStringLiteral("MySites")},
{Qt::Key_News, QStringLiteral("News")},
{Qt::Key_OfficeHome, QStringLiteral("OfficeHome")},
{Qt::Key_Option, QStringLiteral("Option")},
{Qt::Key_Paste, QStringLiteral("Paste")},
{Qt::Key_Phone, QStringLiteral("Phone")},
{Qt::Key_Calendar, QStringLiteral("Calendar")},
{Qt::Key_Reply, QStringLiteral("Reply")},
{Qt::Key_Reload, QStringLiteral("Reload")},
{Qt::Key_RotateWindows, QStringLiteral("RotateWindows")},
{Qt::Key_RotationPB, QStringLiteral("RotationPB")},
{Qt::Key_RotationKB, QStringLiteral("RotationKB")},
{Qt::Key_Save, QStringLiteral("Save")},
{Qt::Key_Send, QStringLiteral("Send")},
{Qt::Key_Spell, QStringLiteral("Spell")},
{Qt::Key_SplitScreen, QStringLiteral("SplitScreen")},
{Qt::Key_Support, QStringLiteral("Support")},
{Qt::Key_TaskPane, QStringLiteral("TaskPane")},
{Qt::Key_Terminal, QStringLiteral("Terminal")},
{Qt::Key_Tools, QStringLiteral("Tools")},
{Qt::Key_Travel, QStringLiteral("Travel")},
{Qt::Key_Video, QStringLiteral("Video")},
{Qt::Key_Word, QStringLiteral("Word")},
{Qt::Key_Xfer, QStringLiteral("Xfer")},
{Qt::Key_ZoomIn, QStringLiteral("ZoomIn")},
{Qt::Key_ZoomOut, QStringLiteral("ZoomOut")},
{Qt::Key_Away, QStringLiteral("Away")},
{Qt::Key_Messenger, QStringLiteral("Messenger")},
{Qt::Key_WebCam, QStringLiteral("WebCam")},
{Qt::Key_MailForward, QStringLiteral("MailForward")},
{Qt::Key_Pictures, QStringLiteral("Pictures")},
{Qt::Key_Music, QStringLiteral("Music")},
{Qt::Key_Battery, QStringLiteral("Battery")},
{Qt::Key_Bluetooth, QStringLiteral("Bluetooth")},
{Qt::Key_WLAN, QStringLiteral("WLAN")},
{Qt::Key_UWB, QStringLiteral("UWB")},
{Qt::Key_AudioForward, QStringLiteral("AudioForward")},
{Qt::Key_AudioRepeat, QStringLiteral("AudioRepeat")},
{Qt::Key_AudioRandomPlay, QStringLiteral("AudioRandomPlay")},
{Qt::Key_Subtitle, QStringLiteral("Subtitle")},
{Qt::Key_AudioCycleTrack, QStringLiteral("AudioCycleTrack")},
{Qt::Key_Time, QStringLiteral("Time")},
{Qt::Key_Hibernate, QStringLiteral("Hibernate")},
{Qt::Key_View, QStringLiteral("View")},
{Qt::Key_TopMenu, QStringLiteral("TopMenu")},
{Qt::Key_PowerDown, QStringLiteral("PowerDown")},
{Qt::Key_Suspend, QStringLiteral("Suspend")},
{Qt::Key_ContrastAdjust, QStringLiteral("ContrastAdjust")},
{Qt::Key_LaunchG, QStringLiteral("LaunchG")},
{Qt::Key_LaunchH, QStringLiteral("LaunchH")},
{Qt::Key_TouchpadToggle, QStringLiteral("TouchpadToggle")},
{Qt::Key_TouchpadOn, QStringLiteral("TouchpadOn")},
{Qt::Key_TouchpadOff, QStringLiteral("TouchpadOff")},
{Qt::Key_MicMute, QStringLiteral("MicMute")},
{Qt::Key_Red, QStringLiteral("Red")},
{Qt::Key_Green, QStringLiteral("Green")},
{Qt::Key_Yellow, QStringLiteral("Yellow")},
{Qt::Key_Blue, QStringLiteral("Blue")},
{Qt::Key_ChannelUp, QStringLiteral("ChannelUp")},
{Qt::Key_ChannelDown, QStringLiteral("ChannelDown")},
{Qt::Key_Guide, QStringLiteral("Guide")},
{Qt::Key_Info, QStringLiteral("Info")},
{Qt::Key_Settings, QStringLiteral("Settings")},
{Qt::Key_MicVolumeUp, QStringLiteral("MicVolumeUp")},
{Qt::Key_MicVolumeDown, QStringLiteral("MicVolumeDown")},
{Qt::Key_New, QStringLiteral("New")},
{Qt::Key_Open, QStringLiteral("Open")},
{Qt::Key_Find, QStringLiteral("Find")},
{Qt::Key_Undo, QStringLiteral("Undo")},
{Qt::Key_Redo, QStringLiteral("Redo")},
{Qt::Key_MediaLast, QStringLiteral("MediaLast")},
{Qt::Key_Select, QStringLiteral("Select")},
{Qt::Key_Yes, QStringLiteral("Yes")},
{Qt::Key_No, QStringLiteral("No")},
{Qt::Key_Cancel, QStringLiteral("Cancel")},
{Qt::Key_Printer, QStringLiteral("Printer")},
{Qt::Key_Execute, QStringLiteral("Execute")},
{Qt::Key_Sleep, QStringLiteral("Sleep")},
{Qt::Key_Play, QStringLiteral("Play")},
{Qt::Key_Zoom, QStringLiteral("Zoom")},
{Qt::Key_Exit, QStringLiteral("Exit")},
{Qt::Key_Context1, QStringLiteral("Context1")},
{Qt::Key_Context2, QStringLiteral("Context2")},
{Qt::Key_Context3, QStringLiteral("Context3")},
{Qt::Key_Context4, QStringLiteral("Context4")},
{Qt::Key_Call, QStringLiteral("Call")},
{Qt::Key_Hangup, QStringLiteral("Hangup")},
{Qt::Key_Flip, QStringLiteral("Flip")},
{Qt::Key_ToggleCallHangup, QStringLiteral("ToggleCallHangup")},
{Qt::Key_VoiceDial, QStringLiteral("VoiceDial")},
{Qt::Key_LastNumberRedial, QStringLiteral("LastNumberRedial")},
{Qt::Key_Camera, QStringLiteral("Camera")},
{Qt::Key_CameraFocus, QStringLiteral("CameraFocus")}};
struct QtKeyModifierEntry
{
Qt::KeyboardModifier mod;
Qt::Key key;
QString name;
};
static const std::array<QtKeyModifierEntry, 5> s_qt_key_modifiers = {
{{Qt::ShiftModifier, Qt::Key_Shift, QStringLiteral("Shift")},
{Qt::ControlModifier, Qt::Key_Control, QStringLiteral("Control")},
{Qt::AltModifier, Qt::Key_Alt, QStringLiteral("Alt")},
{Qt::MetaModifier, Qt::Key_Meta, QStringLiteral("Meta")},
{Qt::KeypadModifier, static_cast<Qt::Key>(0), QStringLiteral("Keypad")}}};
QString GetKeyIdentifier(int key)
{
const auto it = s_qt_key_names.find(key);
return it == s_qt_key_names.end() ? QString() : it->second;
}
std::optional<int> GetKeyIdForIdentifier(const QString& key_identifier)
{
for (const auto& it : s_qt_key_names)
{
if (it.second == key_identifier)
return it.first;
}
return std::nullopt;
}
QString KeyEventToString(int key, Qt::KeyboardModifiers mods)
{
QString key_name = GetKeyIdentifier(key);
if (key_name.isEmpty())
return {};
QString ret;
for (const QtKeyModifierEntry& mod : s_qt_key_modifiers)
{
if (mods & mod.mod && key != mod.key)
{
ret.append(mod.name);
ret.append('+');
}
}
ret.append(key_name);
return ret;
}
std::optional<int> ParseKeyString(const QString& key_str)
{
const QStringList sections = key_str.split('+');
std::optional<int> key_id = GetKeyIdForIdentifier(sections.last());
if (!key_id)
return std::nullopt;
int ret = key_id.value();
if (sections.size() > 1)
{
const int num_modifiers = sections.size() - 1;
for (int i = 0; i < num_modifiers; i++)
{
for (const QtKeyModifierEntry& mod : s_qt_key_modifiers)
{
if (sections[i] == mod.name)
{
ret |= static_cast<int>(mod.mod);
break;
}
}
}
}
return ret;
}
int KeyEventToInt(int key, Qt::KeyboardModifiers mods)
{
int val = key;
if (mods != 0)
{
for (const QtKeyModifierEntry& mod : s_qt_key_modifiers)
{
if (mods & mod.mod && key != mod.key)
val |= static_cast<int>(mod.mod);
}
}
return val;
}
QByteArray ReadStreamToQByteArray(ByteStream* stream, bool rewind /*= false*/)
{
QByteArray ret;