Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
This commit is contained in:
commit
e727855476
@ -1,5 +1,8 @@
|
||||
load(qt_build_config)
|
||||
CONFIG += qt_example_installs
|
||||
|
||||
QT_SOURCE_TREE = $$PWD
|
||||
QT_BUILD_TREE = $$shadowed($$PWD)
|
||||
|
||||
# In qtbase, all modules follow qglobal.h
|
||||
MODULE_VERSION = $$QT_VERSION
|
||||
|
@ -103,15 +103,15 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
|
||||
" avx"
|
||||
#endif
|
||||
#ifdef __AVX2__
|
||||
// AVX 2, Intel codename "Haswell"
|
||||
// AVX 2, Intel Core 4th Generation ("Haswell")
|
||||
" avx2"
|
||||
#endif
|
||||
#ifdef __BMI__
|
||||
// Bit Manipulation Instructions 1, Intel codename "Haswell", AMD "Bulldozer 2"
|
||||
// Bit Manipulation Instructions 1, Intel Core 4th Generation ("Haswell"), AMD "Bulldozer 2"
|
||||
" bmi"
|
||||
#endif
|
||||
#ifdef __BMI2__
|
||||
// Bit Manipulation Instructions 2, Intel codename "Haswell"
|
||||
// Bit Manipulation Instructions 2, Intel Core 4th Generation ("Haswell")
|
||||
" bmi2"
|
||||
#endif
|
||||
#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
|
||||
@ -120,11 +120,11 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
|
||||
" cx16"
|
||||
#endif
|
||||
#ifdef __F16C__
|
||||
// 16-bit floating point conversion, Intel codename "Ivy Bridge"
|
||||
// 16-bit floating point conversion, Intel Core 3rd Generation ("Ivy Bridge")
|
||||
" f16c"
|
||||
#endif
|
||||
#ifdef __FMA__
|
||||
// Fused Multiply-Add with 3 arguments, Intel codename "Haswell", AMD "Bulldozer 2"
|
||||
// Fused Multiply-Add with 3 arguments, Intel Core 4th Generation ("Haswell"), AMD "Bulldozer 2"
|
||||
// a.k.a. "FMA3"
|
||||
" fma"
|
||||
#endif
|
||||
@ -133,7 +133,7 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
|
||||
" fma4"
|
||||
#endif
|
||||
#ifdef __FSGSBASE__
|
||||
// rdfsgsbase, wrfsgsbase, Intel codename "Ivy Bridge"
|
||||
// rdfsgsbase, wrfsgsbase, Intel Core 3rd Generation ("Ivy Bridge")
|
||||
" fsgsbase"
|
||||
#endif
|
||||
#ifdef __LWP__
|
||||
@ -141,7 +141,7 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
|
||||
" lwp"
|
||||
#endif
|
||||
#ifdef __LZCNT__
|
||||
// Leading-Zero bit count, Intel codename "Haswell"
|
||||
// Leading-Zero bit count, Intel Core 4th Generation ("Haswell")
|
||||
" lzcnt"
|
||||
#endif
|
||||
#ifdef __MMX__
|
||||
@ -166,7 +166,7 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
|
||||
" popcnt"
|
||||
#endif
|
||||
#ifdef __RDRND__
|
||||
// Random number generator, Intel codename "Ivy Bridge"
|
||||
// Random number generator, Intel Core 3rd Generation ("Ivy Bridge")
|
||||
" rdrnd"
|
||||
#endif
|
||||
#if defined(__SSE__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1) || defined(_M_X64)
|
||||
|
36
configure
vendored
36
configure
vendored
@ -2347,11 +2347,19 @@ while [ "$#" -gt 0 ]; do
|
||||
CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION="$VAL"
|
||||
;;
|
||||
l*) # -lfoo
|
||||
L_FLAGS="$L_FLAGS -l\"${VAR#l}\""
|
||||
if [ "$VAL" = "yes" ]; then
|
||||
L_FLAGS="$L_FLAGS -l\"${VAR#l}\""
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
;;
|
||||
fw*) # -fwfoo
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
L_FLAGS="$L_FLAGS -framework \"${VAR#fw}\""
|
||||
if [ "$VAL" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
L_FLAGS="$L_FLAGS -framework \"${VAR#fw}\""
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
@ -2851,7 +2859,7 @@ if [ "$XPLATFORM_IOS" = "yes" ]; then
|
||||
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples tests"
|
||||
CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store
|
||||
CFG_CXX11="no" # C++11 support disabled for now
|
||||
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtquickcontrols qtwebkit qtgraphicaleffects qtdoc qtmultimedia qtwebkit-examples-and-demos qttools"
|
||||
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtquickcontrols qtwebkit qtgraphicaleffects qtdoc qtmultimedia qtwebkit-examples qttools"
|
||||
fi
|
||||
|
||||
# disable GTK style support auto-detection on Mac
|
||||
@ -5348,7 +5356,7 @@ if [ "$CFG_XKBCOMMON" != "qt" ]; then
|
||||
QMakeVar set QMAKE_CFLAGS_XKBCOMMON "$QMAKE_CFLAGS_XKBCOMMON"
|
||||
QMakeVar set QMAKE_LIBS_XKBCOMMON "$QMAKE_LIBS_XKBCOMMON"
|
||||
QMakeVar set QMAKE_VERSION_XKBCOMMON "$QMAKE_VERSION_XKBCOMMON"
|
||||
CFG_XKBCOMMON=yes
|
||||
CFG_XKBCOMMON=system
|
||||
else
|
||||
CFG_XKBCOMMON=no
|
||||
fi
|
||||
@ -6664,24 +6672,6 @@ else
|
||||
mv -f "$QTMODULE.tmp" "$QTMODULE"
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# save configuration into .qmake.cache
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
CACHEFILE="$outpath/.qmake.cache"
|
||||
[ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
|
||||
cat >>"$CACHEFILE.tmp" <<EOF
|
||||
QT_SOURCE_TREE = \$\$quote($relpath)
|
||||
QT_BUILD_TREE = \$\$quote($outpath)
|
||||
EOF
|
||||
|
||||
# replace .qmake.cache if it differs from the newly created temp file
|
||||
if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
|
||||
rm -f "$CACHEFILE.tmp"
|
||||
else
|
||||
mv -f "$CACHEFILE.tmp" "$CACHEFILE"
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# give feedback on configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -36,6 +36,7 @@ manifestmeta.filters = highlighted webkit1 webkit2 android
|
||||
|
||||
manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \
|
||||
"QtQuick/Qt Quick Demo - Photo Surface" \
|
||||
"QtQuick/Qt Quick Demo - Tweet Search" \
|
||||
"QtQuick/Qt Quick Demo - Maroon*" \
|
||||
"QtQuick/Qt Quick Demo - Calqlatr" \
|
||||
"QtQuick/Qt Quick Particles Examples - Emitters" \
|
||||
|
@ -3,8 +3,8 @@ MAKEFILE_GENERATOR = UNIX
|
||||
QMAKE_PLATFORM = android
|
||||
QMAKE_COMPILER = gcc
|
||||
|
||||
CONFIG += android_install
|
||||
DEFINES += QT_NO_PRINTDIALOG
|
||||
CONFIG += android_install unversioned_soname
|
||||
DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG
|
||||
|
||||
include(../common/linux.conf)
|
||||
include(../common/gcc-base-unix.conf)
|
||||
@ -109,8 +109,12 @@ equals(ANDROID_TARGET_ARCH, x86) {
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -O2
|
||||
QMAKE_CFLAGS_DEBUG = -g -fno-omit-frame-pointer
|
||||
} else { # arm
|
||||
QMAKE_CFLAGS_RELEASE = -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64
|
||||
QMAKE_CFLAGS_RELEASE = -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64
|
||||
equals(ANDROID_TARGET_ARCH, armeabi-v7a) {
|
||||
QMAKE_CFLAGS_RELEASE += -mthumb
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -mthumb
|
||||
}
|
||||
QMAKE_CFLAGS_DEBUG = -g -marm -O0 -fno-omit-frame-pointer
|
||||
}
|
||||
|
||||
@ -173,7 +177,6 @@ contains(NDK_ROOT, ".*r6")|contains(NDK_ROOT, ".*r5.*") {
|
||||
}
|
||||
|
||||
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
||||
QMAKE_LFLAGS_SONAME =
|
||||
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
|
||||
QMAKE_LFLAGS_RPATH = -Wl,-rpath=
|
||||
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link=
|
||||
|
7
mkspecs/devices/common/linux_arm_device_post.conf
Normal file
7
mkspecs/devices/common/linux_arm_device_post.conf
Normal file
@ -0,0 +1,7 @@
|
||||
contains(DISTRO_OPTS, hard-float) {
|
||||
COMPILER_FLAGS += -mfloat-abi=hard
|
||||
} else {
|
||||
COMPILER_FLAGS += -mfloat-abi=softfp
|
||||
}
|
||||
|
||||
include(linux_device_post.conf)
|
@ -3,12 +3,6 @@ contains(DISTRO_OPTS, deb-multi-arch) {
|
||||
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/$${GCC_MACHINE_DUMP}
|
||||
}
|
||||
|
||||
contains(DISTRO_OPTS, hard-float) {
|
||||
COMPILER_FLAGS += -mfloat-abi=hard
|
||||
} else {
|
||||
COMPILER_FLAGS += -mfloat-abi=softfp
|
||||
}
|
||||
|
||||
QMAKE_CFLAGS += $$COMPILER_FLAGS
|
||||
QMAKE_CXXFLAGS += $$COMPILER_FLAGS
|
||||
|
||||
|
@ -32,6 +32,6 @@ QMAKE_CXXFLAGS_RELEASE += $$IMX5_CFLAGS_RELEASE
|
||||
QMAKE_CFLAGS_DEBUG += $$IMX5_CFLAGS
|
||||
QMAKE_CXXFLAGS_DEBUG += $$IMX5_CFLAGS
|
||||
|
||||
include(../common/linux_device_post.conf)
|
||||
include(../common/linux_arm_device_post.conf)
|
||||
|
||||
load(qt_config)
|
||||
|
@ -34,6 +34,6 @@ QMAKE_CXXFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
|
||||
QMAKE_CFLAGS_DEBUG += $$IMX6_CFLAGS
|
||||
QMAKE_CXXFLAGS_DEBUG += $$IMX6_CFLAGS
|
||||
|
||||
include(../common/linux_device_post.conf)
|
||||
include(../common/linux_arm_device_post.conf)
|
||||
|
||||
load(qt_config)
|
||||
|
@ -42,6 +42,6 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
|
||||
EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_pi.cpp
|
||||
EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
|
||||
|
||||
include(../common/linux_device_post.conf)
|
||||
include(../common/linux_arm_device_post.conf)
|
||||
|
||||
load(qt_config)
|
||||
|
@ -26,6 +26,6 @@ TEGRA2_CFLAGS = -mtune=cortex-a9 -march=armv7-a -mhard-float -mfloat-a
|
||||
QMAKE_CFLAGS += $$TEGRA2_CFLAGS
|
||||
QMAKE_CXXFLAGS += $$TEGRA2_CFLAGS
|
||||
|
||||
include(../common/linux_device_post.conf)
|
||||
include(../common/linux_arm_device_post.conf)
|
||||
|
||||
load(qt_config)
|
||||
|
@ -29,7 +29,7 @@ defineReplace(cmakeTargetPath) {
|
||||
SYSR = $$[QT_SYSROOT]
|
||||
!isEmpty(SYSR): path = $$relative_path($$1, $$[QT_SYSROOT])
|
||||
else: path = $$1
|
||||
return(/$$path)
|
||||
return($$clean_path(/$$path))
|
||||
}
|
||||
|
||||
defineReplace(cmakeTargetPaths) {
|
||||
|
@ -4,6 +4,9 @@ if (CMAKE_VERSION VERSION_LESS 2.8.3)
|
||||
endif()
|
||||
|
||||
!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
|
||||
!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||
set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
||||
!!ELSE
|
||||
get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
|
||||
# Use original install prefix when loaded through a
|
||||
# cross-prefix symbolic link such as /lib -> /usr/lib.
|
||||
@ -17,6 +20,7 @@ endif()
|
||||
unset(_realOrig)
|
||||
unset(_realCurr)
|
||||
unset(_IMPORT_PREFIX)
|
||||
!!ENDIF
|
||||
!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||
get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
||||
!!ELSE
|
||||
@ -49,7 +53,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
|
||||
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
||||
set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
||||
!!ELSE
|
||||
set(imported_location \"IMPORTED_LOCATION_${Configuration}\" \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
||||
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
||||
!!ENDIF
|
||||
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
|
||||
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
|
||||
|
@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
QMAKE_GDB_INDEX += \
|
||||
test \$\$(gdb --version | sed -e \'s,[^0-9]\\+\\([0-9]\\)\\.\\([0-9]\\).*,\\1\\2,;q\') -gt 72 && \
|
||||
test \$\$(gdb --version | sed -e \'s,[^0-9][^0-9]*\\([0-9]\\)\\.\\([0-9]\\).*,\\1\\2,;q\') -gt 72 && \
|
||||
gdb --nx --batch --quiet -ex \'set confirm off\' -ex \"save gdb-index $$QMAKE_GDB_DIR\" -ex quit \'$(TARGET)\' && \
|
||||
test -f $(TARGET).gdb-index && \
|
||||
$$QMAKE_OBJCOPY --add-section \'.gdb_index=$(TARGET).gdb-index\' --set-section-flags \'.gdb_index=readonly\' \'$(TARGET)\' \'$(TARGET)\' && \
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@TYPEINFO@</string>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@TYPEINFO@</string>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@TYPEINFO@</string>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@TYPEINFO@</string>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@TYPEINFO@</string>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@TYPEINFO@</string>
|
||||
|
22
mkspecs/macx-icc/Info.plist.app
Normal file
22
mkspecs/macx-icc/Info.plist.app
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>@ICON@</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@TYPEINFO@</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.@EXECUTABLE@</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
</plist>
|
18
mkspecs/macx-icc/Info.plist.lib
Normal file
18
mkspecs/macx-icc/Info.plist.lib
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@TYPEINFO@</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@LIBRARY@</string>
|
||||
<key>NOTE</key>
|
||||
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@TYPEINFO@</string>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>@ICON@</string>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@TYPEINFO@</string>
|
||||
|
@ -26,4 +26,52 @@ imagedirs = images
|
||||
exampledirs = snippets
|
||||
|
||||
depends += \
|
||||
qtwinextras
|
||||
activeqt \
|
||||
qt3d \
|
||||
qtassistant \
|
||||
qtbluetooth \
|
||||
qtconcurrent \
|
||||
qtcontacts \
|
||||
qtcore \
|
||||
qtdbus \
|
||||
qtdesigner \
|
||||
qtfeedback \
|
||||
qtgraphicaleffects \
|
||||
qtgui \
|
||||
qthelp \
|
||||
qtimageformats \
|
||||
qtlinguist \
|
||||
qtlocation \
|
||||
qtmultimedia \
|
||||
qtmultimediawidgets \
|
||||
qtnetwork \
|
||||
qtopengl \
|
||||
qtorganizer \
|
||||
qtprintsupport \
|
||||
qtpublishsubscribe \
|
||||
qtqml \
|
||||
qtquick \
|
||||
qtquickcontrols \
|
||||
qtquickcontrolsstyles \
|
||||
qtquickdialogs \
|
||||
qtquicklayouts \
|
||||
qtscript \
|
||||
qtscripttools \
|
||||
qtsensors \
|
||||
qtserialport \
|
||||
qtserviceframework \
|
||||
qtsql \
|
||||
qtsvg \
|
||||
qtsysteminfo \
|
||||
qttestlib \
|
||||
qttools \
|
||||
qtuitools \
|
||||
qtversit \
|
||||
qtwebkit \
|
||||
qtwebkitexamples \
|
||||
qtwidgets \
|
||||
qtwinextras \
|
||||
qtx11extras \
|
||||
qtxml \
|
||||
qtxmlpatterns
|
||||
|
||||
|
@ -851,6 +851,7 @@
|
||||
\contentspage {qmake Manual}{Contents}
|
||||
\previouspage Reference
|
||||
\nextpage Replace Functions
|
||||
\keyword qmake Variable Reference
|
||||
|
||||
The fundamental behavior of qmake is influenced by variable declarations that
|
||||
define the build process of each project. Some of these declare resources,
|
||||
@ -2423,6 +2424,7 @@
|
||||
\contentspage {qmake Manual}{Contents}
|
||||
\previouspage Variables
|
||||
\nextpage Test Functions
|
||||
\keyword qmake Function Reference - Replace Functions
|
||||
|
||||
qmake provides functions for processing the contents of variables
|
||||
during the configuration process. These functions are called
|
||||
@ -2752,6 +2754,7 @@
|
||||
\title Test Functions
|
||||
\contentspage {qmake Manual}{Contents}
|
||||
\previouspage Replace Functions
|
||||
\keyword qmake Function Reference - Test Functions
|
||||
|
||||
Test functions return a boolean value that you can test for in the
|
||||
conditional parts of scopes. Test functions can be divided into
|
||||
|
@ -1178,6 +1178,9 @@ void UnixMakefileGenerator::init2()
|
||||
soname += project->first("TARGET");
|
||||
} else if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
soname += project->first("TARGET_x.y");
|
||||
} else if(project->isActiveConfig("unversioned_soname")) {
|
||||
soname = "lib" + project->first("QMAKE_ORIG_TARGET")
|
||||
+ "." + project->first("QMAKE_EXTENSION_SHLIB");
|
||||
} else if(!project->values("TARGET_x").isEmpty()) {
|
||||
soname += project->first("TARGET_x");
|
||||
}
|
||||
|
@ -57,6 +57,12 @@ import android.view.ContextMenu;
|
||||
import android.view.Menu;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import java.security.KeyStore;
|
||||
import java.security.cert.X509Certificate;
|
||||
import javax.net.ssl.TrustManagerFactory;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
public class QtNative
|
||||
{
|
||||
private static Activity m_activity = null;
|
||||
@ -337,28 +343,6 @@ public class QtNative
|
||||
touchEnd(id,1);
|
||||
}
|
||||
//@ANDROID-5
|
||||
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_UP:
|
||||
mouseUp(id,(int) event.getX(), (int) event.getY());
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
mouseDown(id,(int) event.getX(), (int) event.getY());
|
||||
m_oldx = (int) event.getX();
|
||||
m_oldy = (int) event.getY();
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
int dx = (int) (event.getX() - m_oldx);
|
||||
int dy = (int) (event.getY() - m_oldy);
|
||||
if (Math.abs(dx) > m_moveThreshold || Math.abs(dy) > m_moveThreshold) {
|
||||
mouseMove(id, (int) event.getX(), (int) event.getY());
|
||||
m_oldx = (int) event.getX();
|
||||
m_oldy = (int) event.getY();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static public void sendTrackballEvent(MotionEvent event, int id)
|
||||
@ -534,6 +518,33 @@ public class QtNative
|
||||
});
|
||||
}
|
||||
|
||||
private static byte[][] getSSLCertificates()
|
||||
{
|
||||
ArrayList<byte[]> certificateList = new ArrayList<byte[]>();
|
||||
|
||||
try {
|
||||
TrustManagerFactory factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
|
||||
factory.init((KeyStore) null);
|
||||
|
||||
for (TrustManager manager : factory.getTrustManagers()) {
|
||||
if (manager instanceof X509TrustManager) {
|
||||
X509TrustManager trustManager = (X509TrustManager) manager;
|
||||
|
||||
for (X509Certificate certificate : trustManager.getAcceptedIssuers()) {
|
||||
byte buffer[] = certificate.getEncoded();
|
||||
certificateList.add(buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(QtTAG, "Failed to get certificates", e);
|
||||
}
|
||||
|
||||
byte[][] certificateArray = new byte[certificateList.size()][];
|
||||
certificateArray = certificateList.toArray(certificateArray);
|
||||
return certificateArray;
|
||||
}
|
||||
|
||||
// screen methods
|
||||
public static native void setDisplayMetrics(int screenWidthPixels,
|
||||
int screenHeightPixels,
|
||||
|
@ -19,6 +19,14 @@ endforeach()
|
||||
|
||||
set(BUILD_OPTIONS_LIST)
|
||||
|
||||
if (CMAKE_C_COMPILER)
|
||||
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER)
|
||||
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
|
||||
endif()
|
||||
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
@ -219,6 +219,18 @@ set(_Qt5_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")
|
||||
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
|
||||
macro(qt5_use_modules _target _link_type)
|
||||
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
|
||||
if(CMAKE_WARN_DEPRECATED)
|
||||
set(messageType WARNING)
|
||||
endif()
|
||||
if(CMAKE_ERROR_DEPRECATED)
|
||||
set(messageType FATAL_ERROR)
|
||||
endif()
|
||||
if(messageType)
|
||||
message(${messageType} "The qt5_use_modules macro is obsolete. Use target_link_libraries with IMPORTED targets instead.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT TARGET ${_target})
|
||||
message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.")
|
||||
endif()
|
||||
|
@ -584,7 +584,7 @@
|
||||
# if __has_feature(cxx_alias_templates)
|
||||
# define Q_COMPILER_TEMPLATE_ALIAS
|
||||
# endif
|
||||
# if 0 /* not implemented in clang yet */
|
||||
# if __has_feature(cxx_thread_local)
|
||||
# define Q_COMPILER_THREAD_LOCAL
|
||||
# endif
|
||||
# if __has_feature(cxx_user_literals)
|
||||
|
@ -2324,7 +2324,7 @@ Q_GLOBAL_STATIC(SeedStorage, randTLS) // Thread Local Storage for seed value
|
||||
*/
|
||||
void qsrand(uint seed)
|
||||
{
|
||||
#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD)
|
||||
#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && (_POSIX_THREAD_SAFE_FUNCTIONS - 0 > 0)
|
||||
SeedStorage *seedStorage = randTLS();
|
||||
if (seedStorage) {
|
||||
SeedStorageType *pseed = seedStorage->localData();
|
||||
|
@ -1211,12 +1211,8 @@
|
||||
|
||||
/*! \typedef Qt::HANDLE
|
||||
|
||||
Platform-specific handle type for system objects. This is
|
||||
equivalent to \c{void *} on Mac OS X and embedded Linux,
|
||||
and to \c{unsigned long} on X11. On Windows it is the
|
||||
DWORD returned by the Win32 function getCurrentThreadId().
|
||||
|
||||
\warning Using this type is not portable.
|
||||
A handle type for system objects, defined as \c{void *}
|
||||
on all platforms.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -62,8 +62,8 @@
|
||||
SOLARIS - Sun Solaris
|
||||
HPUX - HP-UX
|
||||
ULTRIX - DEC Ultrix
|
||||
LINUX - Linux
|
||||
FREEBSD - FreeBSD
|
||||
LINUX - Linux [has variants]
|
||||
FREEBSD - FreeBSD [has variants]
|
||||
NETBSD - NetBSD
|
||||
OPENBSD - OpenBSD
|
||||
BSDI - BSD/OS
|
||||
@ -76,12 +76,20 @@
|
||||
DGUX - DG/UX
|
||||
RELIANT - Reliant UNIX
|
||||
DYNIX - DYNIX/ptx
|
||||
QNX - QNX
|
||||
QNX - QNX [has variants]
|
||||
QNX6 - QNX RTP 6.1
|
||||
LYNX - LynxOS
|
||||
BSD4 - Any BSD 4.4 system
|
||||
UNIX - Any UNIX BSD/SYSV system
|
||||
ANDROID - Android platform
|
||||
|
||||
The following operating systems have variants:
|
||||
LINUX - both Q_OS_LINUX and Q_OS_ANDROID are defined when building for Android
|
||||
- only Q_OS_LINUX is defined if building for other Linux systems
|
||||
QNX - both Q_OS_QNX and Q_OS_BLACKBERRY are defined when building for Blackberry 10
|
||||
- only Q_OS_QNX is defined if building for other QNX targets
|
||||
FREEBSD - Q_OS_FREEBSD is defined only when building for FreeBSD with a BSD userland
|
||||
- Q_OS_FREEBSD_KERNEL is always defined on FreeBSD, even if the userland is from GNU
|
||||
*/
|
||||
|
||||
#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
|
||||
@ -118,8 +126,11 @@
|
||||
# define Q_OS_NACL
|
||||
#elif defined(__linux__) || defined(__linux)
|
||||
# define Q_OS_LINUX
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
# define Q_OS_FREEBSD
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
|
||||
# ifndef __FreeBSD_kernel__
|
||||
# define Q_OS_FREEBSD
|
||||
# endif
|
||||
# define Q_OS_FREEBSD_KERNEL
|
||||
# define Q_OS_BSD4
|
||||
#elif defined(__NetBSD__)
|
||||
# define Q_OS_NETBSD
|
||||
@ -239,10 +250,6 @@
|
||||
# if !defined(__IPHONE_7_0)
|
||||
# define __IPHONE_7_0 70000
|
||||
# endif
|
||||
#
|
||||
# if (__MAC_OS_X_VERSION_MAX_ALLOWED > __MAC_10_8)
|
||||
# warning "This version of OS X is unsupported"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __LSB_VERSION__
|
||||
|
@ -1691,10 +1691,10 @@ QProcessEnvironment QProcess::processEnvironment() const
|
||||
bool QProcess::waitForStarted(int msecs)
|
||||
{
|
||||
Q_D(QProcess);
|
||||
if (d->processState == QProcess::Running)
|
||||
return true;
|
||||
if (d->processState == QProcess::Starting)
|
||||
return d->waitForStarted(msecs);
|
||||
|
||||
return d->waitForStarted(msecs);
|
||||
return d->processState == QProcess::Running;
|
||||
}
|
||||
|
||||
/*! \reimp
|
||||
|
@ -622,6 +622,8 @@ void QItemSelectionModelPrivate::initModel(QAbstractItemModel *model)
|
||||
q, SLOT(_q_layoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)));
|
||||
QObject::connect(model, SIGNAL(layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)),
|
||||
q, SLOT(_q_layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)));
|
||||
QObject::connect(model, SIGNAL(modelReset()),
|
||||
q, SLOT(reset()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -396,9 +396,13 @@ QVariant QJsonValue::toVariant() const
|
||||
case String:
|
||||
return toString();
|
||||
case Array:
|
||||
return QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)).toVariantList();
|
||||
return d ?
|
||||
QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)).toVariantList() :
|
||||
QVariantList();
|
||||
case Object:
|
||||
return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)).toVariantMap();
|
||||
return d ?
|
||||
QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)).toVariantMap() :
|
||||
QVariantMap();
|
||||
case Null:
|
||||
case Undefined:
|
||||
break;
|
||||
|
@ -1972,7 +1972,7 @@ QString QCoreApplication::applicationFilePath()
|
||||
}
|
||||
#endif
|
||||
#if defined( Q_OS_UNIX )
|
||||
# ifdef Q_OS_LINUX
|
||||
# if defined(Q_OS_LINUX) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID_NO_SDK))
|
||||
// Try looking for a /proc/<pid>/exe symlink first which points to
|
||||
// the absolute path of the executable
|
||||
QFileInfo pfi(QString::fromLatin1("/proc/%1/exe").arg(getpid()));
|
||||
|
@ -1589,6 +1589,14 @@ bool QMetaObject::invokeMethod(QObject *obj,
|
||||
\internal
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro Q_METAMETHOD_INVOKE_MAX_ARGS
|
||||
\relates QMetaMethod
|
||||
|
||||
Equals maximum number of arguments available for
|
||||
execution of the method via QMetaMethod::invoke()
|
||||
*/
|
||||
|
||||
QByteArray QMetaMethodPrivate::signature() const
|
||||
{
|
||||
Q_ASSERT(priv(mobj->d.data)->revision >= 7);
|
||||
|
@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
template <typename T> class QList;
|
||||
|
||||
#define Q_METAMETHOD_INVOKE_MAX_ARGS 10
|
||||
|
||||
class Q_CORE_EXPORT QMetaMethod
|
||||
{
|
||||
public:
|
||||
|
@ -816,6 +816,14 @@ QObject::~QObject()
|
||||
m->unlock();
|
||||
|
||||
connectionList.first = c->nextConnectionList;
|
||||
|
||||
// The destroy operation must happen outside the lock
|
||||
if (c->isSlotObject) {
|
||||
locker.unlock();
|
||||
c->slotObj->destroyIfLastRef();
|
||||
c->isSlotObject = false;
|
||||
locker.relock();
|
||||
}
|
||||
c->deref();
|
||||
}
|
||||
}
|
||||
@ -3135,6 +3143,13 @@ bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c,
|
||||
|
||||
c->receiver = 0;
|
||||
|
||||
if (c->isSlotObject) {
|
||||
senderMutex->unlock();
|
||||
c->slotObj->destroyIfLastRef();
|
||||
c->isSlotObject = false;
|
||||
senderMutex->lock();
|
||||
}
|
||||
|
||||
success = true;
|
||||
|
||||
if (disconnectType == DisconnectOne)
|
||||
@ -4385,16 +4400,19 @@ bool QObject::disconnect(const QMetaObject::Connection &connection)
|
||||
|
||||
QMutex *senderMutex = signalSlotLock(c->sender);
|
||||
QMutex *receiverMutex = signalSlotLock(c->receiver);
|
||||
QOrderedMutexLocker locker(senderMutex, receiverMutex);
|
||||
|
||||
QObjectConnectionListVector *connectionLists = QObjectPrivate::get(c->sender)->connectionLists;
|
||||
Q_ASSERT(connectionLists);
|
||||
connectionLists->dirty = true;
|
||||
{
|
||||
QOrderedMutexLocker locker(senderMutex, receiverMutex);
|
||||
|
||||
*c->prev = c->next;
|
||||
if (c->next)
|
||||
c->next->prev = c->prev;
|
||||
c->receiver = 0;
|
||||
QObjectConnectionListVector *connectionLists = QObjectPrivate::get(c->sender)->connectionLists;
|
||||
Q_ASSERT(connectionLists);
|
||||
connectionLists->dirty = true;
|
||||
|
||||
*c->prev = c->next;
|
||||
if (c->next)
|
||||
c->next->prev = c->prev;
|
||||
c->receiver = 0;
|
||||
}
|
||||
|
||||
// destroy the QSlotObject, if possible
|
||||
if (c->isSlotObject) {
|
||||
|
@ -77,9 +77,11 @@ void QMimeGlobMatchResult::addMatch(const QString &mimeType, int weight, const Q
|
||||
m_matchingPatternLength = pattern.length();
|
||||
m_weight = weight;
|
||||
}
|
||||
m_matchingMimeTypes.append(mimeType);
|
||||
if (pattern.startsWith(QLatin1String("*.")))
|
||||
m_foundSuffix = pattern.mid(2);
|
||||
if (!m_matchingMimeTypes.contains(mimeType)) {
|
||||
m_matchingMimeTypes.append(mimeType);
|
||||
if (pattern.startsWith(QLatin1String("*.")))
|
||||
m_foundSuffix = pattern.mid(2);
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -586,7 +586,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
|
||||
d->data()[len] = 0;
|
||||
|
||||
{
|
||||
QByteArrayDataPtr dataPtr = { reinterpret_cast<QByteArrayData *>(d.take()) };
|
||||
QByteArrayDataPtr dataPtr = { d.take() };
|
||||
return QByteArray(dataPtr);
|
||||
}
|
||||
|
||||
@ -3152,7 +3152,7 @@ QByteArray QByteArray::trimmed() const
|
||||
}
|
||||
int l = end - start + 1;
|
||||
if (l <= 0) {
|
||||
QByteArrayDataPtr empty = { reinterpret_cast<QByteArrayData *>(Data::allocate(0)) };
|
||||
QByteArrayDataPtr empty = { Data::allocate(0) };
|
||||
return QByteArray(empty);
|
||||
}
|
||||
return QByteArray(s+start, l);
|
||||
@ -3889,7 +3889,7 @@ QByteArray QByteArray::fromRawData(const char *data, int size)
|
||||
x = Data::fromRawData(data, size);
|
||||
Q_CHECK_PTR(x);
|
||||
}
|
||||
QByteArrayDataPtr dataPtr = { reinterpret_cast<QByteArrayData *>(x) };
|
||||
QByteArrayDataPtr dataPtr = { x };
|
||||
return QByteArray(dataPtr);
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ public:
|
||||
bool isNull() const;
|
||||
|
||||
inline QByteArray(QByteArrayDataPtr dd)
|
||||
: d(reinterpret_cast<Data *>(dd.ptr))
|
||||
: d(static_cast<Data *>(dd.ptr))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1226,7 +1226,7 @@ void QHashData::checkSanity()
|
||||
/*! \fn QList<T> QHash::values() const
|
||||
|
||||
Returns a list containing all the values in the hash, in an
|
||||
arbitrary order. If a key is associated multiple values, all of
|
||||
arbitrary order. If a key is associated with multiple values, all of
|
||||
its values will be in the list, and not just the most recently
|
||||
inserted one.
|
||||
|
||||
|
@ -725,18 +725,14 @@ Q_OUTOFLINE_TEMPLATE QList<T>::QList(const QList<T> &l)
|
||||
if (!d->ref.ref()) {
|
||||
p.detach(d->alloc);
|
||||
|
||||
struct Cleanup
|
||||
{
|
||||
Cleanup(QListData::Data *d) : d_(d) {}
|
||||
~Cleanup() { if (d_) QListData::dispose(d_); }
|
||||
|
||||
QListData::Data *d_;
|
||||
} tryCatch(d);
|
||||
|
||||
node_copy(reinterpret_cast<Node *>(p.begin()),
|
||||
reinterpret_cast<Node *>(p.end()),
|
||||
reinterpret_cast<Node *>(l.p.begin()));
|
||||
tryCatch.d_ = 0;
|
||||
QT_TRY {
|
||||
node_copy(reinterpret_cast<Node *>(p.begin()),
|
||||
reinterpret_cast<Node *>(p.end()),
|
||||
reinterpret_cast<Node *>(l.p.begin()));
|
||||
} QT_CATCH(...) {
|
||||
QListData::dispose(d);
|
||||
QT_RETHROW;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -434,7 +434,7 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
|
||||
case CurrencyToString:
|
||||
return macFormatCurrency(in.value<QSystemLocale::CurrencyToStringArgument>());
|
||||
case UILanguages: {
|
||||
QCFType<CFPropertyListRef> languages = (CFArrayRef)CFPreferencesCopyValue(
|
||||
QCFType<CFPropertyListRef> languages = CFPreferencesCopyValue(
|
||||
CFSTR("AppleLanguages"),
|
||||
kCFPreferencesAnyApplication,
|
||||
kCFPreferencesCurrentUser,
|
||||
|
@ -2370,10 +2370,9 @@ static char *_qdtoa( NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt,
|
||||
}
|
||||
|
||||
b = d2b(d, &be, &bbits);
|
||||
#ifdef Sudden_Underflow
|
||||
i = (int)(getWord0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
|
||||
#else
|
||||
if ((i = int(getWord0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1))) != 0) {
|
||||
#ifndef Sudden_Underflow
|
||||
if (i != 0) {
|
||||
#endif
|
||||
d2 = d;
|
||||
setWord0(&d2, getWord0(d2) & Frac_mask1);
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include "qdbusinterface_p.h"
|
||||
#include "qdbusutil_p.h"
|
||||
#include "qdbusconnectionmanager_p.h"
|
||||
#include "qdbuspendingcall_p.h"
|
||||
|
||||
#include "qdbusthreaddebug_p.h"
|
||||
|
||||
@ -611,7 +612,7 @@ QDBusPendingCall QDBusConnection::asyncCall(const QDBusMessage &message, int tim
|
||||
return QDBusPendingCall(0); // null pointer -> disconnected
|
||||
}
|
||||
|
||||
QDBusPendingCallPrivate *priv = d->sendWithReplyAsync(message, timeout);
|
||||
QDBusPendingCallPrivate *priv = d->sendWithReplyAsync(message, 0, 0, 0, timeout);
|
||||
return QDBusPendingCall(priv);
|
||||
}
|
||||
|
||||
|
@ -199,9 +199,8 @@ public:
|
||||
int send(const QDBusMessage &message);
|
||||
QDBusMessage sendWithReply(const QDBusMessage &message, int mode, int timeout = -1);
|
||||
QDBusMessage sendWithReplyLocal(const QDBusMessage &message);
|
||||
QDBusPendingCallPrivate *sendWithReplyAsync(const QDBusMessage &message, int timeout = -1);
|
||||
int sendWithReplyAsync(const QDBusMessage &message, QObject *receiver,
|
||||
const char *returnMethod, const char *errorMethod, int timeout = -1);
|
||||
QDBusPendingCallPrivate *sendWithReplyAsync(const QDBusMessage &message, QObject *receiver,
|
||||
const char *returnMethod, const char *errorMethod,int timeout = -1);
|
||||
bool connectSignal(const QString &service, const QString &path, const QString& interface,
|
||||
const QString &name, const QStringList &argumentMatch, const QString &signature,
|
||||
QObject *receiver, const char *slot);
|
||||
|
@ -1830,7 +1830,6 @@ static void qDBusResultReceived(DBusPendingCall *pending, void *user_data)
|
||||
void QDBusConnectionPrivate::waitForFinished(QDBusPendingCallPrivate *pcall)
|
||||
{
|
||||
Q_ASSERT(pcall->pending);
|
||||
Q_ASSERT(!pcall->autoDelete);
|
||||
//Q_ASSERT(pcall->mutex.isLocked()); // there's no such function
|
||||
|
||||
if (pcall->waitingForFinished) {
|
||||
@ -1846,17 +1845,16 @@ void QDBusConnectionPrivate::waitForFinished(QDBusPendingCallPrivate *pcall)
|
||||
// QDBusConnectionPrivate::processFinishedCall() is called automatically
|
||||
}
|
||||
pcall->mutex.lock();
|
||||
|
||||
if (pcall->pending) {
|
||||
q_dbus_pending_call_unref(pcall->pending);
|
||||
pcall->pending = 0;
|
||||
}
|
||||
|
||||
pcall->waitForFinishedCondition.wakeAll();
|
||||
}
|
||||
}
|
||||
|
||||
// this function is called only in a Q_ASSERT
|
||||
static inline Q_DECL_UNUSED bool waitingForFinishedIsSet(QDBusPendingCallPrivate *call)
|
||||
{
|
||||
const QMutexLocker locker(&call->mutex);
|
||||
return call->waitingForFinished;
|
||||
}
|
||||
|
||||
void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
|
||||
{
|
||||
QDBusConnectionPrivate *connection = const_cast<QDBusConnectionPrivate *>(call->connection);
|
||||
@ -1892,9 +1890,10 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
|
||||
qDBusDebug() << "Deliver failed!";
|
||||
}
|
||||
|
||||
if (call->pending)
|
||||
if (call->pending && !call->waitingForFinished) {
|
||||
q_dbus_pending_call_unref(call->pending);
|
||||
call->pending = 0;
|
||||
call->pending = 0;
|
||||
}
|
||||
|
||||
locker.unlock();
|
||||
|
||||
@ -1905,10 +1904,8 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
|
||||
if (msg.type() == QDBusMessage::ErrorMessage)
|
||||
emit connection->callWithCallbackFailed(QDBusError(msg), call->sentMessage);
|
||||
|
||||
if (call->autoDelete) {
|
||||
Q_ASSERT(!waitingForFinishedIsSet(call)); // can't wait on a call with autoDelete!
|
||||
if (!call->ref.deref())
|
||||
delete call;
|
||||
}
|
||||
}
|
||||
|
||||
int QDBusConnectionPrivate::send(const QDBusMessage& message)
|
||||
@ -1991,7 +1988,7 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
|
||||
|
||||
return amsg;
|
||||
} else { // use the event loop
|
||||
QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, timeout);
|
||||
QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, 0, 0, 0, timeout);
|
||||
Q_ASSERT(pcall);
|
||||
|
||||
if (pcall->replyMessage.type() == QDBusMessage::InvalidMessage) {
|
||||
@ -2007,6 +2004,10 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
|
||||
QDBusMessage reply = pcall->replyMessage;
|
||||
lastError = QDBusError(reply); // set or clear error
|
||||
|
||||
bool r = pcall->ref.deref();
|
||||
Q_ASSERT(!r);
|
||||
Q_UNUSED(r);
|
||||
|
||||
delete pcall;
|
||||
return reply;
|
||||
}
|
||||
@ -2046,19 +2047,55 @@ QDBusMessage QDBusConnectionPrivate::sendWithReplyLocal(const QDBusMessage &mess
|
||||
}
|
||||
|
||||
QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusMessage &message,
|
||||
int timeout)
|
||||
QObject *receiver, const char *returnMethod,
|
||||
const char *errorMethod, int timeout)
|
||||
{
|
||||
if (isServiceRegisteredByThread(message.service())) {
|
||||
// special case for local calls
|
||||
QDBusPendingCallPrivate *pcall = new QDBusPendingCallPrivate(message, this);
|
||||
pcall->replyMessage = sendWithReplyLocal(message);
|
||||
if (receiver && returnMethod)
|
||||
pcall->setReplyCallback(receiver, returnMethod);
|
||||
|
||||
if (errorMethod) {
|
||||
pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
|
||||
connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), receiver, errorMethod,
|
||||
Qt::QueuedConnection);
|
||||
pcall->watcherHelper->moveToThread(thread());
|
||||
}
|
||||
|
||||
if ((receiver && returnMethod) || errorMethod) {
|
||||
// no one waiting, will delete pcall in processFinishedCall()
|
||||
pcall->ref.store(1);
|
||||
} else {
|
||||
// set double ref to prevent race between processFinishedCall() and ref counting
|
||||
// by QDBusPendingCall::QExplicitlySharedDataPointer<QDBusPendingCallPrivate>
|
||||
pcall->ref.store(2);
|
||||
}
|
||||
processFinishedCall(pcall);
|
||||
return pcall;
|
||||
}
|
||||
|
||||
checkThread();
|
||||
QDBusPendingCallPrivate *pcall = new QDBusPendingCallPrivate(message, this);
|
||||
pcall->ref.store(0);
|
||||
if (receiver && returnMethod)
|
||||
pcall->setReplyCallback(receiver, returnMethod);
|
||||
|
||||
if (errorMethod) {
|
||||
pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
|
||||
connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), receiver, errorMethod,
|
||||
Qt::QueuedConnection);
|
||||
pcall->watcherHelper->moveToThread(thread());
|
||||
}
|
||||
|
||||
if ((receiver && returnMethod) || errorMethod) {
|
||||
// no one waiting, will delete pcall in processFinishedCall()
|
||||
pcall->ref.store(1);
|
||||
} else {
|
||||
// set double ref to prevent race between processFinishedCall() and ref counting
|
||||
// by QDBusPendingCall::QExplicitlySharedDataPointer<QDBusPendingCallPrivate>
|
||||
pcall->ref.store(2);
|
||||
}
|
||||
|
||||
QDBusError error;
|
||||
DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message, capabilities, &error);
|
||||
@ -2069,6 +2106,7 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
|
||||
qPrintable(error.message()));
|
||||
pcall->replyMessage = QDBusMessage::createError(error);
|
||||
lastError = error;
|
||||
processFinishedCall(pcall);
|
||||
return pcall;
|
||||
}
|
||||
|
||||
@ -2094,46 +2132,10 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
|
||||
|
||||
q_dbus_message_unref(msg);
|
||||
pcall->replyMessage = QDBusMessage::createError(error);
|
||||
processFinishedCall(pcall);
|
||||
return pcall;
|
||||
}
|
||||
|
||||
int QDBusConnectionPrivate::sendWithReplyAsync(const QDBusMessage &message, QObject *receiver,
|
||||
const char *returnMethod, const char *errorMethod,
|
||||
int timeout)
|
||||
{
|
||||
QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, timeout);
|
||||
Q_ASSERT(pcall);
|
||||
|
||||
// has it already finished with success (dispatched locally)?
|
||||
if (pcall->replyMessage.type() == QDBusMessage::ReplyMessage) {
|
||||
pcall->setReplyCallback(receiver, returnMethod);
|
||||
processFinishedCall(pcall);
|
||||
delete pcall;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// either it hasn't finished or it has finished with error
|
||||
if (errorMethod) {
|
||||
pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
|
||||
connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), receiver, errorMethod,
|
||||
Qt::QueuedConnection);
|
||||
pcall->watcherHelper->moveToThread(thread());
|
||||
}
|
||||
|
||||
// has it already finished and is an error reply message?
|
||||
if (pcall->replyMessage.type() == QDBusMessage::ErrorMessage) {
|
||||
processFinishedCall(pcall);
|
||||
delete pcall;
|
||||
return 1;
|
||||
}
|
||||
|
||||
pcall->autoDelete = true;
|
||||
pcall->ref.ref();
|
||||
pcall->setReplyCallback(receiver, returnMethod);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool QDBusConnectionPrivate::connectSignal(const QString &service,
|
||||
const QString &path, const QString &interface, const QString &name,
|
||||
const QStringList &argumentMatch, const QString &signature,
|
||||
|
@ -75,6 +75,7 @@ private:
|
||||
QByteArray name;
|
||||
QVarLengthArray<int, 4> inputTypes;
|
||||
QVarLengthArray<int, 4> outputTypes;
|
||||
QByteArray rawReturnType;
|
||||
int flags;
|
||||
};
|
||||
|
||||
@ -276,6 +277,9 @@ void QDBusMetaObjectGenerator::parseMethods()
|
||||
|
||||
mm.outputTypes.append(type.id);
|
||||
|
||||
if (i == 0 && type.id == -1) {
|
||||
mm.rawReturnType = type.name;
|
||||
}
|
||||
if (i != 0) {
|
||||
// non-const ref parameter
|
||||
mm.parameterNames.append(arg.name.toLatin1());
|
||||
@ -471,10 +475,14 @@ void QDBusMetaObjectGenerator::write(QDBusMetaObject *obj)
|
||||
int type;
|
||||
QByteArray typeName;
|
||||
if (i < 0) { // Return type
|
||||
if (!mm.outputTypes.isEmpty())
|
||||
if (!mm.outputTypes.isEmpty()) {
|
||||
type = mm.outputTypes.first();
|
||||
else
|
||||
if (type == -1) {
|
||||
type = IsUnresolvedType | strings.enter(mm.rawReturnType);
|
||||
}
|
||||
} else {
|
||||
type = QMetaType::Void;
|
||||
}
|
||||
} else if (i < mm.inputTypes.size()) {
|
||||
type = mm.inputTypes.at(i);
|
||||
} else {
|
||||
|
@ -256,6 +256,11 @@ QDBusPendingCall::QDBusPendingCall(const QDBusPendingCall &other)
|
||||
QDBusPendingCall::QDBusPendingCall(QDBusPendingCallPrivate *dd)
|
||||
: d(dd)
|
||||
{
|
||||
if (dd) {
|
||||
bool r = dd->ref.deref();
|
||||
Q_ASSERT(r);
|
||||
Q_UNUSED(r);
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -469,6 +474,7 @@ QDBusPendingCall QDBusPendingCall::fromCompletedCall(const QDBusMessage &msg)
|
||||
msg.type() == QDBusMessage::ReplyMessage) {
|
||||
d = new QDBusPendingCallPrivate(QDBusMessage(), 0);
|
||||
d->replyMessage = msg;
|
||||
d->ref.store(1);
|
||||
}
|
||||
|
||||
return QDBusPendingCall(d);
|
||||
|
@ -85,7 +85,6 @@ public:
|
||||
QVector<int> metaTypes;
|
||||
int methodIdx;
|
||||
|
||||
bool autoDelete;
|
||||
// }
|
||||
|
||||
mutable QMutex mutex;
|
||||
@ -102,7 +101,7 @@ public:
|
||||
// }
|
||||
|
||||
QDBusPendingCallPrivate(const QDBusMessage &sent, QDBusConnectionPrivate *connection)
|
||||
: sentMessage(sent), connection(connection), autoDelete(false), watcherHelper(0), pending(0), waitingForFinished(false)
|
||||
: sentMessage(sent), connection(connection), watcherHelper(0), pending(0), waitingForFinished(false)
|
||||
{ }
|
||||
~QDBusPendingCallPrivate();
|
||||
bool setReplyCallback(QObject *target, const char *member);
|
||||
|
@ -408,9 +408,14 @@ static void read_image_scaled(QImage *outImage, png_structp png_ptr, png_infop i
|
||||
|
||||
png_uint_32 width;
|
||||
png_uint_32 height;
|
||||
png_int_32 offset_x;
|
||||
png_int_32 offset_y;
|
||||
|
||||
int bit_depth;
|
||||
int color_type;
|
||||
int unit_type;
|
||||
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
|
||||
png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, &unit_type);
|
||||
uchar *data = outImage->bits();
|
||||
int bpl = outImage->bytesPerLine();
|
||||
|
||||
@ -470,6 +475,10 @@ static void read_image_scaled(QImage *outImage, png_structp png_ptr, png_infop i
|
||||
|
||||
outImage->setDotsPerMeterX((png_get_x_pixels_per_meter(png_ptr,info_ptr)*oxsz)/ixsz);
|
||||
outImage->setDotsPerMeterY((png_get_y_pixels_per_meter(png_ptr,info_ptr)*oysz)/iysz);
|
||||
|
||||
if (unit_type == PNG_OFFSET_PIXEL)
|
||||
outImage->setOffset(QPoint(offset_x*oxsz/ixsz, offset_y*oysz/iysz));
|
||||
|
||||
}
|
||||
|
||||
#if defined(Q_C_CALLBACKS)
|
||||
@ -550,7 +559,6 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngHeader()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngImage(QImage *outImage)
|
||||
{
|
||||
if (state == Error)
|
||||
@ -585,9 +593,14 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngImage(QImage *outImage)
|
||||
} else {
|
||||
png_uint_32 width;
|
||||
png_uint_32 height;
|
||||
png_int_32 offset_x;
|
||||
png_int_32 offset_y;
|
||||
|
||||
int bit_depth;
|
||||
int color_type;
|
||||
int unit_type;
|
||||
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
|
||||
png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, &unit_type);
|
||||
uchar *data = outImage->bits();
|
||||
int bpl = outImage->bytesPerLine();
|
||||
amp.row_pointers = new png_bytep[height];
|
||||
@ -601,6 +614,9 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngImage(QImage *outImage)
|
||||
outImage->setDotsPerMeterX(png_get_x_pixels_per_meter(png_ptr,info_ptr));
|
||||
outImage->setDotsPerMeterY(png_get_y_pixels_per_meter(png_ptr,info_ptr));
|
||||
|
||||
if (unit_type == PNG_OFFSET_PIXEL)
|
||||
outImage->setOffset(QPoint(offset_x, offset_y));
|
||||
|
||||
// sanity check palette entries
|
||||
if (color_type == PNG_COLOR_TYPE_PALETTE && outImage->format() == QImage::Format_Indexed8) {
|
||||
int color_table_size = outImage->colorCount();
|
||||
|
@ -1885,7 +1885,7 @@ void QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::Cl
|
||||
QCloseEvent event;
|
||||
QGuiApplication::sendSpontaneousEvent(e->window.data(), &event);
|
||||
if (e->accepted) {
|
||||
*(e->accepted) = !event.isAccepted();
|
||||
*(e->accepted) = event.isAccepted();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,6 +203,7 @@ public:
|
||||
, max_texture_size(-1)
|
||||
, workaround_brokenFBOReadBack(false)
|
||||
, workaround_brokenTexSubImage(false)
|
||||
, workaround_missingPrecisionQualifiers(false)
|
||||
, active_engine(0)
|
||||
{
|
||||
}
|
||||
@ -233,6 +234,7 @@ public:
|
||||
|
||||
bool workaround_brokenFBOReadBack;
|
||||
bool workaround_brokenTexSubImage;
|
||||
bool workaround_missingPrecisionQualifiers;
|
||||
|
||||
QPaintEngineEx *active_engine;
|
||||
|
||||
@ -240,6 +242,11 @@ public:
|
||||
|
||||
int maxTextureSize();
|
||||
|
||||
static QOpenGLContextPrivate *get(QOpenGLContext *context)
|
||||
{
|
||||
return context->d_func();
|
||||
}
|
||||
|
||||
#if !defined(QT_NO_DEBUG)
|
||||
static bool toggleMakeCurrentTracker(QOpenGLContext *context, bool value)
|
||||
{
|
||||
|
@ -232,6 +232,10 @@ void QPlatformScreen::setOrientationUpdateMask(Qt::ScreenOrientations mask)
|
||||
|
||||
QPlatformScreen * QPlatformScreen::platformScreenForWindow(const QWindow *window)
|
||||
{
|
||||
// QTBUG 32681: It can happen during the transition between screens
|
||||
// when one screen is disconnected that the window doesn't have a screen.
|
||||
if (!window->screen())
|
||||
return 0;
|
||||
return window->screen()->handle();
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ typedef GLfloat GLdouble;
|
||||
# endif
|
||||
# include <OpenGL/glext.h>
|
||||
# else
|
||||
# define GL_GLEXT_LEGACY // Prevents GL/gl.h form #including system glext.h
|
||||
# define GL_GLEXT_LEGACY // Prevents GL/gl.h from #including system glext.h
|
||||
# include <GL/gl.h>
|
||||
# include <QtGui/qopenglext.h>
|
||||
# endif // Q_OS_MAC
|
||||
|
@ -429,7 +429,9 @@ bool QOpenGLShader::compileSourceCode(const char *source)
|
||||
// The precision qualifiers are useful on OpenGL/ES systems,
|
||||
// but usually not present on desktop systems.
|
||||
const QSurfaceFormat currentSurfaceFormat = QOpenGLContext::currentContext()->format();
|
||||
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(QOpenGLContext::currentContext());
|
||||
if (currentSurfaceFormat.renderableType() == QSurfaceFormat::OpenGL
|
||||
|| ctx_d->workaround_missingPrecisionQualifiers
|
||||
#ifdef QT_OPENGL_FORCE_SHADER_DEFINES
|
||||
|| true
|
||||
#endif
|
||||
@ -439,7 +441,7 @@ bool QOpenGLShader::compileSourceCode(const char *source)
|
||||
}
|
||||
|
||||
#ifdef QOpenGL_REDEFINE_HIGHP
|
||||
if (d->shaderType == Fragment) {
|
||||
if (d->shaderType == Fragment && !ctx_d->workaround_missingPrecisionQualifiers) {
|
||||
src.append(redefineHighp);
|
||||
srclen.append(GLint(sizeof(redefineHighp) - 1));
|
||||
}
|
||||
|
@ -305,11 +305,6 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
|
||||
const int maskWidth = mask.width();
|
||||
const int maskHeight = mask.height();
|
||||
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
QOpenGLExtensions extensions(ctx);
|
||||
bool hasBGRA = extensions.hasOpenGLExtension(QOpenGLExtensions::BGRATextureFormat);
|
||||
#endif
|
||||
|
||||
if (mask.format() == QImage::Format_Mono) {
|
||||
mask = mask.convertToFormat(QImage::Format_Indexed8);
|
||||
for (int y = 0; y < maskHeight; ++y) {
|
||||
@ -321,9 +316,6 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
|
||||
if (mask.format() == QImage::Format_RGB32
|
||||
// We need to make the alpha component equal to the average of the RGB values.
|
||||
// This is needed when drawing sub-pixel antialiased text on translucent targets.
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
|| !hasBGRA // We need to reverse the bytes
|
||||
#endif
|
||||
) {
|
||||
for (int y = 0; y < maskHeight; ++y) {
|
||||
quint32 *src = (quint32 *) mask.scanLine(y);
|
||||
@ -338,12 +330,10 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
|
||||
avg = src[x] >> 24;
|
||||
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
if (!hasBGRA) {
|
||||
// Reverse bytes to match GL_RGBA
|
||||
src[x] = (avg << 24) | (quint32(r) << 0) | (quint32(g) << 8) | (quint32(b) << 16);
|
||||
} else
|
||||
// swizzle the bits to accommodate for the GL_RGBA upload.
|
||||
src[x] = (avg << 24) | (quint32(r) << 0) | (quint32(g) << 8) | (quint32(b) << 16);
|
||||
#endif
|
||||
src[x] = (src[x] & 0x00ffffff) | (avg << 24);
|
||||
src[x] = (src[x] & 0x00ffffff) | (avg << 24);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -352,7 +342,7 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
|
||||
glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);
|
||||
if (mask.depth() == 32) {
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, hasBGRA ? GL_BGRA_EXT : GL_RGBA, GL_UNSIGNED_BYTE, mask.bits());
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_RGBA, GL_UNSIGNED_BYTE, mask.bits());
|
||||
#else
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits());
|
||||
#endif
|
||||
@ -382,7 +372,9 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
|
||||
} else {
|
||||
#endif
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_ALPHA, GL_UNSIGNED_BYTE, mask.bits());
|
||||
// }
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme)
|
||||
\enum QDesktopServices::StandardLocation
|
||||
\since 4.4
|
||||
\obsolete
|
||||
Use QStandardPaths::StandardLocation
|
||||
Use QStandardPaths::StandardLocation (see storageLocation() for porting notes)
|
||||
|
||||
This enum describes the different locations that can be queried by
|
||||
QDesktopServices::storageLocation and QDesktopServices::displayName.
|
||||
@ -282,6 +282,26 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme)
|
||||
\fn QString QDesktopServices::storageLocation(StandardLocation type)
|
||||
\obsolete
|
||||
Use QStandardPaths::writableLocation()
|
||||
|
||||
\note when porting QDesktopServices::DataLocation to QStandardPaths::DataLocation,
|
||||
a different path will be returned.
|
||||
|
||||
\c{QDesktopServices::DataLocation} was \c{GenericDataLocation + "/data/organization/application"},
|
||||
while QStandardPaths::DataLocation is \c{GenericDataLocation + "/organization/application"}.
|
||||
|
||||
Also note that \c{application} could be empty in Qt 4, if QCoreApplication::setApplicationName()
|
||||
wasn't called, while in Qt 5 it defaults to the name of the executable.
|
||||
|
||||
Therefore, if you still need to access the Qt 4 path (for example for data migration to Qt 5), replace
|
||||
\code
|
||||
QDesktopServices::storageLocation(QDesktopServices::DataLocation)
|
||||
\endcode
|
||||
with
|
||||
\code
|
||||
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) +
|
||||
"/data/organization/application"
|
||||
\endcode
|
||||
(assuming an organization name and an application name were set).
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -497,7 +497,8 @@ qint64 QHttpMultiPartIODevice::readData(char *data, qint64 maxSize)
|
||||
|
||||
// skip the parts we have already read
|
||||
while (index < multiPart->parts.count() &&
|
||||
readPointer >= partOffsets.at(index) + multiPart->parts.at(index).d->size())
|
||||
readPointer >= partOffsets.at(index) + multiPart->parts.at(index).d->size()
|
||||
+ multiPart->boundary.count() + 6) // 6 == 2 boundary dashes, \r\n after boundary, \r\n after multipart
|
||||
index++;
|
||||
|
||||
// read the data
|
||||
|
@ -1130,6 +1130,9 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
|
||||
errorCode = QNetworkReply::RemoteHostClosedError;
|
||||
}
|
||||
} else if (state == QHttpNetworkConnectionChannel::ReadingState) {
|
||||
if (!reply)
|
||||
break;
|
||||
|
||||
if (!reply->d_func()->expectContent()) {
|
||||
// No content expected, this is a valid way to have the connection closed by the server
|
||||
return;
|
||||
|
@ -81,7 +81,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static QHostAddress addressFromSockaddr(sockaddr *sa)
|
||||
static QHostAddress addressFromSockaddr(sockaddr *sa, int ifindex = 0, const QString &ifname = QString())
|
||||
{
|
||||
QHostAddress address;
|
||||
if (!sa)
|
||||
@ -92,7 +92,11 @@ static QHostAddress addressFromSockaddr(sockaddr *sa)
|
||||
else if (sa->sa_family == AF_INET6) {
|
||||
address.setAddress(((sockaddr_in6 *)sa)->sin6_addr.s6_addr);
|
||||
int scope = ((sockaddr_in6 *)sa)->sin6_scope_id;
|
||||
if (scope) {
|
||||
if (scope && scope == ifindex) {
|
||||
// this is the most likely scenario:
|
||||
// a scope ID in a socket is that of the interface this address came from
|
||||
address.setScopeId(ifname);
|
||||
} else if (scope) {
|
||||
#ifndef QT_NO_IPV6IFNAME
|
||||
char scopeid[IFNAMSIZ];
|
||||
if (::if_indextoname(scope, scopeid)) {
|
||||
@ -410,14 +414,9 @@ static QList<QNetworkInterfacePrivate *> interfaceListing()
|
||||
{
|
||||
QList<QNetworkInterfacePrivate *> interfaces;
|
||||
|
||||
int socket;
|
||||
if ((socket = qt_safe_socket(AF_INET, SOCK_STREAM, IPPROTO_IP)) == -1)
|
||||
return interfaces; // error
|
||||
|
||||
ifaddrs *interfaceListing;
|
||||
if (getifaddrs(&interfaceListing) == -1) {
|
||||
// error
|
||||
::close(socket);
|
||||
return interfaces;
|
||||
}
|
||||
|
||||
@ -439,20 +438,19 @@ static QList<QNetworkInterfacePrivate *> interfaceListing()
|
||||
}
|
||||
|
||||
QNetworkAddressEntry entry;
|
||||
entry.setIp(addressFromSockaddr(ptr->ifa_addr));
|
||||
entry.setIp(addressFromSockaddr(ptr->ifa_addr, iface->index, iface->name));
|
||||
if (entry.ip().isNull())
|
||||
// could not parse the address
|
||||
continue;
|
||||
|
||||
entry.setNetmask(addressFromSockaddr(ptr->ifa_netmask));
|
||||
entry.setNetmask(addressFromSockaddr(ptr->ifa_netmask, iface->index, iface->name));
|
||||
if (iface->flags & QNetworkInterface::CanBroadcast)
|
||||
entry.setBroadcast(addressFromSockaddr(ptr->ifa_broadaddr));
|
||||
entry.setBroadcast(addressFromSockaddr(ptr->ifa_broadaddr, iface->index, iface->name));
|
||||
|
||||
iface->addressEntries << entry;
|
||||
}
|
||||
|
||||
freeifaddrs(interfaceListing);
|
||||
::close(socket);
|
||||
return interfaces;
|
||||
}
|
||||
#endif
|
||||
|
@ -522,6 +522,8 @@ void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
|
||||
} else {
|
||||
qWarning("could not load crypt32 library"); // should never happen
|
||||
}
|
||||
#elif defined(Q_OS_QNX)
|
||||
s_loadRootCertsOnDemand = true;
|
||||
#elif defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
// check whether we can enable on-demand root-cert loading (i.e. check whether the sym links are there)
|
||||
QList<QByteArray> dirs = unixRootCertDirectories();
|
||||
@ -686,41 +688,48 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
|
||||
}
|
||||
#elif defined(Q_OS_UNIX)
|
||||
QSet<QString> certFiles;
|
||||
# ifdef Q_OS_ANDROID
|
||||
QList<QByteArray> directories;
|
||||
directories << qgetenv("MINISTRO_SSL_CERTS_PATH"); // Set by Ministro
|
||||
# else
|
||||
QList<QByteArray> directories = unixRootCertDirectories();
|
||||
# endif
|
||||
QDir currentDir;
|
||||
QStringList nameFilters;
|
||||
# ifdef Q_OS_ANDROID
|
||||
nameFilters << QLatin1String("*.der");
|
||||
#else
|
||||
nameFilters << QLatin1String("*.pem") << QLatin1String("*.crt");
|
||||
# endif
|
||||
currentDir.setNameFilters(nameFilters);
|
||||
for (int a = 0; a < directories.count(); a++) {
|
||||
currentDir.setPath(QLatin1String(directories.at(a)));
|
||||
QDirIterator it(currentDir);
|
||||
while(it.hasNext()) {
|
||||
it.next();
|
||||
// use canonical path here to not load the same certificate twice if symlinked
|
||||
certFiles.insert(it.fileInfo().canonicalFilePath());
|
||||
}
|
||||
}
|
||||
QSetIterator<QString> it(certFiles);
|
||||
while(it.hasNext()) {
|
||||
# ifdef Q_OS_ANDROID
|
||||
systemCerts.append(QSslCertificate::fromPath(it.next(), QSsl::Der));
|
||||
# else
|
||||
systemCerts.append(QSslCertificate::fromPath(it.next(), QSsl::Pem));
|
||||
# endif
|
||||
}
|
||||
QList<QByteArray> directories;
|
||||
QSsl::EncodingFormat platformEncodingFormat;
|
||||
# ifndef Q_OS_ANDROID
|
||||
systemCerts.append(QSslCertificate::fromPath(QLatin1String("/etc/pki/tls/certs/ca-bundle.crt"), QSsl::Pem)); // Fedora, Mandriva
|
||||
systemCerts.append(QSslCertificate::fromPath(QLatin1String("/usr/local/share/certs/ca-root-nss.crt"), QSsl::Pem)); // FreeBSD's ca_root_nss
|
||||
directories = unixRootCertDirectories();
|
||||
nameFilters << QLatin1String("*.pem") << QLatin1String("*.crt");
|
||||
platformEncodingFormat = QSsl::Pem;
|
||||
# else
|
||||
// Q_OS_ANDROID
|
||||
QByteArray ministroPath = qgetenv("MINISTRO_SSL_CERTS_PATH"); // Set by Ministro
|
||||
directories << ministroPath;
|
||||
nameFilters << QLatin1String("*.der");
|
||||
platformEncodingFormat = QSsl::Der;
|
||||
# ifndef Q_OS_ANDROID_NO_SDK
|
||||
if (ministroPath.isEmpty()) {
|
||||
QList<QByteArray> certificateData = fetchSslCertificateData();
|
||||
for (int i = 0; i < certificateData.size(); ++i) {
|
||||
systemCerts.append(QSslCertificate::fromData(certificateData.at(i), QSsl::Der));
|
||||
}
|
||||
} else
|
||||
# endif //Q_OS_ANDROID_NO_SDK
|
||||
# endif //Q_OS_ANDROID
|
||||
{
|
||||
currentDir.setNameFilters(nameFilters);
|
||||
for (int a = 0; a < directories.count(); a++) {
|
||||
currentDir.setPath(QLatin1String(directories.at(a)));
|
||||
QDirIterator it(currentDir);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
// use canonical path here to not load the same certificate twice if symlinked
|
||||
certFiles.insert(it.fileInfo().canonicalFilePath());
|
||||
}
|
||||
}
|
||||
QSetIterator<QString> it(certFiles);
|
||||
while (it.hasNext())
|
||||
systemCerts.append(QSslCertificate::fromPath(it.next(), platformEncodingFormat));
|
||||
# ifndef Q_OS_ANDROID
|
||||
systemCerts.append(QSslCertificate::fromPath(QLatin1String("/etc/pki/tls/certs/ca-bundle.crt"), QSsl::Pem)); // Fedora, Mandriva
|
||||
systemCerts.append(QSslCertificate::fromPath(QLatin1String("/usr/local/share/certs/ca-root-nss.crt"), QSsl::Pem)); // FreeBSD's ca_root_nss
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qDebug() << "systemCaCertificates retrieval time " << timer.elapsed() << "ms";
|
||||
|
179
src/network/ssl/qsslsocket_openssl_android.cpp
Normal file
179
src/network/ssl/qsslsocket_openssl_android.cpp
Normal file
@ -0,0 +1,179 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the QtNetwork module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
**
|
||||
** In addition, as a special exception, the copyright holders listed above give
|
||||
** permission to link the code of its release of Qt with the OpenSSL project's
|
||||
** "OpenSSL" library (or modified versions of the "OpenSSL" library that use the
|
||||
** same license as the original version), and distribute the linked executables.
|
||||
**
|
||||
** You must comply with the GNU General Public License version 2 in all
|
||||
** respects for all of the code used other than the "OpenSSL" code. If you
|
||||
** modify this file, you may extend this exception to your version of the file,
|
||||
** but you are not obligated to do so. If you do not wish to do so, delete
|
||||
** this exception statement from your version of this file.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qsslsocket_openssl_p.h"
|
||||
|
||||
|
||||
|
||||
#include <jni.h>
|
||||
#include <android/log.h>
|
||||
|
||||
static JavaVM *javaVM = 0;
|
||||
static jclass appClass;
|
||||
|
||||
static jmethodID getSslCertificatesMethodID;
|
||||
|
||||
struct AttachedJNIEnv
|
||||
{
|
||||
AttachedJNIEnv()
|
||||
{
|
||||
attached = false;
|
||||
if (javaVM->GetEnv((void**)&jniEnv, JNI_VERSION_1_6) < 0) {
|
||||
if (javaVM->AttachCurrentThread(&jniEnv, NULL) < 0) {
|
||||
__android_log_print(ANDROID_LOG_ERROR, "Qt", "AttachCurrentThread failed");
|
||||
jniEnv = 0;
|
||||
return;
|
||||
}
|
||||
attached = true;
|
||||
}
|
||||
}
|
||||
|
||||
~AttachedJNIEnv()
|
||||
{
|
||||
if (attached)
|
||||
javaVM->DetachCurrentThread();
|
||||
}
|
||||
bool attached;
|
||||
JNIEnv *jniEnv;
|
||||
};
|
||||
|
||||
static const char logTag[] = "Qt";
|
||||
static const char classErrorMsg[] = "Can't find class \"%s\"";
|
||||
static const char methodErrorMsg[] = "Can't find method \"%s%s\"";
|
||||
|
||||
|
||||
#define FIND_AND_CHECK_CLASS(CLASS_NAME) \
|
||||
clazz = env->FindClass(CLASS_NAME); \
|
||||
if (!clazz) { \
|
||||
__android_log_print(ANDROID_LOG_FATAL, logTag, classErrorMsg, CLASS_NAME); \
|
||||
return JNI_FALSE; \
|
||||
}
|
||||
|
||||
#define GET_AND_CHECK_STATIC_METHOD(VAR, CLASS, METHOD_NAME, METHOD_SIGNATURE) \
|
||||
VAR = env->GetStaticMethodID(CLASS, METHOD_NAME, METHOD_SIGNATURE); \
|
||||
if (!VAR) { \
|
||||
__android_log_print(ANDROID_LOG_FATAL, logTag, methodErrorMsg, METHOD_NAME, METHOD_SIGNATURE); \
|
||||
return JNI_FALSE; \
|
||||
}
|
||||
|
||||
static bool registerNatives(JNIEnv *env)
|
||||
{
|
||||
jclass clazz;
|
||||
FIND_AND_CHECK_CLASS("org/qtproject/qt5/android/QtNative");
|
||||
appClass = static_cast<jclass>(env->NewGlobalRef(clazz));
|
||||
|
||||
#if 0 //we don't call C++ functions from Java at this time
|
||||
if (env->RegisterNatives(appClass, methods, sizeof(methods) / sizeof(methods[0])) < 0) {
|
||||
__android_log_print(ANDROID_LOG_FATAL, logTag, "RegisterNatives failed");
|
||||
return JNI_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
GET_AND_CHECK_STATIC_METHOD(getSslCertificatesMethodID, appClass, "getSSLCertificates", "()[[B");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void * /*reserved*/)
|
||||
{
|
||||
typedef union {
|
||||
JNIEnv *nativeEnvironment;
|
||||
void *venv;
|
||||
} UnionJNIEnvToVoid;
|
||||
|
||||
__android_log_print(ANDROID_LOG_INFO, logTag, "Network start");
|
||||
UnionJNIEnvToVoid uenv;
|
||||
uenv.venv = NULL;
|
||||
javaVM = 0;
|
||||
|
||||
if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_4) != JNI_OK) {
|
||||
__android_log_print(ANDROID_LOG_FATAL, logTag, "GetEnv failed");
|
||||
return -1;
|
||||
}
|
||||
JNIEnv *env = uenv.nativeEnvironment;
|
||||
if (!registerNatives(env)) {
|
||||
__android_log_print(ANDROID_LOG_FATAL, logTag, "registerNatives failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
javaVM = vm;
|
||||
return JNI_VERSION_1_4;
|
||||
}
|
||||
|
||||
QList<QByteArray> QSslSocketPrivate::fetchSslCertificateData()
|
||||
{
|
||||
QList<QByteArray> certificateData;
|
||||
AttachedJNIEnv env;
|
||||
|
||||
if (env.jniEnv) {
|
||||
jobjectArray jcertificates =
|
||||
static_cast<jobjectArray>(env.jniEnv->CallStaticObjectMethod(appClass, getSslCertificatesMethodID));
|
||||
jint nCertificates = env.jniEnv->GetArrayLength(jcertificates);
|
||||
|
||||
for (int i = 0; i < nCertificates; ++i) {
|
||||
jbyteArray jCert = static_cast<jbyteArray>(env.jniEnv->GetObjectArrayElement(jcertificates, i));
|
||||
|
||||
const uint sz = env.jniEnv->GetArrayLength(jCert);
|
||||
jbyte *buffer = env.jniEnv->GetByteArrayElements(jCert, 0);
|
||||
certificateData.append(QByteArray(reinterpret_cast<char*>(buffer), sz));
|
||||
|
||||
env.jniEnv->ReleaseByteArrayElements(jCert, buffer, JNI_ABORT); // don't copy back the elements
|
||||
env.jniEnv->DeleteLocalRef(jCert);
|
||||
}
|
||||
}
|
||||
|
||||
return certificateData;
|
||||
}
|
@ -197,6 +197,9 @@ public:
|
||||
private:
|
||||
static bool ensureLibraryLoaded();
|
||||
static void ensureCiphersAndCertsLoaded();
|
||||
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
|
||||
static QList<QByteArray> fetchSslCertificateData();
|
||||
#endif
|
||||
|
||||
static bool s_libraryLoaded;
|
||||
static bool s_loadedCiphersAndCerts;
|
||||
|
@ -28,6 +28,8 @@ contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) {
|
||||
ssl/qsslcertificateextension.cpp \
|
||||
ssl/qsslcontext.cpp
|
||||
|
||||
android:!android-no-sdk: SOURCES += ssl/qsslsocket_openssl_android.cpp
|
||||
|
||||
# Add optional SSL libs
|
||||
# Static linking of OpenSSL with msvc:
|
||||
# - Binaries http://slproweb.com/products/Win32OpenSSL.html
|
||||
|
@ -317,7 +317,12 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed sub
|
||||
uchar g = src[x] >> 8;
|
||||
uchar b = src[x];
|
||||
quint32 avg = (quint32(r) + quint32(g) + quint32(b) + 1) / 3; // "+1" for rounding.
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
// swizzle the bits to accommodate for the GL_RGBA upload.
|
||||
src[x] = (avg << 24) | (quint32(r) << 0) | (quint32(g) << 8) | (quint32(b) << 16);
|
||||
#else
|
||||
src[x] = (src[x] & 0x00ffffff) | (avg << 24);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -325,8 +330,7 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed sub
|
||||
glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);
|
||||
if (mask.format() == QImage::Format_RGB32) {
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
// ###TODO Ensure extension is actually present on ES2
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_BGRA_EXT, GL_UNSIGNED_BYTE, mask.bits());
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_RGBA, GL_UNSIGNED_BYTE, mask.bits());
|
||||
#else
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits());
|
||||
#endif
|
||||
|
@ -89,166 +89,166 @@ const QEvdevKeyboardMap::Mapping QEvdevKeyboardHandler::s_keymap_default[] = {
|
||||
{ 14, 0xffff, 0x01000003, 0x00, 0x00, 0x0000 },
|
||||
{ 14, 0xffff, 0x01000000, 0x0c, 0x08, 0x0300 },
|
||||
{ 15, 0xffff, 0x01000001, 0x00, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x00000051, 0x00, 0x00, 0x0000 },
|
||||
{ 16, 0x0051, 0x00000051, 0x01, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x00000051, 0x02, 0x00, 0x0000 },
|
||||
{ 16, 0x0051, 0x00000051, 0x03, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x04000051, 0x04, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x04000051, 0x05, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x04000051, 0x06, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x04000051, 0x07, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x08000051, 0x08, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x08000051, 0x09, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x08000051, 0x0a, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x08000051, 0x0b, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x0c000051, 0x0c, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x0c000051, 0x0d, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x0c000051, 0x0e, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x0c000051, 0x0f, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x00000057, 0x00, 0x00, 0x0000 },
|
||||
{ 17, 0x0057, 0x00000057, 0x01, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x00000057, 0x02, 0x00, 0x0000 },
|
||||
{ 17, 0x0057, 0x00000057, 0x03, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x04000057, 0x04, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x04000057, 0x05, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x04000057, 0x06, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x04000057, 0x07, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x08000057, 0x08, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x08000057, 0x09, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x08000057, 0x0a, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x08000057, 0x0b, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x0c000057, 0x0c, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x0c000057, 0x0d, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x0c000057, 0x0e, 0x00, 0x0000 },
|
||||
{ 17, 0x0077, 0x0c000057, 0x0f, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x00000045, 0x00, 0x00, 0x0000 },
|
||||
{ 18, 0x0045, 0x00000045, 0x01, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x00000045, 0x02, 0x00, 0x0000 },
|
||||
{ 18, 0x0045, 0x00000045, 0x03, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x04000045, 0x04, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x04000045, 0x05, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x04000045, 0x06, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x04000045, 0x07, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x08000045, 0x08, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x08000045, 0x09, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x08000045, 0x0a, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x08000045, 0x0b, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x0c000045, 0x0c, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x0c000045, 0x0d, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x0c000045, 0x0e, 0x00, 0x0000 },
|
||||
{ 18, 0x0065, 0x0c000045, 0x0f, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x00000052, 0x00, 0x00, 0x0000 },
|
||||
{ 19, 0x0052, 0x00000052, 0x01, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x00000052, 0x02, 0x00, 0x0000 },
|
||||
{ 19, 0x0052, 0x00000052, 0x03, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x04000052, 0x04, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x04000052, 0x05, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x04000052, 0x06, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x04000052, 0x07, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x08000052, 0x08, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x08000052, 0x09, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x08000052, 0x0a, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x08000052, 0x0b, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x0c000052, 0x0c, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x0c000052, 0x0d, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x0c000052, 0x0e, 0x00, 0x0000 },
|
||||
{ 19, 0x0072, 0x0c000052, 0x0f, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x00000054, 0x00, 0x00, 0x0000 },
|
||||
{ 20, 0x0054, 0x00000054, 0x01, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x00000054, 0x02, 0x00, 0x0000 },
|
||||
{ 20, 0x0054, 0x00000054, 0x03, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x04000054, 0x04, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x04000054, 0x05, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x04000054, 0x06, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x04000054, 0x07, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x08000054, 0x08, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x08000054, 0x09, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x08000054, 0x0a, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x08000054, 0x0b, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x0c000054, 0x0c, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x0c000054, 0x0d, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x0c000054, 0x0e, 0x00, 0x0000 },
|
||||
{ 20, 0x0074, 0x0c000054, 0x0f, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x00000059, 0x00, 0x00, 0x0000 },
|
||||
{ 21, 0x0059, 0x00000059, 0x01, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x00000059, 0x02, 0x00, 0x0000 },
|
||||
{ 21, 0x0059, 0x00000059, 0x03, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x04000059, 0x04, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x04000059, 0x05, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x04000059, 0x06, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x04000059, 0x07, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x08000059, 0x08, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x08000059, 0x09, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x08000059, 0x0a, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x08000059, 0x0b, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x0c000059, 0x0c, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x0c000059, 0x0d, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x0c000059, 0x0e, 0x00, 0x0000 },
|
||||
{ 21, 0x0079, 0x0c000059, 0x0f, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x00000055, 0x00, 0x00, 0x0000 },
|
||||
{ 22, 0x0055, 0x00000055, 0x01, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x00000055, 0x02, 0x00, 0x0000 },
|
||||
{ 22, 0x0055, 0x00000055, 0x03, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x04000055, 0x04, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x04000055, 0x05, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x04000055, 0x06, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x04000055, 0x07, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x08000055, 0x08, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x08000055, 0x09, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x08000055, 0x0a, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x08000055, 0x0b, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x0c000055, 0x0c, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x0c000055, 0x0d, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x0c000055, 0x0e, 0x00, 0x0000 },
|
||||
{ 22, 0x0075, 0x0c000055, 0x0f, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x00000049, 0x00, 0x00, 0x0000 },
|
||||
{ 23, 0x0049, 0x00000049, 0x01, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x00000049, 0x02, 0x00, 0x0000 },
|
||||
{ 23, 0x0049, 0x00000049, 0x03, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x04000049, 0x04, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x04000049, 0x05, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x04000049, 0x06, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x04000049, 0x07, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x08000049, 0x08, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x08000049, 0x09, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x08000049, 0x0a, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x08000049, 0x0b, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x0c000049, 0x0c, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x0c000049, 0x0d, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x0c000049, 0x0e, 0x00, 0x0000 },
|
||||
{ 23, 0x0069, 0x0c000049, 0x0f, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0000004f, 0x00, 0x00, 0x0000 },
|
||||
{ 24, 0x004f, 0x0000004f, 0x01, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0000004f, 0x02, 0x00, 0x0000 },
|
||||
{ 24, 0x004f, 0x0000004f, 0x03, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0400004f, 0x04, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0400004f, 0x05, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0400004f, 0x06, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0400004f, 0x07, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0800004f, 0x08, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0800004f, 0x09, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0800004f, 0x0a, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0800004f, 0x0b, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0c00004f, 0x0c, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0c00004f, 0x0d, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0c00004f, 0x0e, 0x00, 0x0000 },
|
||||
{ 24, 0x006f, 0x0c00004f, 0x0f, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x00000050, 0x00, 0x00, 0x0000 },
|
||||
{ 25, 0x0050, 0x00000050, 0x01, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x00000050, 0x02, 0x00, 0x0000 },
|
||||
{ 25, 0x0050, 0x00000050, 0x03, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x04000050, 0x04, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x04000050, 0x05, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x04000050, 0x06, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x04000050, 0x07, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x08000050, 0x08, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x08000050, 0x09, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x08000050, 0x0a, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x08000050, 0x0b, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x0c000050, 0x0c, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x0c000050, 0x0d, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x0c000050, 0x0e, 0x00, 0x0000 },
|
||||
{ 25, 0x0070, 0x0c000050, 0x0f, 0x00, 0x0000 },
|
||||
{ 16, 0x0071, 0x00000051, 0x00, 0x02, 0x0000 },
|
||||
{ 16, 0x0051, 0x00000051, 0x01, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x00000051, 0x02, 0x02, 0x0000 },
|
||||
{ 16, 0x0051, 0x00000051, 0x03, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x04000051, 0x04, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x04000051, 0x05, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x04000051, 0x06, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x04000051, 0x07, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x08000051, 0x08, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x08000051, 0x09, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x08000051, 0x0a, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x08000051, 0x0b, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x0c000051, 0x0c, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x0c000051, 0x0d, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x0c000051, 0x0e, 0x02, 0x0000 },
|
||||
{ 16, 0x0071, 0x0c000051, 0x0f, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x00000057, 0x00, 0x02, 0x0000 },
|
||||
{ 17, 0x0057, 0x00000057, 0x01, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x00000057, 0x02, 0x02, 0x0000 },
|
||||
{ 17, 0x0057, 0x00000057, 0x03, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x04000057, 0x04, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x04000057, 0x05, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x04000057, 0x06, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x04000057, 0x07, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x08000057, 0x08, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x08000057, 0x09, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x08000057, 0x0a, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x08000057, 0x0b, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x0c000057, 0x0c, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x0c000057, 0x0d, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x0c000057, 0x0e, 0x02, 0x0000 },
|
||||
{ 17, 0x0077, 0x0c000057, 0x0f, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x00000045, 0x00, 0x02, 0x0000 },
|
||||
{ 18, 0x0045, 0x00000045, 0x01, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x00000045, 0x02, 0x02, 0x0000 },
|
||||
{ 18, 0x0045, 0x00000045, 0x03, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x04000045, 0x04, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x04000045, 0x05, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x04000045, 0x06, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x04000045, 0x07, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x08000045, 0x08, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x08000045, 0x09, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x08000045, 0x0a, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x08000045, 0x0b, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x0c000045, 0x0c, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x0c000045, 0x0d, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x0c000045, 0x0e, 0x02, 0x0000 },
|
||||
{ 18, 0x0065, 0x0c000045, 0x0f, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x00000052, 0x00, 0x02, 0x0000 },
|
||||
{ 19, 0x0052, 0x00000052, 0x01, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x00000052, 0x02, 0x02, 0x0000 },
|
||||
{ 19, 0x0052, 0x00000052, 0x03, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x04000052, 0x04, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x04000052, 0x05, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x04000052, 0x06, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x04000052, 0x07, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x08000052, 0x08, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x08000052, 0x09, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x08000052, 0x0a, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x08000052, 0x0b, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x0c000052, 0x0c, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x0c000052, 0x0d, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x0c000052, 0x0e, 0x02, 0x0000 },
|
||||
{ 19, 0x0072, 0x0c000052, 0x0f, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x00000054, 0x00, 0x02, 0x0000 },
|
||||
{ 20, 0x0054, 0x00000054, 0x01, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x00000054, 0x02, 0x02, 0x0000 },
|
||||
{ 20, 0x0054, 0x00000054, 0x03, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x04000054, 0x04, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x04000054, 0x05, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x04000054, 0x06, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x04000054, 0x07, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x08000054, 0x08, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x08000054, 0x09, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x08000054, 0x0a, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x08000054, 0x0b, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x0c000054, 0x0c, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x0c000054, 0x0d, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x0c000054, 0x0e, 0x02, 0x0000 },
|
||||
{ 20, 0x0074, 0x0c000054, 0x0f, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x00000059, 0x00, 0x02, 0x0000 },
|
||||
{ 21, 0x0059, 0x00000059, 0x01, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x00000059, 0x02, 0x02, 0x0000 },
|
||||
{ 21, 0x0059, 0x00000059, 0x03, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x04000059, 0x04, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x04000059, 0x05, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x04000059, 0x06, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x04000059, 0x07, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x08000059, 0x08, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x08000059, 0x09, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x08000059, 0x0a, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x08000059, 0x0b, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x0c000059, 0x0c, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x0c000059, 0x0d, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x0c000059, 0x0e, 0x02, 0x0000 },
|
||||
{ 21, 0x0079, 0x0c000059, 0x0f, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x00000055, 0x00, 0x02, 0x0000 },
|
||||
{ 22, 0x0055, 0x00000055, 0x01, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x00000055, 0x02, 0x02, 0x0000 },
|
||||
{ 22, 0x0055, 0x00000055, 0x03, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x04000055, 0x04, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x04000055, 0x05, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x04000055, 0x06, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x04000055, 0x07, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x08000055, 0x08, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x08000055, 0x09, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x08000055, 0x0a, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x08000055, 0x0b, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x0c000055, 0x0c, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x0c000055, 0x0d, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x0c000055, 0x0e, 0x02, 0x0000 },
|
||||
{ 22, 0x0075, 0x0c000055, 0x0f, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x00000049, 0x00, 0x02, 0x0000 },
|
||||
{ 23, 0x0049, 0x00000049, 0x01, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x00000049, 0x02, 0x02, 0x0000 },
|
||||
{ 23, 0x0049, 0x00000049, 0x03, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x04000049, 0x04, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x04000049, 0x05, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x04000049, 0x06, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x04000049, 0x07, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x08000049, 0x08, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x08000049, 0x09, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x08000049, 0x0a, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x08000049, 0x0b, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x0c000049, 0x0c, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x0c000049, 0x0d, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x0c000049, 0x0e, 0x02, 0x0000 },
|
||||
{ 23, 0x0069, 0x0c000049, 0x0f, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0000004f, 0x00, 0x02, 0x0000 },
|
||||
{ 24, 0x004f, 0x0000004f, 0x01, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0000004f, 0x02, 0x02, 0x0000 },
|
||||
{ 24, 0x004f, 0x0000004f, 0x03, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0400004f, 0x04, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0400004f, 0x05, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0400004f, 0x06, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0400004f, 0x07, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0800004f, 0x08, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0800004f, 0x09, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0800004f, 0x0a, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0800004f, 0x0b, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0c00004f, 0x0c, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0c00004f, 0x0d, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0c00004f, 0x0e, 0x02, 0x0000 },
|
||||
{ 24, 0x006f, 0x0c00004f, 0x0f, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x00000050, 0x00, 0x02, 0x0000 },
|
||||
{ 25, 0x0050, 0x00000050, 0x01, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x00000050, 0x02, 0x02, 0x0000 },
|
||||
{ 25, 0x0050, 0x00000050, 0x03, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x04000050, 0x04, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x04000050, 0x05, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x04000050, 0x06, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x04000050, 0x07, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x08000050, 0x08, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x08000050, 0x09, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x08000050, 0x0a, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x08000050, 0x0b, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x0c000050, 0x0c, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x0c000050, 0x0d, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x0c000050, 0x0e, 0x02, 0x0000 },
|
||||
{ 25, 0x0070, 0x0c000050, 0x0f, 0x02, 0x0000 },
|
||||
{ 26, 0x005b, 0x0000005b, 0x00, 0x00, 0x0000 },
|
||||
{ 26, 0x007b, 0x0000007b, 0x01, 0x00, 0x0000 },
|
||||
{ 26, 0xffff, 0x01000000, 0x04, 0x00, 0x0000 },
|
||||
@ -259,150 +259,150 @@ const QEvdevKeyboardMap::Mapping QEvdevKeyboardHandler::s_keymap_default[] = {
|
||||
{ 28, 0xffff, 0x01000004, 0x00, 0x00, 0x0000 },
|
||||
{ 28, 0x006d, 0x0c00004d, 0x08, 0x00, 0x0000 },
|
||||
{ 29, 0xffff, 0x01000021, 0x00, 0x04, 0x0004 },
|
||||
{ 30, 0x0061, 0x00000041, 0x00, 0x00, 0x0000 },
|
||||
{ 30, 0x0041, 0x00000041, 0x01, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x00000041, 0x02, 0x00, 0x0000 },
|
||||
{ 30, 0x0041, 0x00000041, 0x03, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x04000041, 0x04, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x04000041, 0x05, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x04000041, 0x06, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x04000041, 0x07, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x08000041, 0x08, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x08000041, 0x09, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x08000041, 0x0a, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x08000041, 0x0b, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x0c000041, 0x0c, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x0c000041, 0x0d, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x0c000041, 0x0e, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x0c000041, 0x0f, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x00000053, 0x00, 0x00, 0x0000 },
|
||||
{ 31, 0x0053, 0x00000053, 0x01, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x00000053, 0x02, 0x00, 0x0000 },
|
||||
{ 31, 0x0053, 0x00000053, 0x03, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x04000053, 0x04, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x04000053, 0x05, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x04000053, 0x06, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x04000053, 0x07, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x08000053, 0x08, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x08000053, 0x09, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x08000053, 0x0a, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x08000053, 0x0b, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x0c000053, 0x0c, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x0c000053, 0x0d, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x0c000053, 0x0e, 0x00, 0x0000 },
|
||||
{ 31, 0x0073, 0x0c000053, 0x0f, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x00000044, 0x00, 0x00, 0x0000 },
|
||||
{ 32, 0x0044, 0x00000044, 0x01, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x00000044, 0x02, 0x00, 0x0000 },
|
||||
{ 32, 0x0044, 0x00000044, 0x03, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x04000044, 0x04, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x04000044, 0x05, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x04000044, 0x06, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x04000044, 0x07, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x08000044, 0x08, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x08000044, 0x09, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x08000044, 0x0a, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x08000044, 0x0b, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x0c000044, 0x0c, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x0c000044, 0x0d, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x0c000044, 0x0e, 0x00, 0x0000 },
|
||||
{ 32, 0x0064, 0x0c000044, 0x0f, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x00000046, 0x00, 0x00, 0x0000 },
|
||||
{ 33, 0x0046, 0x00000046, 0x01, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x00000046, 0x02, 0x00, 0x0000 },
|
||||
{ 33, 0x0046, 0x00000046, 0x03, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x04000046, 0x04, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x04000046, 0x05, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x04000046, 0x06, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x04000046, 0x07, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x08000046, 0x08, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x08000046, 0x09, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x08000046, 0x0a, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x08000046, 0x0b, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x0c000046, 0x0c, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x0c000046, 0x0d, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x0c000046, 0x0e, 0x00, 0x0000 },
|
||||
{ 33, 0x0066, 0x0c000046, 0x0f, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x00000047, 0x00, 0x00, 0x0000 },
|
||||
{ 34, 0x0047, 0x00000047, 0x01, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x00000047, 0x02, 0x00, 0x0000 },
|
||||
{ 34, 0x0047, 0x00000047, 0x03, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x04000047, 0x04, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x04000047, 0x05, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x04000047, 0x06, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x04000047, 0x07, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x08000047, 0x08, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x08000047, 0x09, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x08000047, 0x0a, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x08000047, 0x0b, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x0c000047, 0x0c, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x0c000047, 0x0d, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x0c000047, 0x0e, 0x00, 0x0000 },
|
||||
{ 34, 0x0067, 0x0c000047, 0x0f, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x00000048, 0x00, 0x00, 0x0000 },
|
||||
{ 35, 0x0048, 0x00000048, 0x01, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x00000048, 0x02, 0x00, 0x0000 },
|
||||
{ 35, 0x0048, 0x00000048, 0x03, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x04000048, 0x04, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x04000048, 0x05, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x04000048, 0x06, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x04000048, 0x07, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x08000048, 0x08, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x08000048, 0x09, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x08000048, 0x0a, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x08000048, 0x0b, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x0c000048, 0x0c, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x0c000048, 0x0d, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x0c000048, 0x0e, 0x00, 0x0000 },
|
||||
{ 35, 0x0068, 0x0c000048, 0x0f, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0000004a, 0x00, 0x00, 0x0000 },
|
||||
{ 36, 0x004a, 0x0000004a, 0x01, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0000004a, 0x02, 0x00, 0x0000 },
|
||||
{ 36, 0x004a, 0x0000004a, 0x03, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0400004a, 0x04, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0400004a, 0x05, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0400004a, 0x06, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0400004a, 0x07, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0800004a, 0x08, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0800004a, 0x09, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0800004a, 0x0a, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0800004a, 0x0b, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0c00004a, 0x0c, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0c00004a, 0x0d, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0c00004a, 0x0e, 0x00, 0x0000 },
|
||||
{ 36, 0x006a, 0x0c00004a, 0x0f, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0000004b, 0x00, 0x00, 0x0000 },
|
||||
{ 37, 0x004b, 0x0000004b, 0x01, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0000004b, 0x02, 0x00, 0x0000 },
|
||||
{ 37, 0x004b, 0x0000004b, 0x03, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0400004b, 0x04, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0400004b, 0x05, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0400004b, 0x06, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0400004b, 0x07, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0800004b, 0x08, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0800004b, 0x09, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0800004b, 0x0a, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0800004b, 0x0b, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0c00004b, 0x0c, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0c00004b, 0x0d, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0c00004b, 0x0e, 0x00, 0x0000 },
|
||||
{ 37, 0x006b, 0x0c00004b, 0x0f, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0000004c, 0x00, 0x00, 0x0000 },
|
||||
{ 38, 0x004c, 0x0000004c, 0x01, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0000004c, 0x02, 0x00, 0x0000 },
|
||||
{ 38, 0x004c, 0x0000004c, 0x03, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0400004c, 0x04, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0400004c, 0x05, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0400004c, 0x06, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0400004c, 0x07, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0800004c, 0x08, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0800004c, 0x09, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0800004c, 0x0a, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0800004c, 0x0b, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0c00004c, 0x0c, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0c00004c, 0x0d, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0c00004c, 0x0e, 0x00, 0x0000 },
|
||||
{ 38, 0x006c, 0x0c00004c, 0x0f, 0x00, 0x0000 },
|
||||
{ 30, 0x0061, 0x00000041, 0x00, 0x02, 0x0000 },
|
||||
{ 30, 0x0041, 0x00000041, 0x01, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x00000041, 0x02, 0x02, 0x0000 },
|
||||
{ 30, 0x0041, 0x00000041, 0x03, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x04000041, 0x04, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x04000041, 0x05, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x04000041, 0x06, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x04000041, 0x07, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x08000041, 0x08, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x08000041, 0x09, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x08000041, 0x0a, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x08000041, 0x0b, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x0c000041, 0x0c, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x0c000041, 0x0d, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x0c000041, 0x0e, 0x02, 0x0000 },
|
||||
{ 30, 0x0061, 0x0c000041, 0x0f, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x00000053, 0x00, 0x02, 0x0000 },
|
||||
{ 31, 0x0053, 0x00000053, 0x01, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x00000053, 0x02, 0x02, 0x0000 },
|
||||
{ 31, 0x0053, 0x00000053, 0x03, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x04000053, 0x04, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x04000053, 0x05, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x04000053, 0x06, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x04000053, 0x07, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x08000053, 0x08, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x08000053, 0x09, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x08000053, 0x0a, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x08000053, 0x0b, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x0c000053, 0x0c, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x0c000053, 0x0d, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x0c000053, 0x0e, 0x02, 0x0000 },
|
||||
{ 31, 0x0073, 0x0c000053, 0x0f, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x00000044, 0x00, 0x02, 0x0000 },
|
||||
{ 32, 0x0044, 0x00000044, 0x01, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x00000044, 0x02, 0x02, 0x0000 },
|
||||
{ 32, 0x0044, 0x00000044, 0x03, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x04000044, 0x04, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x04000044, 0x05, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x04000044, 0x06, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x04000044, 0x07, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x08000044, 0x08, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x08000044, 0x09, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x08000044, 0x0a, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x08000044, 0x0b, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x0c000044, 0x0c, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x0c000044, 0x0d, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x0c000044, 0x0e, 0x02, 0x0000 },
|
||||
{ 32, 0x0064, 0x0c000044, 0x0f, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x00000046, 0x00, 0x02, 0x0000 },
|
||||
{ 33, 0x0046, 0x00000046, 0x01, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x00000046, 0x02, 0x02, 0x0000 },
|
||||
{ 33, 0x0046, 0x00000046, 0x03, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x04000046, 0x04, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x04000046, 0x05, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x04000046, 0x06, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x04000046, 0x07, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x08000046, 0x08, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x08000046, 0x09, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x08000046, 0x0a, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x08000046, 0x0b, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x0c000046, 0x0c, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x0c000046, 0x0d, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x0c000046, 0x0e, 0x02, 0x0000 },
|
||||
{ 33, 0x0066, 0x0c000046, 0x0f, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x00000047, 0x00, 0x02, 0x0000 },
|
||||
{ 34, 0x0047, 0x00000047, 0x01, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x00000047, 0x02, 0x02, 0x0000 },
|
||||
{ 34, 0x0047, 0x00000047, 0x03, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x04000047, 0x04, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x04000047, 0x05, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x04000047, 0x06, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x04000047, 0x07, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x08000047, 0x08, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x08000047, 0x09, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x08000047, 0x0a, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x08000047, 0x0b, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x0c000047, 0x0c, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x0c000047, 0x0d, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x0c000047, 0x0e, 0x02, 0x0000 },
|
||||
{ 34, 0x0067, 0x0c000047, 0x0f, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x00000048, 0x00, 0x02, 0x0000 },
|
||||
{ 35, 0x0048, 0x00000048, 0x01, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x00000048, 0x02, 0x02, 0x0000 },
|
||||
{ 35, 0x0048, 0x00000048, 0x03, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x04000048, 0x04, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x04000048, 0x05, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x04000048, 0x06, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x04000048, 0x07, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x08000048, 0x08, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x08000048, 0x09, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x08000048, 0x0a, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x08000048, 0x0b, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x0c000048, 0x0c, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x0c000048, 0x0d, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x0c000048, 0x0e, 0x02, 0x0000 },
|
||||
{ 35, 0x0068, 0x0c000048, 0x0f, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0000004a, 0x00, 0x02, 0x0000 },
|
||||
{ 36, 0x004a, 0x0000004a, 0x01, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0000004a, 0x02, 0x02, 0x0000 },
|
||||
{ 36, 0x004a, 0x0000004a, 0x03, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0400004a, 0x04, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0400004a, 0x05, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0400004a, 0x06, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0400004a, 0x07, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0800004a, 0x08, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0800004a, 0x09, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0800004a, 0x0a, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0800004a, 0x0b, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0c00004a, 0x0c, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0c00004a, 0x0d, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0c00004a, 0x0e, 0x02, 0x0000 },
|
||||
{ 36, 0x006a, 0x0c00004a, 0x0f, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0000004b, 0x00, 0x02, 0x0000 },
|
||||
{ 37, 0x004b, 0x0000004b, 0x01, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0000004b, 0x02, 0x02, 0x0000 },
|
||||
{ 37, 0x004b, 0x0000004b, 0x03, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0400004b, 0x04, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0400004b, 0x05, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0400004b, 0x06, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0400004b, 0x07, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0800004b, 0x08, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0800004b, 0x09, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0800004b, 0x0a, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0800004b, 0x0b, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0c00004b, 0x0c, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0c00004b, 0x0d, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0c00004b, 0x0e, 0x02, 0x0000 },
|
||||
{ 37, 0x006b, 0x0c00004b, 0x0f, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0000004c, 0x00, 0x02, 0x0000 },
|
||||
{ 38, 0x004c, 0x0000004c, 0x01, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0000004c, 0x02, 0x02, 0x0000 },
|
||||
{ 38, 0x004c, 0x0000004c, 0x03, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0400004c, 0x04, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0400004c, 0x05, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0400004c, 0x06, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0400004c, 0x07, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0800004c, 0x08, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0800004c, 0x09, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0800004c, 0x0a, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0800004c, 0x0b, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0c00004c, 0x0c, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0c00004c, 0x0d, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0c00004c, 0x0e, 0x02, 0x0000 },
|
||||
{ 38, 0x006c, 0x0c00004c, 0x0f, 0x02, 0x0000 },
|
||||
{ 39, 0x003b, 0x0000003b, 0x00, 0x00, 0x0000 },
|
||||
{ 39, 0x003a, 0x0000003a, 0x01, 0x00, 0x0000 },
|
||||
{ 40, 0x0027, 0x00000027, 0x00, 0x00, 0x0000 },
|
||||
@ -418,118 +418,118 @@ const QEvdevKeyboardMap::Mapping QEvdevKeyboardHandler::s_keymap_default[] = {
|
||||
{ 43, 0x005c, 0x0000005c, 0x00, 0x00, 0x0000 },
|
||||
{ 43, 0x007c, 0x0000007c, 0x01, 0x00, 0x0000 },
|
||||
{ 43, 0x005c, 0x0400005c, 0x04, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0000005a, 0x00, 0x00, 0x0000 },
|
||||
{ 44, 0x005a, 0x0000005a, 0x01, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0000005a, 0x02, 0x00, 0x0000 },
|
||||
{ 44, 0x005a, 0x0000005a, 0x03, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0400005a, 0x04, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0400005a, 0x05, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0400005a, 0x06, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0400005a, 0x07, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0800005a, 0x08, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0800005a, 0x09, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0800005a, 0x0a, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0800005a, 0x0b, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0c00005a, 0x0c, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0c00005a, 0x0d, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0c00005a, 0x0e, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0c00005a, 0x0f, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x00000058, 0x00, 0x00, 0x0000 },
|
||||
{ 45, 0x0058, 0x00000058, 0x01, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x00000058, 0x02, 0x00, 0x0000 },
|
||||
{ 45, 0x0058, 0x00000058, 0x03, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x04000058, 0x04, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x04000058, 0x05, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x04000058, 0x06, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x04000058, 0x07, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x08000058, 0x08, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x08000058, 0x09, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x08000058, 0x0a, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x08000058, 0x0b, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x0c000058, 0x0c, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x0c000058, 0x0d, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x0c000058, 0x0e, 0x00, 0x0000 },
|
||||
{ 45, 0x0078, 0x0c000058, 0x0f, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x00000043, 0x00, 0x00, 0x0000 },
|
||||
{ 46, 0x0043, 0x00000043, 0x01, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x00000043, 0x02, 0x00, 0x0000 },
|
||||
{ 46, 0x0043, 0x00000043, 0x03, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x04000043, 0x04, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x04000043, 0x05, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x04000043, 0x06, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x04000043, 0x07, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x08000043, 0x08, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x08000043, 0x09, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x08000043, 0x0a, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x08000043, 0x0b, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x0c000043, 0x0c, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x0c000043, 0x0d, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x0c000043, 0x0e, 0x00, 0x0000 },
|
||||
{ 46, 0x0063, 0x0c000043, 0x0f, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x00000056, 0x00, 0x00, 0x0000 },
|
||||
{ 47, 0x0056, 0x00000056, 0x01, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x00000056, 0x02, 0x00, 0x0000 },
|
||||
{ 47, 0x0056, 0x00000056, 0x03, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x04000056, 0x04, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x04000056, 0x05, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x04000056, 0x06, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x04000056, 0x07, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x08000056, 0x08, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x08000056, 0x09, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x08000056, 0x0a, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x08000056, 0x0b, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x0c000056, 0x0c, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x0c000056, 0x0d, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x0c000056, 0x0e, 0x00, 0x0000 },
|
||||
{ 47, 0x0076, 0x0c000056, 0x0f, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x00000042, 0x00, 0x00, 0x0000 },
|
||||
{ 48, 0x0042, 0x00000042, 0x01, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x00000042, 0x02, 0x00, 0x0000 },
|
||||
{ 48, 0x0042, 0x00000042, 0x03, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x04000042, 0x04, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x04000042, 0x05, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x04000042, 0x06, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x04000042, 0x07, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x08000042, 0x08, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x08000042, 0x09, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x08000042, 0x0a, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x08000042, 0x0b, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x0c000042, 0x0c, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x0c000042, 0x0d, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x0c000042, 0x0e, 0x00, 0x0000 },
|
||||
{ 48, 0x0062, 0x0c000042, 0x0f, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0000004e, 0x00, 0x00, 0x0000 },
|
||||
{ 49, 0x004e, 0x0000004e, 0x01, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0000004e, 0x02, 0x00, 0x0000 },
|
||||
{ 49, 0x004e, 0x0000004e, 0x03, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0400004e, 0x04, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0400004e, 0x05, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0400004e, 0x06, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0400004e, 0x07, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0800004e, 0x08, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0800004e, 0x09, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0800004e, 0x0a, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0800004e, 0x0b, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0c00004e, 0x0c, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0c00004e, 0x0d, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0c00004e, 0x0e, 0x00, 0x0000 },
|
||||
{ 49, 0x006e, 0x0c00004e, 0x0f, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0000004d, 0x00, 0x00, 0x0000 },
|
||||
{ 50, 0x004d, 0x0000004d, 0x01, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0000004d, 0x02, 0x00, 0x0000 },
|
||||
{ 50, 0x004d, 0x0000004d, 0x03, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0400004d, 0x04, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0400004d, 0x05, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0400004d, 0x06, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0400004d, 0x07, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0800004d, 0x08, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0800004d, 0x09, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0800004d, 0x0a, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0800004d, 0x0b, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0c00004d, 0x0c, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0c00004d, 0x0d, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0c00004d, 0x0e, 0x00, 0x0000 },
|
||||
{ 50, 0x006d, 0x0c00004d, 0x0f, 0x00, 0x0000 },
|
||||
{ 44, 0x007a, 0x0000005a, 0x00, 0x02, 0x0000 },
|
||||
{ 44, 0x005a, 0x0000005a, 0x01, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0000005a, 0x02, 0x02, 0x0000 },
|
||||
{ 44, 0x005a, 0x0000005a, 0x03, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0400005a, 0x04, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0400005a, 0x05, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0400005a, 0x06, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0400005a, 0x07, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0800005a, 0x08, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0800005a, 0x09, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0800005a, 0x0a, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0800005a, 0x0b, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0c00005a, 0x0c, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0c00005a, 0x0d, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0c00005a, 0x0e, 0x02, 0x0000 },
|
||||
{ 44, 0x007a, 0x0c00005a, 0x0f, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x00000058, 0x00, 0x02, 0x0000 },
|
||||
{ 45, 0x0058, 0x00000058, 0x01, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x00000058, 0x02, 0x02, 0x0000 },
|
||||
{ 45, 0x0058, 0x00000058, 0x03, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x04000058, 0x04, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x04000058, 0x05, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x04000058, 0x06, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x04000058, 0x07, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x08000058, 0x08, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x08000058, 0x09, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x08000058, 0x0a, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x08000058, 0x0b, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x0c000058, 0x0c, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x0c000058, 0x0d, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x0c000058, 0x0e, 0x02, 0x0000 },
|
||||
{ 45, 0x0078, 0x0c000058, 0x0f, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x00000043, 0x00, 0x02, 0x0000 },
|
||||
{ 46, 0x0043, 0x00000043, 0x01, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x00000043, 0x02, 0x02, 0x0000 },
|
||||
{ 46, 0x0043, 0x00000043, 0x03, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x04000043, 0x04, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x04000043, 0x05, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x04000043, 0x06, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x04000043, 0x07, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x08000043, 0x08, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x08000043, 0x09, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x08000043, 0x0a, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x08000043, 0x0b, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x0c000043, 0x0c, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x0c000043, 0x0d, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x0c000043, 0x0e, 0x02, 0x0000 },
|
||||
{ 46, 0x0063, 0x0c000043, 0x0f, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x00000056, 0x00, 0x02, 0x0000 },
|
||||
{ 47, 0x0056, 0x00000056, 0x01, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x00000056, 0x02, 0x02, 0x0000 },
|
||||
{ 47, 0x0056, 0x00000056, 0x03, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x04000056, 0x04, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x04000056, 0x05, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x04000056, 0x06, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x04000056, 0x07, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x08000056, 0x08, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x08000056, 0x09, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x08000056, 0x0a, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x08000056, 0x0b, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x0c000056, 0x0c, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x0c000056, 0x0d, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x0c000056, 0x0e, 0x02, 0x0000 },
|
||||
{ 47, 0x0076, 0x0c000056, 0x0f, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x00000042, 0x00, 0x02, 0x0000 },
|
||||
{ 48, 0x0042, 0x00000042, 0x01, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x00000042, 0x02, 0x02, 0x0000 },
|
||||
{ 48, 0x0042, 0x00000042, 0x03, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x04000042, 0x04, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x04000042, 0x05, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x04000042, 0x06, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x04000042, 0x07, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x08000042, 0x08, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x08000042, 0x09, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x08000042, 0x0a, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x08000042, 0x0b, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x0c000042, 0x0c, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x0c000042, 0x0d, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x0c000042, 0x0e, 0x02, 0x0000 },
|
||||
{ 48, 0x0062, 0x0c000042, 0x0f, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0000004e, 0x00, 0x02, 0x0000 },
|
||||
{ 49, 0x004e, 0x0000004e, 0x01, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0000004e, 0x02, 0x02, 0x0000 },
|
||||
{ 49, 0x004e, 0x0000004e, 0x03, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0400004e, 0x04, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0400004e, 0x05, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0400004e, 0x06, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0400004e, 0x07, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0800004e, 0x08, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0800004e, 0x09, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0800004e, 0x0a, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0800004e, 0x0b, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0c00004e, 0x0c, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0c00004e, 0x0d, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0c00004e, 0x0e, 0x02, 0x0000 },
|
||||
{ 49, 0x006e, 0x0c00004e, 0x0f, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0000004d, 0x00, 0x02, 0x0000 },
|
||||
{ 50, 0x004d, 0x0000004d, 0x01, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0000004d, 0x02, 0x02, 0x0000 },
|
||||
{ 50, 0x004d, 0x0000004d, 0x03, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0400004d, 0x04, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0400004d, 0x05, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0400004d, 0x06, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0400004d, 0x07, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0800004d, 0x08, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0800004d, 0x09, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0800004d, 0x0a, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0800004d, 0x0b, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0c00004d, 0x0c, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0c00004d, 0x0d, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0c00004d, 0x0e, 0x02, 0x0000 },
|
||||
{ 50, 0x006d, 0x0c00004d, 0x0f, 0x02, 0x0000 },
|
||||
{ 51, 0x002c, 0x0000002c, 0x00, 0x00, 0x0000 },
|
||||
{ 51, 0x003c, 0x0000003c, 0x01, 0x00, 0x0000 },
|
||||
{ 51, 0x002c, 0x0100125b, 0x02, 0x01, 0x0000 },
|
||||
|
@ -235,6 +235,8 @@ QEvdevKeyboardHandler::KeycodeAction QEvdevKeyboardHandler::processKeycode(quint
|
||||
const QEvdevKeyboardMap::Mapping *map_plain = 0;
|
||||
const QEvdevKeyboardMap::Mapping *map_withmod = 0;
|
||||
|
||||
quint8 modifiers = m_modifiers;
|
||||
|
||||
// get a specific and plain mapping for the keycode and the current modifiers
|
||||
for (int i = 0; i < m_keymap_size && !(map_plain && map_withmod); ++i) {
|
||||
const QEvdevKeyboardMap::Mapping *m = m_keymap + i;
|
||||
@ -250,9 +252,12 @@ QEvdevKeyboardHandler::KeycodeAction QEvdevKeyboardHandler::processKeycode(quint
|
||||
}
|
||||
}
|
||||
|
||||
if (m_locks[0] /*CapsLock*/ && map_withmod && (map_withmod->flags & QEvdevKeyboardMap::IsLetter))
|
||||
modifiers ^= QEvdevKeyboardMap::ModShift;
|
||||
|
||||
#ifdef QT_QPA_KEYMAP_DEBUG
|
||||
qWarning("Processing key event: keycode=%3d, modifiers=%02x pressed=%d, autorepeat=%d | plain=%d, withmod=%d, size=%d", \
|
||||
keycode, m_modifiers, pressed ? 1 : 0, autorepeat ? 1 : 0, \
|
||||
keycode, modifiers, pressed ? 1 : 0, autorepeat ? 1 : 0, \
|
||||
map_plain ? map_plain - m_keymap : -1, \
|
||||
map_withmod ? map_withmod - m_keymap : -1, \
|
||||
m_keymap_size);
|
||||
@ -263,7 +268,7 @@ QEvdevKeyboardHandler::KeycodeAction QEvdevKeyboardHandler::processKeycode(quint
|
||||
if (!it) {
|
||||
#ifdef QT_QPA_KEYMAP_DEBUG
|
||||
// we couldn't even find a plain mapping
|
||||
qWarning("Could not find a suitable mapping for keycode: %3d, modifiers: %02x", keycode, m_modifiers);
|
||||
qWarning("Could not find a suitable mapping for keycode: %3d, modifiers: %02x", keycode, modifiers);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
@ -285,7 +290,7 @@ QEvdevKeyboardHandler::KeycodeAction QEvdevKeyboardHandler::processKeycode(quint
|
||||
lock ^= 1;
|
||||
|
||||
switch (qtcode) {
|
||||
case Qt::Key_CapsLock : result = lock ? CapsLockOn : CapsLockOff; m_modifiers ^= QEvdevKeyboardMap::ModShift; break;
|
||||
case Qt::Key_CapsLock : result = lock ? CapsLockOn : CapsLockOff; break;
|
||||
case Qt::Key_NumLock : result = lock ? NumLockOn : NumLockOff; break;
|
||||
case Qt::Key_ScrollLock: result = lock ? ScrollLockOn : ScrollLockOff; break;
|
||||
default : break;
|
||||
@ -347,7 +352,7 @@ QEvdevKeyboardHandler::KeycodeAction QEvdevKeyboardHandler::processKeycode(quint
|
||||
// so just report the plain mapping with additional modifiers.
|
||||
if ((it == map_plain && it != map_withmod) ||
|
||||
(map_withmod && !(map_withmod->qtcode & modmask))) {
|
||||
qtcode |= QEvdevKeyboardHandler::toQtModifiers(m_modifiers);
|
||||
qtcode |= QEvdevKeyboardHandler::toQtModifiers(modifiers);
|
||||
}
|
||||
|
||||
if (m_composing == 2 && first_press && !(it->flags & QEvdevKeyboardMap::IsModifier)) {
|
||||
|
@ -52,23 +52,18 @@
|
||||
#include <QtCore/qdebug.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <CoreWLAN/CoreWLAN.h>
|
||||
#include <CoreWLAN/CWInterface.h>
|
||||
#include <CoreWLAN/CWNetwork.h>
|
||||
#include <CoreWLAN/CWNetwork.h>
|
||||
#include <CoreWLAN/CW8021XProfile.h>
|
||||
|
||||
#include <Foundation/NSEnumerator.h>
|
||||
#include <Foundation/NSKeyValueObserving.h>
|
||||
#include <Foundation/NSAutoreleasePool.h>
|
||||
#include <Foundation/NSLock.h>
|
||||
extern "C" { // Otherwise it won't find CWKeychain* symbols at link time
|
||||
#import <CoreWLAN/CoreWLAN.h>
|
||||
}
|
||||
|
||||
#include <SystemConfiguration/SCNetworkConfiguration.h>
|
||||
#include "private/qcore_mac_p.h"
|
||||
|
||||
#include <net/if.h>
|
||||
#include <ifaddrs.h>
|
||||
|
||||
#if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_7, __IPHONE_NA)
|
||||
|
||||
@interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject
|
||||
{
|
||||
NSNotificationCenter *notificationCenter;
|
||||
@ -94,7 +89,7 @@
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
notificationCenter = [NSNotificationCenter defaultCenter];
|
||||
currentInterface = [CWInterface interfaceWithName:nil];
|
||||
[notificationCenter addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil];
|
||||
[notificationCenter addObserver:self selector:@selector(notificationHandler:) name:CWPowerDidChangeNotification object:nil];
|
||||
[locker unlock];
|
||||
[autoreleasepool release];
|
||||
return self;
|
||||
@ -131,7 +126,7 @@
|
||||
}
|
||||
@end
|
||||
|
||||
QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
|
||||
static QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -171,33 +166,25 @@ void QScanThread::run()
|
||||
CWInterface *currentInterface = [CWInterface interfaceWithName: QCFString::toNSString(interfaceName)];
|
||||
mutex.unlock();
|
||||
|
||||
if([currentInterface power]) {
|
||||
if (currentInterface.powerOn) {
|
||||
NSError *err = nil;
|
||||
NSDictionary *parametersDict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:YES], kCWScanKeyMerge,
|
||||
[NSNumber numberWithInt:kCWScanTypeFast], kCWScanKeyScanType,
|
||||
[NSNumber numberWithInteger:100], kCWScanKeyRestTime, nil];
|
||||
|
||||
NSArray* apArray = [currentInterface scanForNetworksWithParameters:parametersDict error:&err];
|
||||
CWNetwork *apNetwork;
|
||||
NSSet* apSet = [currentInterface scanForNetworksWithName:nil error:&err];
|
||||
|
||||
if (!err) {
|
||||
|
||||
for(uint row=0; row < [apArray count]; row++ ) {
|
||||
apNetwork = [apArray objectAtIndex:row];
|
||||
|
||||
for (CWNetwork *apNetwork in apSet) {
|
||||
const QString networkSsid = QCFString::toQString([apNetwork ssid]);
|
||||
const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkSsid));
|
||||
found.append(id);
|
||||
|
||||
QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
|
||||
bool known = isKnownSsid(networkSsid);
|
||||
if( [currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
|
||||
if (currentInterface.serviceActive) {
|
||||
if( networkSsid == QCFString::toQString( [currentInterface ssid])) {
|
||||
state = QNetworkConfiguration::Active;
|
||||
}
|
||||
}
|
||||
if(state == QNetworkConfiguration::Undefined) {
|
||||
if (state == QNetworkConfiguration::Undefined) {
|
||||
if(known) {
|
||||
state = QNetworkConfiguration::Discovered;
|
||||
} else {
|
||||
@ -205,7 +192,7 @@ void QScanThread::run()
|
||||
}
|
||||
}
|
||||
QNetworkConfiguration::Purpose purpose = QNetworkConfiguration::UnknownPurpose;
|
||||
if([[apNetwork securityMode] intValue] == kCWSecurityModeOpen) {
|
||||
if ([apNetwork supportsSecurity:kCWSecurityNone]) {
|
||||
purpose = QNetworkConfiguration::PublicPurpose;
|
||||
} else {
|
||||
purpose = QNetworkConfiguration::PrivatePurpose;
|
||||
@ -235,7 +222,7 @@ void QScanThread::run()
|
||||
interfaceName = ij.value();
|
||||
}
|
||||
|
||||
if( [currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
|
||||
if (currentInterface.serviceActive) {
|
||||
if( networkSsid == QCFString::toQString([currentInterface ssid])) {
|
||||
state = QNetworkConfiguration::Active;
|
||||
}
|
||||
@ -298,14 +285,14 @@ void QScanThread::getUserConfigurations()
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
userProfiles.clear();
|
||||
|
||||
NSArray *wifiInterfaces = [CWInterface supportedInterfaces];
|
||||
for(uint row=0; row < [wifiInterfaces count]; row++ ) {
|
||||
NSSet *wifiInterfaces = [CWInterface interfaceNames];
|
||||
for (NSString *ifName in wifiInterfaces) {
|
||||
|
||||
CWInterface *wifiInterface = [CWInterface interfaceWithName: [wifiInterfaces objectAtIndex:row]];
|
||||
if ( ![wifiInterface power] )
|
||||
CWInterface *wifiInterface = [CWInterface interfaceWithName: ifName];
|
||||
if (!wifiInterface.powerOn)
|
||||
continue;
|
||||
|
||||
NSString *nsInterfaceName = [wifiInterface name];
|
||||
NSString *nsInterfaceName = wifiInterface.ssid;
|
||||
// add user configured system networks
|
||||
SCDynamicStoreRef dynRef = SCDynamicStoreCreate(kCFAllocatorSystemDefault, (CFStringRef)@"Qt corewlan", nil, nil);
|
||||
NSDictionary * airportPlist = (NSDictionary *)SCDynamicStoreCopyValue(dynRef, (CFStringRef)[NSString stringWithFormat:@"Setup:/Network/Interface/%@/AirPort", nsInterfaceName]);
|
||||
@ -314,7 +301,7 @@ void QScanThread::getUserConfigurations()
|
||||
NSDictionary *prefNetDict = [airportPlist objectForKey:@"PreferredNetworks"];
|
||||
|
||||
NSArray *thisSsidarray = [prefNetDict valueForKey:@"SSID_STR"];
|
||||
for(NSString *ssidkey in thisSsidarray) {
|
||||
for (NSString *ssidkey in thisSsidarray) {
|
||||
QString thisSsid = QCFString::toQString(ssidkey);
|
||||
if(!userProfiles.contains(thisSsid)) {
|
||||
QMap <QString,QString> map;
|
||||
@ -442,7 +429,7 @@ void QCoreWlanEngine::initialize()
|
||||
QMutexLocker locker(&mutex);
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
if([[CWInterface supportedInterfaces] count] > 0 && !listener) {
|
||||
if ([[CWInterface interfaceNames] count] > 0 && !listener) {
|
||||
listener = [[QT_MANGLE_NAMESPACE(QNSListener) alloc] init];
|
||||
listener.engine = this;
|
||||
hasWifi = true;
|
||||
@ -479,135 +466,62 @@ void QCoreWlanEngine::connectToId(const QString &id)
|
||||
CWInterface *wifiInterface =
|
||||
[CWInterface interfaceWithName: QCFString::toNSString(interfaceString)];
|
||||
|
||||
if ([wifiInterface power]) {
|
||||
if (wifiInterface.powerOn) {
|
||||
NSError *err = nil;
|
||||
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
|
||||
QString wantedSsid;
|
||||
|
||||
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
|
||||
|
||||
const QString idHash = QString::number(qHash(QLatin1String("corewlan:") + ptr->name));
|
||||
const QString idHash2 = QString::number(qHash(QLatin1String("corewlan:") + scanThread->getNetworkNameFromSsid(ptr->name)));
|
||||
|
||||
bool using8021X = false;
|
||||
if (idHash2 != id) {
|
||||
NSArray *array = [CW8021XProfile allUser8021XProfiles];
|
||||
|
||||
for (NSUInteger i = 0; i < [array count]; ++i) {
|
||||
const QString networkNameHashCheck = QString::number(qHash(QLatin1String("corewlan:") + QCFString::toQString([[array objectAtIndex:i] userDefinedName])));
|
||||
|
||||
const QString ssidHash = QString::number(qHash(QLatin1String("corewlan:") + QCFString::toQString([[array objectAtIndex:i] ssid])));
|
||||
|
||||
if (id == networkNameHashCheck || id == ssidHash) {
|
||||
const QString thisName = scanThread->getSsidFromNetworkName(id);
|
||||
if (thisName.isEmpty())
|
||||
wantedSsid = id;
|
||||
else
|
||||
wantedSsid = thisName;
|
||||
|
||||
[params setValue: [array objectAtIndex:i] forKey:kCWAssocKey8021XProfile];
|
||||
using8021X = true;
|
||||
break;
|
||||
}
|
||||
QString wantedNetwork;
|
||||
QMapIterator<QString, QMap<QString, QString> > i(scanThread->userProfiles);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
wantedNetwork = i.key();
|
||||
const QString networkNameHash = QString::number(qHash(QLatin1String("corewlan:") + wantedNetwork));
|
||||
if (id == networkNameHash) {
|
||||
wantedSsid = scanThread->getSsidFromNetworkName(wantedNetwork);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!using8021X) {
|
||||
QString wantedNetwork;
|
||||
QMapIterator<QString, QMap<QString,QString> > i(scanThread->userProfiles);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
wantedNetwork = i.key();
|
||||
const QString networkNameHash = QString::number(qHash(QLatin1String("corewlan:") + wantedNetwork));
|
||||
if (id == networkNameHash) {
|
||||
wantedSsid = scanThread->getSsidFromNetworkName(wantedNetwork);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
NSDictionary *scanParameters = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:YES], kCWScanKeyMerge,
|
||||
[NSNumber numberWithInt:kCWScanTypeFast], kCWScanKeyScanType,
|
||||
[NSNumber numberWithInteger:100], kCWScanKeyRestTime,
|
||||
QCFString::toNSString(wantedSsid), kCWScanKeySSID,
|
||||
nil];
|
||||
|
||||
NSArray *scanArray = [wifiInterface scanForNetworksWithParameters:scanParameters error:&err];
|
||||
NSSet *scanSet = [wifiInterface scanForNetworksWithName:QCFString::toNSString(wantedSsid) error:&err];
|
||||
|
||||
if(!err) {
|
||||
for(uint row=0; row < [scanArray count]; row++ ) {
|
||||
CWNetwork *apNetwork = [scanArray objectAtIndex:row];
|
||||
for (CWNetwork *apNetwork in scanSet) {
|
||||
CFDataRef ssidData = (CFDataRef)[apNetwork ssidData];
|
||||
bool result = false;
|
||||
|
||||
if(wantedSsid == QCFString::toQString([apNetwork ssid])) {
|
||||
|
||||
if(!using8021X) {
|
||||
SecKeychainAttribute attributes[3];
|
||||
|
||||
NSString *account = [apNetwork ssid];
|
||||
NSString *keyKind = @"AirPort network password";
|
||||
NSString *keyName = account;
|
||||
|
||||
attributes[0].tag = kSecAccountItemAttr;
|
||||
attributes[0].data = (void *)[account UTF8String];
|
||||
attributes[0].length = [account length];
|
||||
|
||||
attributes[1].tag = kSecDescriptionItemAttr;
|
||||
attributes[1].data = (void *)[keyKind UTF8String];
|
||||
attributes[1].length = [keyKind length];
|
||||
|
||||
attributes[2].tag = kSecLabelItemAttr;
|
||||
attributes[2].data = (void *)[keyName UTF8String];
|
||||
attributes[2].length = [keyName length];
|
||||
|
||||
SecKeychainAttributeList attributeList = {3,attributes};
|
||||
|
||||
SecKeychainSearchRef searchRef;
|
||||
SecKeychainSearchCreateFromAttributes(NULL, kSecGenericPasswordItemClass, &attributeList, &searchRef);
|
||||
|
||||
NSString *password = @"";
|
||||
SecKeychainItemRef searchItem;
|
||||
|
||||
if (SecKeychainSearchCopyNext(searchRef, &searchItem) == noErr) {
|
||||
UInt32 realPasswordLength;
|
||||
SecKeychainAttribute attributesW[8];
|
||||
attributesW[0].tag = kSecAccountItemAttr;
|
||||
SecKeychainAttributeList listW = {1,attributesW};
|
||||
char *realPassword;
|
||||
OSStatus status = SecKeychainItemCopyContent(searchItem, NULL, &listW, &realPasswordLength,(void **)&realPassword);
|
||||
|
||||
if (status == noErr) {
|
||||
if (realPassword != NULL) {
|
||||
|
||||
QByteArray pBuf;
|
||||
pBuf.resize(realPasswordLength);
|
||||
pBuf.prepend(realPassword);
|
||||
pBuf.insert(realPasswordLength,'\0');
|
||||
|
||||
password = [NSString stringWithUTF8String:pBuf];
|
||||
}
|
||||
SecKeychainItemFreeContent(&listW, realPassword);
|
||||
}
|
||||
|
||||
CFRelease(searchItem);
|
||||
} else {
|
||||
qDebug() << "SecKeychainSearchCopyNext error";
|
||||
}
|
||||
[params setValue: password forKey: kCWAssocKeyPassphrase];
|
||||
} // end using8021X
|
||||
|
||||
|
||||
bool result = [wifiInterface associateToNetwork: apNetwork parameters:[NSDictionary dictionaryWithDictionary:params] error:&err];
|
||||
|
||||
if(!err) {
|
||||
if(!result) {
|
||||
emit connectionError(id, ConnectError);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
qDebug() <<"associate ERROR"<< QCFString::toQString([err localizedDescription ]);
|
||||
SecIdentityRef identity = 0;
|
||||
// Check first whether we require IEEE 802.1X authentication for the wanted SSID
|
||||
if (CWKeychainCopyEAPIdentity(ssidData, &identity) == errSecSuccess) {
|
||||
CFStringRef username = 0;
|
||||
CFStringRef password = 0;
|
||||
if (CWKeychainCopyEAPUsernameAndPassword(ssidData, &username, &password) == errSecSuccess) {
|
||||
result = [wifiInterface associateToEnterpriseNetwork:apNetwork
|
||||
identity:identity username:(NSString *)username password:(NSString *)password
|
||||
error:&err];
|
||||
CFRelease(username);
|
||||
CFRelease(password);
|
||||
}
|
||||
CFRelease(identity);
|
||||
} else {
|
||||
CFStringRef password = 0;
|
||||
if (CWKeychainCopyPassword(ssidData, &password) == errSecSuccess) {
|
||||
result = [wifiInterface associateToNetwork:apNetwork password:(NSString *)password error:&err];
|
||||
CFRelease(password);
|
||||
}
|
||||
}
|
||||
|
||||
if (!err) {
|
||||
if (!result) {
|
||||
emit connectionError(id, ConnectError);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
qDebug() <<"associate ERROR"<< QCFString::toQString([err localizedDescription ]);
|
||||
}
|
||||
} //end scan network
|
||||
} else {
|
||||
@ -632,7 +546,7 @@ void QCoreWlanEngine::disconnectFromId(const QString &id)
|
||||
[CWInterface interfaceWithName: QCFString::toNSString(interfaceString)];
|
||||
|
||||
[wifiInterface disassociate];
|
||||
if ([[wifiInterface interfaceState]intValue] != kCWInterfaceStateInactive) {
|
||||
if (wifiInterface.serviceActive) {
|
||||
locker.unlock();
|
||||
emit connectionError(id, DisconnectionError);
|
||||
locker.relock();
|
||||
@ -652,9 +566,9 @@ void QCoreWlanEngine::doRequestUpdate()
|
||||
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
NSArray *wifiInterfaces = [CWInterface supportedInterfaces];
|
||||
for (uint row = 0; row < [wifiInterfaces count]; ++row) {
|
||||
scanThread->interfaceName = QCFString::toQString([wifiInterfaces objectAtIndex:row]);
|
||||
NSSet *wifiInterfaces = [CWInterface interfaceNames];
|
||||
for (NSString *ifName in wifiInterfaces) {
|
||||
scanThread->interfaceName = QCFString::toQString(ifName);
|
||||
scanThread->start();
|
||||
}
|
||||
locker.unlock();
|
||||
@ -668,7 +582,7 @@ bool QCoreWlanEngine::isWifiReady(const QString &wifiDeviceName)
|
||||
if(hasWifi) {
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
CWInterface *defaultInterface = [CWInterface interfaceWithName: QCFString::toNSString(wifiDeviceName)];
|
||||
if([defaultInterface power]) {
|
||||
if (defaultInterface.powerOn) {
|
||||
haswifi = true;
|
||||
}
|
||||
[autoreleasepool release];
|
||||
@ -942,3 +856,7 @@ quint64 QCoreWlanEngine::getBytes(const QString &interfaceName, bool b)
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#else // QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE
|
||||
#include "qcorewlanengine_10_6.mm"
|
||||
#endif
|
||||
|
916
src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm
Normal file
916
src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm
Normal file
@ -0,0 +1,916 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the plugins of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <SystemConfiguration/SCNetworkConfiguration.h>
|
||||
|
||||
@interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject
|
||||
{
|
||||
NSNotificationCenter *notificationCenter;
|
||||
CWInterface *currentInterface;
|
||||
QCoreWlanEngine *engine;
|
||||
NSLock *locker;
|
||||
}
|
||||
- (void)notificationHandler;//:(NSNotification *)notification;
|
||||
- (void)remove;
|
||||
- (void)setEngine:(QCoreWlanEngine *)coreEngine;
|
||||
- (QCoreWlanEngine *)engine;
|
||||
- (void)dealloc;
|
||||
|
||||
@property (assign) QCoreWlanEngine* engine;
|
||||
|
||||
@end
|
||||
|
||||
@implementation QT_MANGLE_NAMESPACE(QNSListener)
|
||||
|
||||
- (id) init
|
||||
{
|
||||
[locker lock];
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
notificationCenter = [NSNotificationCenter defaultCenter];
|
||||
currentInterface = [CWInterface interfaceWithName:nil];
|
||||
[notificationCenter addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil];
|
||||
[locker unlock];
|
||||
[autoreleasepool release];
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(void)setEngine:(QCoreWlanEngine *)coreEngine
|
||||
{
|
||||
[locker lock];
|
||||
if(!engine)
|
||||
engine = coreEngine;
|
||||
[locker unlock];
|
||||
}
|
||||
|
||||
-(QCoreWlanEngine *)engine
|
||||
{
|
||||
return engine;
|
||||
}
|
||||
|
||||
-(void)remove
|
||||
{
|
||||
[locker lock];
|
||||
[notificationCenter removeObserver:self];
|
||||
[locker unlock];
|
||||
}
|
||||
|
||||
- (void)notificationHandler//:(NSNotification *)notification
|
||||
{
|
||||
engine->requestUpdate();
|
||||
}
|
||||
@end
|
||||
|
||||
static QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
void networkChangeCallback(SCDynamicStoreRef/* store*/, CFArrayRef changedKeys, void *info)
|
||||
{
|
||||
for ( long i = 0; i < CFArrayGetCount(changedKeys); i++) {
|
||||
|
||||
QString changed = QCFString::toQString((CFStringRef)CFArrayGetValueAtIndex(changedKeys, i));
|
||||
if( changed.contains("/Network/Global/IPv4")) {
|
||||
QCoreWlanEngine* wlanEngine = static_cast<QCoreWlanEngine*>(info);
|
||||
wlanEngine->requestUpdate();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
QScanThread::QScanThread(QObject *parent)
|
||||
:QThread(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QScanThread::~QScanThread()
|
||||
{
|
||||
}
|
||||
|
||||
void QScanThread::quit()
|
||||
{
|
||||
wait();
|
||||
}
|
||||
|
||||
void QScanThread::run()
|
||||
{
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
QStringList found;
|
||||
mutex.lock();
|
||||
CWInterface *currentInterface = [CWInterface interfaceWithName: QCFString::toNSString(interfaceName)];
|
||||
mutex.unlock();
|
||||
|
||||
if([currentInterface power]) {
|
||||
NSError *err = nil;
|
||||
NSDictionary *parametersDict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:YES], kCWScanKeyMerge,
|
||||
[NSNumber numberWithInt:kCWScanTypeFast], kCWScanKeyScanType,
|
||||
[NSNumber numberWithInteger:100], kCWScanKeyRestTime, nil];
|
||||
|
||||
NSArray* apArray = [currentInterface scanForNetworksWithParameters:parametersDict error:&err];
|
||||
CWNetwork *apNetwork;
|
||||
|
||||
if (!err) {
|
||||
|
||||
for(uint row=0; row < [apArray count]; row++ ) {
|
||||
apNetwork = [apArray objectAtIndex:row];
|
||||
|
||||
const QString networkSsid = QCFString::toQString([apNetwork ssid]);
|
||||
const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkSsid));
|
||||
found.append(id);
|
||||
|
||||
QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
|
||||
bool known = isKnownSsid(networkSsid);
|
||||
if( [currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
|
||||
if( networkSsid == QCFString::toQString( [currentInterface ssid])) {
|
||||
state = QNetworkConfiguration::Active;
|
||||
}
|
||||
}
|
||||
if(state == QNetworkConfiguration::Undefined) {
|
||||
if(known) {
|
||||
state = QNetworkConfiguration::Discovered;
|
||||
} else {
|
||||
state = QNetworkConfiguration::Undefined;
|
||||
}
|
||||
}
|
||||
QNetworkConfiguration::Purpose purpose = QNetworkConfiguration::UnknownPurpose;
|
||||
if([[apNetwork securityMode] intValue] == kCWSecurityModeOpen) {
|
||||
purpose = QNetworkConfiguration::PublicPurpose;
|
||||
} else {
|
||||
purpose = QNetworkConfiguration::PrivatePurpose;
|
||||
}
|
||||
|
||||
found.append(foundNetwork(id, networkSsid, state, interfaceName, purpose));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// add known configurations that are not around.
|
||||
QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
|
||||
QString networkName = i.key();
|
||||
const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkName));
|
||||
|
||||
if(!found.contains(id)) {
|
||||
QString networkSsid = getSsidFromNetworkName(networkName);
|
||||
const QString ssidId = QString::number(qHash(QLatin1String("corewlan:") + networkSsid));
|
||||
QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
|
||||
QString interfaceName;
|
||||
QMapIterator<QString, QString> ij(i.value());
|
||||
while (ij.hasNext()) {
|
||||
ij.next();
|
||||
interfaceName = ij.value();
|
||||
}
|
||||
|
||||
if( [currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
|
||||
if( networkSsid == QCFString::toQString([currentInterface ssid])) {
|
||||
state = QNetworkConfiguration::Active;
|
||||
}
|
||||
}
|
||||
if(state == QNetworkConfiguration::Undefined) {
|
||||
if( userProfiles.contains(networkName)
|
||||
&& found.contains(ssidId)) {
|
||||
state = QNetworkConfiguration::Discovered;
|
||||
}
|
||||
}
|
||||
|
||||
if(state == QNetworkConfiguration::Undefined) {
|
||||
state = QNetworkConfiguration::Defined;
|
||||
}
|
||||
|
||||
found.append(foundNetwork(id, networkName, state, interfaceName, QNetworkConfiguration::UnknownPurpose));
|
||||
}
|
||||
}
|
||||
emit networksChanged();
|
||||
[autoreleasepool release];
|
||||
}
|
||||
|
||||
QStringList QScanThread::foundNetwork(const QString &id, const QString &name, const QNetworkConfiguration::StateFlags state, const QString &interfaceName, const QNetworkConfiguration::Purpose purpose)
|
||||
{
|
||||
QStringList found;
|
||||
QMutexLocker locker(&mutex);
|
||||
QNetworkConfigurationPrivate *ptr = new QNetworkConfigurationPrivate;
|
||||
|
||||
ptr->name = name;
|
||||
ptr->isValid = true;
|
||||
ptr->id = id;
|
||||
ptr->state = state;
|
||||
ptr->type = QNetworkConfiguration::InternetAccessPoint;
|
||||
ptr->bearerType = QNetworkConfiguration::BearerWLAN;
|
||||
ptr->purpose = purpose;
|
||||
|
||||
fetchedConfigurations.append( ptr);
|
||||
configurationInterface.insert(ptr->id, interfaceName);
|
||||
|
||||
locker.unlock();
|
||||
locker.relock();
|
||||
found.append(id);
|
||||
return found;
|
||||
}
|
||||
|
||||
QList<QNetworkConfigurationPrivate *> QScanThread::getConfigurations()
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
QList<QNetworkConfigurationPrivate *> foundConfigurations = fetchedConfigurations;
|
||||
fetchedConfigurations.clear();
|
||||
|
||||
return foundConfigurations;
|
||||
}
|
||||
|
||||
void QScanThread::getUserConfigurations()
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
userProfiles.clear();
|
||||
|
||||
NSArray *wifiInterfaces = [CWInterface supportedInterfaces];
|
||||
for(uint row=0; row < [wifiInterfaces count]; row++ ) {
|
||||
|
||||
CWInterface *wifiInterface = [CWInterface interfaceWithName: [wifiInterfaces objectAtIndex:row]];
|
||||
if ( ![wifiInterface power] )
|
||||
continue;
|
||||
|
||||
NSString *nsInterfaceName = [wifiInterface name];
|
||||
// add user configured system networks
|
||||
SCDynamicStoreRef dynRef = SCDynamicStoreCreate(kCFAllocatorSystemDefault, (CFStringRef)@"Qt corewlan", nil, nil);
|
||||
NSDictionary * airportPlist = (NSDictionary *)SCDynamicStoreCopyValue(dynRef, (CFStringRef)[NSString stringWithFormat:@"Setup:/Network/Interface/%@/AirPort", nsInterfaceName]);
|
||||
CFRelease(dynRef);
|
||||
if(airportPlist != nil) {
|
||||
NSDictionary *prefNetDict = [airportPlist objectForKey:@"PreferredNetworks"];
|
||||
|
||||
NSArray *thisSsidarray = [prefNetDict valueForKey:@"SSID_STR"];
|
||||
for(NSString *ssidkey in thisSsidarray) {
|
||||
QString thisSsid = QCFString::toQString(ssidkey);
|
||||
if(!userProfiles.contains(thisSsid)) {
|
||||
QMap <QString,QString> map;
|
||||
map.insert(thisSsid, QCFString::toQString(nsInterfaceName));
|
||||
userProfiles.insert(thisSsid, map);
|
||||
}
|
||||
}
|
||||
CFRelease(airportPlist);
|
||||
}
|
||||
|
||||
// 802.1X user profiles
|
||||
QString userProfilePath = QDir::homePath() + "/Library/Preferences/com.apple.eap.profiles.plist";
|
||||
NSDictionary* eapDict = [[[NSDictionary alloc] initWithContentsOfFile: QCFString::toNSString(userProfilePath)] autorelease];
|
||||
if(eapDict != nil) {
|
||||
NSString *profileStr= @"Profiles";
|
||||
NSString *nameStr = @"UserDefinedName";
|
||||
NSString *networkSsidStr = @"Wireless Network";
|
||||
for (id profileKey in eapDict) {
|
||||
if ([profileStr isEqualToString:profileKey]) {
|
||||
NSDictionary *itemDict = [eapDict objectForKey:profileKey];
|
||||
for (id itemKey in itemDict) {
|
||||
|
||||
NSInteger dictSize = [itemKey count];
|
||||
id objects[dictSize];
|
||||
id keys[dictSize];
|
||||
|
||||
[itemKey getObjects:objects andKeys:keys];
|
||||
QString networkName;
|
||||
QString ssid;
|
||||
for(int i = 0; i < dictSize; i++) {
|
||||
if([nameStr isEqualToString:keys[i]]) {
|
||||
networkName = QCFString::toQString(objects[i]);
|
||||
}
|
||||
if([networkSsidStr isEqualToString:keys[i]]) {
|
||||
ssid = QCFString::toQString(objects[i]);
|
||||
}
|
||||
if(!userProfiles.contains(networkName)
|
||||
&& !ssid.isEmpty()) {
|
||||
QMap<QString,QString> map;
|
||||
map.insert(ssid, QCFString::toQString(nsInterfaceName));
|
||||
userProfiles.insert(networkName, map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
[autoreleasepool release];
|
||||
}
|
||||
|
||||
QString QScanThread::getSsidFromNetworkName(const QString &name)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
QMap<QString,QString> map = i.value();
|
||||
QMapIterator<QString, QString> ij(i.value());
|
||||
while (ij.hasNext()) {
|
||||
ij.next();
|
||||
const QString networkNameHash = QString::number(qHash(QLatin1String("corewlan:") +i.key()));
|
||||
if(name == i.key() || name == networkNameHash) {
|
||||
return ij.key();
|
||||
}
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString QScanThread::getNetworkNameFromSsid(const QString &ssid)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
QMap<QString,QString> map = i.value();
|
||||
QMapIterator<QString, QString> ij(i.value());
|
||||
while (ij.hasNext()) {
|
||||
ij.next();
|
||||
if(ij.key() == ssid) {
|
||||
return i.key();
|
||||
}
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool QScanThread::isKnownSsid(const QString &ssid)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
QMapIterator<QString, QMap<QString,QString> > i(userProfiles);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
QMap<QString,QString> map = i.value();
|
||||
if(map.keys().contains(ssid)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QCoreWlanEngine::QCoreWlanEngine(QObject *parent)
|
||||
: QBearerEngineImpl(parent), scanThread(0)
|
||||
{
|
||||
scanThread = new QScanThread(this);
|
||||
connect(scanThread, SIGNAL(networksChanged()),
|
||||
this, SLOT(networksChanged()));
|
||||
}
|
||||
|
||||
QCoreWlanEngine::~QCoreWlanEngine()
|
||||
{
|
||||
while (!foundConfigurations.isEmpty())
|
||||
delete foundConfigurations.takeFirst();
|
||||
[listener remove];
|
||||
[listener release];
|
||||
}
|
||||
|
||||
void QCoreWlanEngine::initialize()
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
if([[CWInterface supportedInterfaces] count] > 0 && !listener) {
|
||||
listener = [[QT_MANGLE_NAMESPACE(QNSListener) alloc] init];
|
||||
listener.engine = this;
|
||||
hasWifi = true;
|
||||
} else {
|
||||
hasWifi = false;
|
||||
}
|
||||
storeSession = NULL;
|
||||
|
||||
startNetworkChangeLoop();
|
||||
[autoreleasepool release];
|
||||
}
|
||||
|
||||
|
||||
QString QCoreWlanEngine::getInterfaceFromId(const QString &id)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
return scanThread->configurationInterface.value(id);
|
||||
}
|
||||
|
||||
bool QCoreWlanEngine::hasIdentifier(const QString &id)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
return scanThread->configurationInterface.contains(id);
|
||||
}
|
||||
|
||||
void QCoreWlanEngine::connectToId(const QString &id)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
QString interfaceString = getInterfaceFromId(id);
|
||||
|
||||
CWInterface *wifiInterface =
|
||||
[CWInterface interfaceWithName: QCFString::toNSString(interfaceString)];
|
||||
|
||||
if ([wifiInterface power]) {
|
||||
NSError *err = nil;
|
||||
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
|
||||
QString wantedSsid;
|
||||
|
||||
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
|
||||
|
||||
const QString idHash = QString::number(qHash(QLatin1String("corewlan:") + ptr->name));
|
||||
const QString idHash2 = QString::number(qHash(QLatin1String("corewlan:") + scanThread->getNetworkNameFromSsid(ptr->name)));
|
||||
|
||||
bool using8021X = false;
|
||||
if (idHash2 != id) {
|
||||
NSArray *array = [CW8021XProfile allUser8021XProfiles];
|
||||
|
||||
for (NSUInteger i = 0; i < [array count]; ++i) {
|
||||
const QString networkNameHashCheck = QString::number(qHash(QLatin1String("corewlan:") + QCFString::toQString([[array objectAtIndex:i] userDefinedName])));
|
||||
|
||||
const QString ssidHash = QString::number(qHash(QLatin1String("corewlan:") + QCFString::toQString([[array objectAtIndex:i] ssid])));
|
||||
|
||||
if (id == networkNameHashCheck || id == ssidHash) {
|
||||
const QString thisName = scanThread->getSsidFromNetworkName(id);
|
||||
if (thisName.isEmpty())
|
||||
wantedSsid = id;
|
||||
else
|
||||
wantedSsid = thisName;
|
||||
|
||||
[params setValue: [array objectAtIndex:i] forKey:kCWAssocKey8021XProfile];
|
||||
using8021X = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!using8021X) {
|
||||
QString wantedNetwork;
|
||||
QMapIterator<QString, QMap<QString,QString> > i(scanThread->userProfiles);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
wantedNetwork = i.key();
|
||||
const QString networkNameHash = QString::number(qHash(QLatin1String("corewlan:") + wantedNetwork));
|
||||
if (id == networkNameHash) {
|
||||
wantedSsid = scanThread->getSsidFromNetworkName(wantedNetwork);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
NSDictionary *scanParameters = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:YES], kCWScanKeyMerge,
|
||||
[NSNumber numberWithInt:kCWScanTypeFast], kCWScanKeyScanType,
|
||||
[NSNumber numberWithInteger:100], kCWScanKeyRestTime,
|
||||
QCFString::toNSString(wantedSsid), kCWScanKeySSID,
|
||||
nil];
|
||||
|
||||
NSArray *scanArray = [wifiInterface scanForNetworksWithParameters:scanParameters error:&err];
|
||||
|
||||
if(!err) {
|
||||
for(uint row=0; row < [scanArray count]; row++ ) {
|
||||
CWNetwork *apNetwork = [scanArray objectAtIndex:row];
|
||||
|
||||
if(wantedSsid == QCFString::toQString([apNetwork ssid])) {
|
||||
|
||||
if(!using8021X) {
|
||||
SecKeychainAttribute attributes[3];
|
||||
|
||||
NSString *account = [apNetwork ssid];
|
||||
NSString *keyKind = @"AirPort network password";
|
||||
NSString *keyName = account;
|
||||
|
||||
attributes[0].tag = kSecAccountItemAttr;
|
||||
attributes[0].data = (void *)[account UTF8String];
|
||||
attributes[0].length = [account length];
|
||||
|
||||
attributes[1].tag = kSecDescriptionItemAttr;
|
||||
attributes[1].data = (void *)[keyKind UTF8String];
|
||||
attributes[1].length = [keyKind length];
|
||||
|
||||
attributes[2].tag = kSecLabelItemAttr;
|
||||
attributes[2].data = (void *)[keyName UTF8String];
|
||||
attributes[2].length = [keyName length];
|
||||
|
||||
SecKeychainAttributeList attributeList = {3,attributes};
|
||||
|
||||
SecKeychainSearchRef searchRef;
|
||||
SecKeychainSearchCreateFromAttributes(NULL, kSecGenericPasswordItemClass, &attributeList, &searchRef);
|
||||
|
||||
NSString *password = @"";
|
||||
SecKeychainItemRef searchItem;
|
||||
|
||||
if (SecKeychainSearchCopyNext(searchRef, &searchItem) == noErr) {
|
||||
UInt32 realPasswordLength;
|
||||
SecKeychainAttribute attributesW[8];
|
||||
attributesW[0].tag = kSecAccountItemAttr;
|
||||
SecKeychainAttributeList listW = {1,attributesW};
|
||||
char *realPassword;
|
||||
OSStatus status = SecKeychainItemCopyContent(searchItem, NULL, &listW, &realPasswordLength,(void **)&realPassword);
|
||||
|
||||
if (status == noErr) {
|
||||
if (realPassword != NULL) {
|
||||
|
||||
QByteArray pBuf;
|
||||
pBuf.resize(realPasswordLength);
|
||||
pBuf.prepend(realPassword);
|
||||
pBuf.insert(realPasswordLength,'\0');
|
||||
|
||||
password = [NSString stringWithUTF8String:pBuf];
|
||||
}
|
||||
SecKeychainItemFreeContent(&listW, realPassword);
|
||||
}
|
||||
|
||||
CFRelease(searchItem);
|
||||
} else {
|
||||
qDebug() << "SecKeychainSearchCopyNext error";
|
||||
}
|
||||
[params setValue: password forKey: kCWAssocKeyPassphrase];
|
||||
} // end using8021X
|
||||
|
||||
|
||||
bool result = [wifiInterface associateToNetwork: apNetwork parameters:[NSDictionary dictionaryWithDictionary:params] error:&err];
|
||||
|
||||
if(!err) {
|
||||
if(!result) {
|
||||
emit connectionError(id, ConnectError);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
qDebug() <<"associate ERROR"<< QCFString::toQString([err localizedDescription ]);
|
||||
}
|
||||
}
|
||||
} //end scan network
|
||||
} else {
|
||||
qDebug() <<"scan ERROR"<< QCFString::toQString([err localizedDescription ]);
|
||||
}
|
||||
emit connectionError(id, InterfaceLookupError);
|
||||
}
|
||||
|
||||
locker.unlock();
|
||||
emit connectionError(id, InterfaceLookupError);
|
||||
[autoreleasepool release];
|
||||
}
|
||||
|
||||
void QCoreWlanEngine::disconnectFromId(const QString &id)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
QString interfaceString = getInterfaceFromId(id);
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
CWInterface *wifiInterface =
|
||||
[CWInterface interfaceWithName: QCFString::toNSString(interfaceString)];
|
||||
|
||||
[wifiInterface disassociate];
|
||||
if ([[wifiInterface interfaceState]intValue] != kCWInterfaceStateInactive) {
|
||||
locker.unlock();
|
||||
emit connectionError(id, DisconnectionError);
|
||||
locker.relock();
|
||||
}
|
||||
[autoreleasepool release];
|
||||
}
|
||||
|
||||
void QCoreWlanEngine::requestUpdate()
|
||||
{
|
||||
scanThread->getUserConfigurations();
|
||||
doRequestUpdate();
|
||||
}
|
||||
|
||||
void QCoreWlanEngine::doRequestUpdate()
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
NSArray *wifiInterfaces = [CWInterface supportedInterfaces];
|
||||
for (uint row = 0; row < [wifiInterfaces count]; ++row) {
|
||||
scanThread->interfaceName = QCFString::toQString([wifiInterfaces objectAtIndex:row]);
|
||||
scanThread->start();
|
||||
}
|
||||
locker.unlock();
|
||||
[autoreleasepool release];
|
||||
}
|
||||
|
||||
bool QCoreWlanEngine::isWifiReady(const QString &wifiDeviceName)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
bool haswifi = false;
|
||||
if(hasWifi) {
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
CWInterface *defaultInterface = [CWInterface interfaceWithName: QCFString::toNSString(wifiDeviceName)];
|
||||
if([defaultInterface power]) {
|
||||
haswifi = true;
|
||||
}
|
||||
[autoreleasepool release];
|
||||
}
|
||||
return haswifi;
|
||||
}
|
||||
|
||||
|
||||
QNetworkSession::State QCoreWlanEngine::sessionStateForId(const QString &id)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
|
||||
|
||||
if (!ptr)
|
||||
return QNetworkSession::Invalid;
|
||||
|
||||
if (!ptr->isValid) {
|
||||
return QNetworkSession::Invalid;
|
||||
} else if ((ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
|
||||
return QNetworkSession::Connected;
|
||||
} else if ((ptr->state & QNetworkConfiguration::Discovered) ==
|
||||
QNetworkConfiguration::Discovered) {
|
||||
return QNetworkSession::Disconnected;
|
||||
} else if ((ptr->state & QNetworkConfiguration::Defined) == QNetworkConfiguration::Defined) {
|
||||
return QNetworkSession::NotAvailable;
|
||||
} else if ((ptr->state & QNetworkConfiguration::Undefined) ==
|
||||
QNetworkConfiguration::Undefined) {
|
||||
return QNetworkSession::NotAvailable;
|
||||
}
|
||||
|
||||
return QNetworkSession::Invalid;
|
||||
}
|
||||
|
||||
QNetworkConfigurationManager::Capabilities QCoreWlanEngine::capabilities() const
|
||||
{
|
||||
return QNetworkConfigurationManager::ForcedRoaming;
|
||||
}
|
||||
|
||||
void QCoreWlanEngine::startNetworkChangeLoop()
|
||||
{
|
||||
|
||||
SCDynamicStoreContext dynStoreContext = { 0, this/*(void *)storeSession*/, NULL, NULL, NULL };
|
||||
storeSession = SCDynamicStoreCreate(NULL,
|
||||
CFSTR("networkChangeCallback"),
|
||||
networkChangeCallback,
|
||||
&dynStoreContext);
|
||||
if (!storeSession ) {
|
||||
qWarning() << "could not open dynamic store: error:" << SCErrorString(SCError());
|
||||
return;
|
||||
}
|
||||
|
||||
CFMutableArrayRef notificationKeys;
|
||||
notificationKeys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
|
||||
CFMutableArrayRef patternsArray;
|
||||
patternsArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
|
||||
|
||||
CFStringRef storeKey;
|
||||
storeKey = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
|
||||
kSCDynamicStoreDomainState,
|
||||
kSCEntNetIPv4);
|
||||
CFArrayAppendValue(notificationKeys, storeKey);
|
||||
CFRelease(storeKey);
|
||||
|
||||
storeKey = SCDynamicStoreKeyCreateNetworkServiceEntity(NULL,
|
||||
kSCDynamicStoreDomainState,
|
||||
kSCCompAnyRegex,
|
||||
kSCEntNetIPv4);
|
||||
CFArrayAppendValue(patternsArray, storeKey);
|
||||
CFRelease(storeKey);
|
||||
|
||||
if (!SCDynamicStoreSetNotificationKeys(storeSession , notificationKeys, patternsArray)) {
|
||||
qWarning() << "register notification error:"<< SCErrorString(SCError());
|
||||
CFRelease(storeSession );
|
||||
CFRelease(notificationKeys);
|
||||
CFRelease(patternsArray);
|
||||
return;
|
||||
}
|
||||
CFRelease(notificationKeys);
|
||||
CFRelease(patternsArray);
|
||||
|
||||
runloopSource = SCDynamicStoreCreateRunLoopSource(NULL, storeSession , 0);
|
||||
if (!runloopSource) {
|
||||
qWarning() << "runloop source error:"<< SCErrorString(SCError());
|
||||
CFRelease(storeSession );
|
||||
return;
|
||||
}
|
||||
|
||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), runloopSource, kCFRunLoopDefaultMode);
|
||||
return;
|
||||
}
|
||||
|
||||
QNetworkSessionPrivate *QCoreWlanEngine::createSessionBackend()
|
||||
{
|
||||
return new QNetworkSessionPrivateImpl;
|
||||
}
|
||||
|
||||
QNetworkConfigurationPrivatePointer QCoreWlanEngine::defaultConfiguration()
|
||||
{
|
||||
return QNetworkConfigurationPrivatePointer();
|
||||
}
|
||||
|
||||
bool QCoreWlanEngine::requiresPolling() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void QCoreWlanEngine::networksChanged()
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
QStringList previous = accessPointConfigurations.keys();
|
||||
|
||||
QList<QNetworkConfigurationPrivate *> foundConfigurations = scanThread->getConfigurations();
|
||||
while (!foundConfigurations.isEmpty()) {
|
||||
QNetworkConfigurationPrivate *cpPriv = foundConfigurations.takeFirst();
|
||||
|
||||
previous.removeAll(cpPriv->id);
|
||||
|
||||
if (accessPointConfigurations.contains(cpPriv->id)) {
|
||||
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(cpPriv->id);
|
||||
|
||||
bool changed = false;
|
||||
|
||||
ptr->mutex.lock();
|
||||
|
||||
if (ptr->isValid != cpPriv->isValid) {
|
||||
ptr->isValid = cpPriv->isValid;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (ptr->name != cpPriv->name) {
|
||||
ptr->name = cpPriv->name;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (ptr->bearerType != cpPriv->bearerType) {
|
||||
ptr->bearerType = cpPriv->bearerType;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (ptr->state != cpPriv->state) {
|
||||
ptr->state = cpPriv->state;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
ptr->mutex.unlock();
|
||||
|
||||
if (changed) {
|
||||
locker.unlock();
|
||||
emit configurationChanged(ptr);
|
||||
locker.relock();
|
||||
}
|
||||
|
||||
delete cpPriv;
|
||||
} else {
|
||||
QNetworkConfigurationPrivatePointer ptr(cpPriv);
|
||||
|
||||
accessPointConfigurations.insert(ptr->id, ptr);
|
||||
|
||||
locker.unlock();
|
||||
emit configurationAdded(ptr);
|
||||
locker.relock();
|
||||
}
|
||||
}
|
||||
|
||||
while (!previous.isEmpty()) {
|
||||
QNetworkConfigurationPrivatePointer ptr =
|
||||
accessPointConfigurations.take(previous.takeFirst());
|
||||
|
||||
locker.unlock();
|
||||
emit configurationRemoved(ptr);
|
||||
locker.relock();
|
||||
}
|
||||
|
||||
locker.unlock();
|
||||
emit updateCompleted();
|
||||
|
||||
}
|
||||
|
||||
quint64 QCoreWlanEngine::bytesWritten(const QString &id)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
const QString interfaceStr = getInterfaceFromId(id);
|
||||
return getBytes(interfaceStr,false);
|
||||
}
|
||||
|
||||
quint64 QCoreWlanEngine::bytesReceived(const QString &id)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
const QString interfaceStr = getInterfaceFromId(id);
|
||||
return getBytes(interfaceStr,true);
|
||||
}
|
||||
|
||||
quint64 QCoreWlanEngine::startTime(const QString &identifier)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
quint64 timestamp = 0;
|
||||
|
||||
NSString *filePath = @"/Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist";
|
||||
NSDictionary* plistDict = [[[NSDictionary alloc] initWithContentsOfFile:filePath] autorelease];
|
||||
if(plistDict == nil)
|
||||
return timestamp;
|
||||
NSString *input = @"KnownNetworks";
|
||||
NSString *timeStampStr = @"_timeStamp";
|
||||
|
||||
NSString *ssidStr = @"SSID_STR";
|
||||
|
||||
for (id key in plistDict) {
|
||||
if ([input isEqualToString:key]) {
|
||||
|
||||
NSDictionary *knownNetworksDict = [plistDict objectForKey:key];
|
||||
if(knownNetworksDict == nil)
|
||||
return timestamp;
|
||||
for (id networkKey in knownNetworksDict) {
|
||||
bool isFound = false;
|
||||
NSDictionary *itemDict = [knownNetworksDict objectForKey:networkKey];
|
||||
if(itemDict == nil)
|
||||
return timestamp;
|
||||
NSInteger dictSize = [itemDict count];
|
||||
id objects[dictSize];
|
||||
id keys[dictSize];
|
||||
|
||||
[itemDict getObjects:objects andKeys:keys];
|
||||
bool ok = false;
|
||||
for(int i = 0; i < dictSize; i++) {
|
||||
if([ssidStr isEqualToString:keys[i]]) {
|
||||
const QString ident = QString::number(qHash(QLatin1String("corewlan:") + QCFString::toQString(objects[i])));
|
||||
if(ident == identifier) {
|
||||
ok = true;
|
||||
}
|
||||
}
|
||||
if(ok && [timeStampStr isEqualToString:keys[i]]) {
|
||||
timestamp = (quint64)[objects[i] timeIntervalSince1970];
|
||||
isFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isFound)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
[autoreleasepool release];
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
quint64 QCoreWlanEngine::getBytes(const QString &interfaceName, bool b)
|
||||
{
|
||||
struct ifaddrs *ifAddressList, *ifAddress;
|
||||
struct if_data *if_data;
|
||||
|
||||
quint64 bytes = 0;
|
||||
ifAddressList = nil;
|
||||
if(getifaddrs(&ifAddressList) == 0) {
|
||||
for(ifAddress = ifAddressList; ifAddress; ifAddress = ifAddress->ifa_next) {
|
||||
if(interfaceName == ifAddress->ifa_name) {
|
||||
if_data = (struct if_data*)ifAddress->ifa_data;
|
||||
if(b) {
|
||||
bytes = if_data->ifi_ibytes;
|
||||
break;
|
||||
} else {
|
||||
bytes = if_data->ifi_obytes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
freeifaddrs(ifAddressList);
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
7
src/plugins/generic/evdevkeyboard/README
Normal file
7
src/plugins/generic/evdevkeyboard/README
Normal file
@ -0,0 +1,7 @@
|
||||
On development machines it might be useful to add the input devices
|
||||
to a group that your development user is part of. I.e. add:
|
||||
KERNEL=="event*", SUBSYSTEM=="input", MODE="0640", GROUP="users"
|
||||
|
||||
to a file such as:
|
||||
/etc/udev/rules.d/10-local.rules
|
||||
|
@ -12,3 +12,11 @@ initial position.
|
||||
|
||||
Touchpads reporting absolute events will work too, the positions will
|
||||
be turned into relative. Touchscreens are however not supported.
|
||||
|
||||
On development machines it might be useful to add the input devices
|
||||
to a group that your development user is part of. I.e. add:
|
||||
KERNEL=="event*", SUBSYSTEM=="input", MODE="0640", GROUP="users"
|
||||
|
||||
to a file such as:
|
||||
/etc/udev/rules.d/10-local.rules
|
||||
|
||||
|
@ -46,6 +46,8 @@
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
|
||||
#include <QtGui/private/qopenglcontext_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QAndroidOpenGLContext::QAndroidOpenGLContext(const QAndroidPlatformIntegration *integration,
|
||||
@ -75,4 +77,17 @@ void QAndroidOpenGLContext::swapBuffers(QPlatformSurface *surface)
|
||||
}
|
||||
}
|
||||
|
||||
bool QAndroidOpenGLContext::makeCurrent(QPlatformSurface *surface)
|
||||
{
|
||||
bool ret = QEglFSContext::makeCurrent(surface);
|
||||
|
||||
const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
|
||||
if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0) {
|
||||
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
|
||||
ctx_d->workaround_missingPrecisionQualifiers = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -58,6 +58,7 @@ public:
|
||||
EGLenum eglApi = EGL_OPENGL_ES_API);
|
||||
|
||||
void swapBuffers(QPlatformSurface *surface);
|
||||
bool makeCurrent(QPlatformSurface *surface);
|
||||
|
||||
private:
|
||||
const QAndroidPlatformIntegration *m_platformIntegration;
|
||||
|
@ -84,6 +84,8 @@ public:
|
||||
inline NSMenuItem *nsMenuItem() const
|
||||
{ return m_nativeItem; }
|
||||
|
||||
inline bool isVisible() const { return m_visible; }
|
||||
|
||||
virtual QPlatformMenuItem *menuItemAt(int position) const;
|
||||
virtual QPlatformMenuItem *menuItemForTag(quintptr tag) const;
|
||||
|
||||
@ -100,6 +102,7 @@ private:
|
||||
NSMenuItem *m_nativeItem;
|
||||
NSObject *m_delegate;
|
||||
bool m_enabled;
|
||||
bool m_visible;
|
||||
quintptr m_tag;
|
||||
QCocoaMenuBar *m_menuBar;
|
||||
};
|
||||
|
@ -218,6 +218,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
QCocoaMenu::QCocoaMenu() :
|
||||
m_enabled(true),
|
||||
m_visible(true),
|
||||
m_tag(0),
|
||||
m_menuBar(0)
|
||||
{
|
||||
@ -423,6 +424,7 @@ void QCocoaMenu::setEnabled(bool enabled)
|
||||
void QCocoaMenu::setVisible(bool visible)
|
||||
{
|
||||
[m_nativeItem setSubmenu:(visible ? m_nativeMenu : nil)];
|
||||
m_visible = visible;
|
||||
}
|
||||
|
||||
void QCocoaMenu::showPopup(const QWindow *parentWindow, QPoint pos, const QPlatformMenuItem *item)
|
||||
|
@ -149,15 +149,17 @@ void QCocoaMenuBar::syncMenu(QPlatformMenu *menu)
|
||||
Q_FOREACH (QCocoaMenuItem *item, cocoaMenu->items())
|
||||
cocoaMenu->syncMenuItem(item);
|
||||
|
||||
// If the NSMenu has no visble items, or only separators, we should hide it
|
||||
// on the menubar. This can happen after syncing the menu items since they
|
||||
// can be moved to other menus.
|
||||
BOOL shouldHide = YES;
|
||||
for (NSMenuItem *item in [cocoaMenu->nsMenu() itemArray])
|
||||
if (![item isSeparatorItem] && ![item isHidden]) {
|
||||
shouldHide = NO;
|
||||
break;
|
||||
}
|
||||
if (cocoaMenu->isVisible()) {
|
||||
// If the NSMenu has no visble items, or only separators, we should hide it
|
||||
// on the menubar. This can happen after syncing the menu items since they
|
||||
// can be moved to other menus.
|
||||
for (NSMenuItem *item in [cocoaMenu->nsMenu() itemArray])
|
||||
if (![item isSeparatorItem] && ![item isHidden]) {
|
||||
shouldHide = NO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
[cocoaMenu->nsMenuItem() setHidden:shouldHide];
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,6 @@ void QCocoaWindow::setGeometry(const QRect &rect)
|
||||
#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
|
||||
qDebug() << "QCocoaWindow::setGeometry" << this << rect;
|
||||
#endif
|
||||
QPlatformWindow::setGeometry(rect);
|
||||
setCocoaGeometry(rect);
|
||||
}
|
||||
|
||||
@ -278,8 +277,10 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect)
|
||||
{
|
||||
QCocoaAutoReleasePool pool;
|
||||
|
||||
if (m_contentViewIsEmbedded)
|
||||
if (m_contentViewIsEmbedded) {
|
||||
QPlatformWindow::setGeometry(rect);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_nsWindow) {
|
||||
NSRect bounds = qt_mac_flipRect(rect, window());
|
||||
@ -287,6 +288,8 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect)
|
||||
} else {
|
||||
[m_contentView setFrame : NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height())];
|
||||
}
|
||||
|
||||
// will call QPlatformWindow::setGeometry(rect) during resize confirmation (see qnsview.mm)
|
||||
}
|
||||
|
||||
void QCocoaWindow::setVisible(bool visible)
|
||||
@ -423,11 +426,13 @@ NSInteger QCocoaWindow::windowLevel(Qt::WindowFlags flags)
|
||||
if (type == Qt::ToolTip)
|
||||
windowLevel = NSScreenSaverWindowLevel;
|
||||
|
||||
// A window should be in at least the same level as its parent.
|
||||
const QWindow * const transientParent = window()->transientParent();
|
||||
const QCocoaWindow * const transientParentWindow = transientParent ? static_cast<QCocoaWindow *>(transientParent->handle()) : 0;
|
||||
if (transientParentWindow)
|
||||
windowLevel = qMax([transientParentWindow->m_nsWindow level], windowLevel);
|
||||
// Any "special" window should be in at least the same level as its parent.
|
||||
if (type != Qt::Window) {
|
||||
const QWindow * const transientParent = window()->transientParent();
|
||||
const QCocoaWindow * const transientParentWindow = transientParent ? static_cast<QCocoaWindow *>(transientParent->handle()) : 0;
|
||||
if (transientParentWindow)
|
||||
windowLevel = qMax([transientParentWindow->m_nsWindow level], windowLevel);
|
||||
}
|
||||
|
||||
return windowLevel;
|
||||
}
|
||||
|
@ -1211,7 +1211,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
timestamp,
|
||||
(lastKnownModifiers & mac_mask) ? QEvent::KeyRelease : QEvent::KeyPress,
|
||||
modifier_key_symbols[i].qt_code,
|
||||
qmodifiers);
|
||||
qmodifiers ^ [QNSView convertKeyModifiers:mac_mask]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,10 +187,8 @@ void QMacPrintEnginePrivate::setPaperName(const QString &name)
|
||||
|
||||
if (PMSessionGetCurrentPrinter(session(), &printer) == noErr) {
|
||||
CFArrayRef array;
|
||||
if (PMPrinterGetPaperList(printer, &array) != noErr) {
|
||||
PMRelease(printer);
|
||||
if (PMPrinterGetPaperList(printer, &array) != noErr)
|
||||
return;
|
||||
}
|
||||
int count = CFArrayGetCount(array);
|
||||
for (int i = 0; i < count; ++i) {
|
||||
PMPaper paper = static_cast<PMPaper>(const_cast<void *>(CFArrayGetValueAtIndex(array, i)));
|
||||
@ -208,7 +206,6 @@ void QMacPrintEnginePrivate::setPaperName(const QString &name)
|
||||
}
|
||||
}
|
||||
}
|
||||
PMRelease(printer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,9 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo
|
||||
|
||||
makeCurrent();
|
||||
|
||||
QRectF sr = window->screen()->geometry();
|
||||
glViewport(0, 0, sr.width(), sr.height());
|
||||
|
||||
#ifdef QEGL_EXTRA_DEBUG
|
||||
qWarning("QEglBackingStore::flush %p", window);
|
||||
#endif
|
||||
@ -120,7 +123,6 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo
|
||||
};
|
||||
|
||||
QRectF r = window->geometry();
|
||||
QRectF sr = window->screen()->geometry();
|
||||
|
||||
GLfloat x1 = (r.left() / sr.width()) * 2 - 1;
|
||||
GLfloat x2 = (r.right() / sr.width()) * 2 - 1;
|
||||
@ -192,8 +194,6 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo
|
||||
|
||||
void QEglFSBackingStore::makeCurrent()
|
||||
{
|
||||
// needed to prevent QOpenGLContext::makeCurrent() from failing
|
||||
window()->setSurfaceType(QSurface::OpenGLSurface);
|
||||
(static_cast<QEglFSWindow *>(window()->handle()))->create();
|
||||
m_context->makeCurrent(window());
|
||||
}
|
||||
|
@ -55,12 +55,12 @@ QEglFSWindow::QEglFSWindow(QWindow *w)
|
||||
: QPlatformWindow(w)
|
||||
, m_surface(0)
|
||||
, m_window(0)
|
||||
, has_window(false)
|
||||
{
|
||||
static int serialNo = 0;
|
||||
m_winid = ++serialNo;
|
||||
#ifdef QEGL_EXTRA_DEBUG
|
||||
qWarning("QEglWindow %p: %p 0x%x\n", this, w, uint(m_winid));
|
||||
qWarning("QEglWindow %p: %p 0x%x\n", this, w, uint(m_window));
|
||||
#endif
|
||||
w->setSurfaceType(QSurface::OpenGLSurface);
|
||||
}
|
||||
|
||||
QEglFSWindow::~QEglFSWindow()
|
||||
@ -75,7 +75,7 @@ static inline bool supportsMultipleWindows()
|
||||
|
||||
void QEglFSWindow::create()
|
||||
{
|
||||
if (m_window)
|
||||
if (has_window)
|
||||
return;
|
||||
|
||||
setWindowState(Qt::WindowFullScreen);
|
||||
@ -100,7 +100,7 @@ void QEglFSWindow::create()
|
||||
void QEglFSWindow::invalidateSurface()
|
||||
{
|
||||
// Native surface has been deleted behind our backs
|
||||
m_window = 0;
|
||||
has_window = false;
|
||||
if (m_surface != 0) {
|
||||
EGLDisplay display = (static_cast<QEglFSScreen *>(window()->screen()->handle()))->display();
|
||||
eglDestroySurface(display, m_surface);
|
||||
@ -113,6 +113,7 @@ void QEglFSWindow::resetSurface()
|
||||
EGLDisplay display = static_cast<QEglFSScreen *>(screen())->display();
|
||||
|
||||
m_window = QEglFSHooks::hooks()->createNativeWindow(QEglFSHooks::hooks()->screenSize(), m_format);
|
||||
has_window = true;
|
||||
m_surface = eglCreateWindowSurface(display, m_config, m_window, NULL);
|
||||
|
||||
if (m_surface == EGL_NO_SURFACE) {
|
||||
@ -138,9 +139,9 @@ void QEglFSWindow::destroy()
|
||||
m_surface = 0;
|
||||
}
|
||||
|
||||
if (m_window) {
|
||||
if (has_window) {
|
||||
QEglFSHooks::hooks()->destroyNativeWindow(m_window);
|
||||
m_window = 0;
|
||||
has_window = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,7 +161,7 @@ void QEglFSWindow::setWindowState(Qt::WindowState)
|
||||
|
||||
WId QEglFSWindow::winId() const
|
||||
{
|
||||
return m_winid;
|
||||
return WId(m_window);
|
||||
}
|
||||
|
||||
EGLSurface QEglFSWindow::surface() const
|
||||
|
@ -75,9 +75,9 @@ protected:
|
||||
EGLNativeWindowType m_window;
|
||||
|
||||
private:
|
||||
WId m_winid;
|
||||
EGLConfig m_config;
|
||||
QSurfaceFormat m_format;
|
||||
bool has_window;
|
||||
};
|
||||
QT_END_NAMESPACE
|
||||
#endif // QEGLFSWINDOW_H
|
||||
|
@ -80,9 +80,6 @@ void QMinimalEglBackingStore::flush(QWindow *window, const QRegion ®ion, cons
|
||||
|
||||
void QMinimalEglBackingStore::beginPaint(const QRegion &)
|
||||
{
|
||||
// needed to prevent QOpenGLContext::makeCurrent() from failing
|
||||
window()->setSurfaceType(QSurface::OpenGLSurface);
|
||||
|
||||
m_context->makeCurrent(window());
|
||||
m_device = new QOpenGLPaintDevice(window()->size());
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ QMinimalEglWindow::QMinimalEglWindow(QWindow *w)
|
||||
if (w->geometry() != screenGeometry) {
|
||||
QWindowSystemInterface::handleGeometryChange(w, screenGeometry);
|
||||
}
|
||||
w->setSurfaceType(QSurface::OpenGLSurface);
|
||||
}
|
||||
|
||||
void QMinimalEglWindow::setGeometry(const QRect &)
|
||||
|
@ -2,7 +2,9 @@ TEMPLATE = subdirs
|
||||
|
||||
android:!android-no-sdk: SUBDIRS += android
|
||||
|
||||
SUBDIRS += minimal offscreen
|
||||
SUBDIRS += minimal
|
||||
|
||||
!win32|contains(QT_CONFIG, freetype):SUBDIRS += offscreen
|
||||
|
||||
contains(QT_CONFIG, xcb) {
|
||||
SUBDIRS += xcb
|
||||
|
@ -593,6 +593,11 @@ QWindow *QWindowsContext::windowUnderMouse() const
|
||||
return d->m_mouseHandler.windowUnderMouse();
|
||||
}
|
||||
|
||||
void QWindowsContext::clearWindowUnderMouse()
|
||||
{
|
||||
d->m_mouseHandler.clearWindowUnderMouse();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Find a child window at a screen point.
|
||||
|
||||
@ -868,10 +873,15 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
||||
case QtWindows::CloseEvent:
|
||||
QWindowSystemInterface::handleCloseEvent(platformWindow->window());
|
||||
return true;
|
||||
case QtWindows::ThemeChanged: // ### fixme: Compress these events?
|
||||
case QtWindows::ThemeChanged: {
|
||||
// Switch from Aero to Classic changes margins.
|
||||
const Qt::WindowFlags flags = platformWindow->window()->flags();
|
||||
if ((flags & Qt::WindowType_Mask) != Qt::Desktop && !(flags & Qt::FramelessWindowHint))
|
||||
platformWindow->setFlag(QWindowsWindow::FrameDirty);
|
||||
if (QWindowsTheme *theme = QWindowsTheme::instance())
|
||||
theme->windowsThemeChanged(platformWindow->window());
|
||||
return true;
|
||||
}
|
||||
#ifndef Q_OS_WINCE
|
||||
case QtWindows::ActivateWindowEvent:
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
|
@ -168,6 +168,7 @@ public:
|
||||
unsigned cwex_flags) const;
|
||||
|
||||
QWindow *windowUnderMouse() const;
|
||||
void clearWindowUnderMouse();
|
||||
|
||||
inline bool windowsProc(HWND hwnd, UINT message,
|
||||
QtWindows::WindowsEventType et,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user