Merge 5.9 into 5.9.1
Change-Id: I229386dc3e0283dc7e5ad1c580ffcb335c67601c
This commit is contained in:
commit
dd23ed3dbd
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,11 +9,12 @@
|
||||
/config.tests/*/*/*
|
||||
!/config.tests/*/*/*[.]*
|
||||
/config.tests/.qmake.cache
|
||||
/config.tests/.qmake.stash
|
||||
/config.tests/arch/arch
|
||||
/config.tests/conftest-out
|
||||
/config.tests/conftest.cpp
|
||||
/config.opt
|
||||
/config.status
|
||||
/config.status*
|
||||
/config.summary
|
||||
/config.log
|
||||
/config.cache
|
||||
|
@ -1,2 +0,0 @@
|
||||
# clock_gettime() is implemented in librt on these systems
|
||||
linux-*|hpux-*|solaris-*:LIBS_PRIVATE *= -lrt
|
@ -1,3 +1,2 @@
|
||||
SOURCES = clock-gettime.cpp
|
||||
CONFIG -= qt dylib
|
||||
include(clock-gettime.pri)
|
||||
|
@ -1,3 +1,2 @@
|
||||
SOURCES = clock-monotonic.cpp
|
||||
CONFIG -= qt dylib
|
||||
include(../clock-gettime/clock-gettime.pri)
|
||||
|
52
config.tests/unix/stack-protector/stack-protector.cpp
Normal file
52
config.tests/unix/stack-protector/stack-protector.cpp
Normal file
@ -0,0 +1,52 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the config.tests 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 The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(__QNXNTO__)
|
||||
#include <sys/neutrino.h>
|
||||
|
||||
#if _NTO_VERSION < 700
|
||||
#error stack-protector not used (by default) before QNX 7.0.0.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
2
config.tests/unix/stack-protector/stack-protector.pro
Normal file
2
config.tests/unix/stack-protector/stack-protector.pro
Normal file
@ -0,0 +1,2 @@
|
||||
SOURCES = stack-protector.cpp
|
||||
QMAKE_CXXFLAGS += -fstack-protector-strong
|
@ -10,11 +10,11 @@
|
||||
"subconfigs": [
|
||||
"src/corelib",
|
||||
"src/network",
|
||||
"src/sql",
|
||||
"src/gui",
|
||||
"src/xml",
|
||||
"src/widgets",
|
||||
"src/printsupport"
|
||||
"src/printsupport",
|
||||
"src/plugins/sqldrivers"
|
||||
],
|
||||
|
||||
"commandline": {
|
||||
@ -425,8 +425,8 @@
|
||||
},
|
||||
"stack_protector": {
|
||||
"label": "stack protection",
|
||||
"type": "compilerSupportsFlag",
|
||||
"test": "-fstack-protector-strong"
|
||||
"type": "compile",
|
||||
"test": "unix/stack-protector"
|
||||
},
|
||||
"incredibuild_xge": {
|
||||
"label": "IncrediBuild",
|
||||
@ -930,7 +930,7 @@
|
||||
"stack-protector-strong": {
|
||||
"label": "stack protection",
|
||||
"condition": "config.qnx && tests.stack_protector",
|
||||
"output": [ "publicQtConfig" ]
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"system-zlib": {
|
||||
"label": "Using system zlib",
|
||||
|
@ -252,7 +252,7 @@ defineTest(qtConfTest_architecture) {
|
||||
error("Could not determine $$eval($${1}.label). See config.log for details.")
|
||||
|
||||
test = $$eval($${1}.test)
|
||||
test_out_dir = $$shadowed($$QMAKE_CONFIG_TESTS_DIR/$$test)
|
||||
test_out_dir = $$OUT_PWD/$$basename(QMAKE_CONFIG_TESTS_DIR)/$$test
|
||||
unix:exists($$test_out_dir/arch): \
|
||||
content = $$cat($$test_out_dir/arch, blob)
|
||||
else: win32:exists($$test_out_dir/arch.exe): \
|
||||
@ -1064,6 +1064,37 @@ defineReplace(qtConfOutputPostProcess_publicPro) {
|
||||
!isEmpty(config.input.qt_libinfix): output += "QT_LIBINFIX = $$config.input.qt_libinfix"
|
||||
!isEmpty(config.input.qt_namespace): output += "QT_NAMESPACE = $$config.input.qt_namespace"
|
||||
|
||||
!isEmpty(QMAKE_GCC_MAJOR_VERSION) {
|
||||
output += \
|
||||
"QT_GCC_MAJOR_VERSION = $$QMAKE_GCC_MAJOR_VERSION" \
|
||||
"QT_GCC_MINOR_VERSION = $$QMAKE_GCC_MINOR_VERSION" \
|
||||
"QT_GCC_PATCH_VERSION = $$QMAKE_GCC_PATCH_VERSION"
|
||||
}
|
||||
!isEmpty(QMAKE_CLANG_MAJOR_VERSION) {
|
||||
output += \
|
||||
"QT_CLANG_MAJOR_VERSION = $$QMAKE_CLANG_MAJOR_VERSION" \
|
||||
"QT_CLANG_MINOR_VERSION = $$QMAKE_CLANG_MINOR_VERSION" \
|
||||
"QT_CLANG_PATCH_VERSION = $$QMAKE_CLANG_PATCH_VERSION"
|
||||
}
|
||||
!isEmpty(QMAKE_APPLE_CLANG_MAJOR_VERSION) {
|
||||
output += \
|
||||
"QT_APPLE_CLANG_MAJOR_VERSION = $$QMAKE_APPLE_CLANG_MAJOR_VERSION" \
|
||||
"QT_APPLE_CLANG_MINOR_VERSION = $$QMAKE_APPLE_CLANG_MINOR_VERSION" \
|
||||
"QT_APPLE_CLANG_PATCH_VERSION = $$QMAKE_APPLE_CLANG_PATCH_VERSION"
|
||||
}
|
||||
!isEmpty(QMAKE_MSC_VER) {
|
||||
output += \
|
||||
"QT_MSVC_MAJOR_VERSION = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\1")" \
|
||||
"QT_MSVC_MINOR_VERSION = $$format_number($$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\2"))" \
|
||||
"QT_MSVC_PATCH_VERSION = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\3")"
|
||||
}
|
||||
!isEmpty(QMAKE_ICC_VER) {
|
||||
output += \
|
||||
"QT_ICC_MAJOR_VERSION = $$replace(QMAKE_ICC_VER, "(..)(..)", "\\1")" \
|
||||
"QT_ICC_MINOR_VERSION = $$format_number($$replace(QMAKE_ICC_VER, "(..)(..)", "\\2"))" \
|
||||
"QT_ICC_PATCH_VERSION = $$QMAKE_ICC_UPDATE_VER"
|
||||
}
|
||||
|
||||
output += "QT_EDITION = $$config.input.qt_edition"
|
||||
!contains(config.input.qt_edition, "(OpenSource|Preview)") {
|
||||
output += \
|
||||
|
@ -240,5 +240,4 @@ excludefiles += \
|
||||
"*_unix.cpp" \
|
||||
"*_udev.cpp" \
|
||||
"*_vxworks.cpp" \
|
||||
"*_darwin.cpp" \
|
||||
"*_x11.cpp"
|
||||
"*_darwin.cpp"
|
||||
|
@ -98,9 +98,9 @@ QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32
|
||||
|
||||
QMAKE_LIBS_QT_ENTRY = -lqtmain
|
||||
|
||||
QMAKE_IDL = midl
|
||||
QMAKE_IDL = midl /NOLOGO
|
||||
QMAKE_LIB = lib /NOLOGO
|
||||
QMAKE_RC = rc
|
||||
QMAKE_RC = rc /NOLOGO
|
||||
|
||||
VCPROJ_EXTENSION = .vcproj
|
||||
VCSOLUTION_EXTENSION = .sln
|
||||
|
@ -34,6 +34,8 @@ QMAKE_CFLAGS_SSE4_2 += -msse4.2
|
||||
QMAKE_CFLAGS_AVX += -mavx
|
||||
QMAKE_CFLAGS_AVX2 += -mavx2
|
||||
|
||||
QMAKE_CFLAGS_STACK_PROTECTOR_STRONG = -fstack-protector-strong
|
||||
|
||||
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -lang-c++
|
||||
QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
|
||||
QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
|
||||
|
@ -1,3 +1,6 @@
|
||||
android_install:contains(INSTALLS, target):!isEmpty(target.path): \
|
||||
CONFIG -= android_install
|
||||
|
||||
contains(TEMPLATE, ".*app") {
|
||||
!android_app {
|
||||
!contains(TARGET, ".so"): TARGET = lib$${TARGET}.so
|
||||
@ -8,7 +11,7 @@ contains(TEMPLATE, ".*app") {
|
||||
INSTALLS *= target
|
||||
}
|
||||
}
|
||||
} else: contains(TEMPLATE, "lib"):!QTDIR_build:android_install {
|
||||
} else: contains(TEMPLATE, "lib"):!static:android_install {
|
||||
target.path = /libs/$$ANDROID_TARGET_ARCH/
|
||||
INSTALLS *= target
|
||||
}
|
||||
|
@ -1,2 +1,3 @@
|
||||
load(resolve_config)
|
||||
load(android)
|
||||
load(resolve_target)
|
||||
|
@ -13,17 +13,17 @@ QMAKE_APPLE_CC = __APPLE_CC__
|
||||
#endif
|
||||
#ifdef __clang__
|
||||
#ifdef __APPLE_CC__
|
||||
QT_APPLE_CLANG_MAJOR_VERSION = __clang_major__
|
||||
QT_APPLE_CLANG_MINOR_VERSION = __clang_minor__
|
||||
QT_APPLE_CLANG_PATCH_VERSION = __clang_patchlevel__
|
||||
QMAKE_APPLE_CLANG_MAJOR_VERSION = __clang_major__
|
||||
QMAKE_APPLE_CLANG_MINOR_VERSION = __clang_minor__
|
||||
QMAKE_APPLE_CLANG_PATCH_VERSION = __clang_patchlevel__
|
||||
#else
|
||||
QT_CLANG_MAJOR_VERSION = __clang_major__
|
||||
QT_CLANG_MINOR_VERSION = __clang_minor__
|
||||
QT_CLANG_PATCH_VERSION = __clang_patchlevel__
|
||||
QMAKE_CLANG_MAJOR_VERSION = __clang_major__
|
||||
QMAKE_CLANG_MINOR_VERSION = __clang_minor__
|
||||
QMAKE_CLANG_PATCH_VERSION = __clang_patchlevel__
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __GNUC__
|
||||
QT_GCC_MAJOR_VERSION = __GNUC__
|
||||
QT_GCC_MINOR_VERSION = __GNUC_MINOR__
|
||||
QT_GCC_PATCH_VERSION = __GNUC_PATCHLEVEL__
|
||||
QMAKE_GCC_MAJOR_VERSION = __GNUC__
|
||||
QMAKE_GCC_MINOR_VERSION = __GNUC_MINOR__
|
||||
QMAKE_GCC_PATCH_VERSION = __GNUC_PATCHLEVEL__
|
||||
#endif
|
||||
|
@ -71,6 +71,11 @@ debug {
|
||||
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
|
||||
}
|
||||
|
||||
stack_protector_strong {
|
||||
QMAKE_CFLAGS += $$QMAKE_CFLAGS_STACK_PROTECTOR_STRONG
|
||||
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_STACK_PROTECTOR_STRONG
|
||||
}
|
||||
|
||||
# disable special linker flags for host builds (no proper test for host support yet)
|
||||
!host_build|!cross_compile {
|
||||
use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
|
||||
|
@ -162,8 +162,12 @@ macx-xcode {
|
||||
else: \
|
||||
use_flag = -include
|
||||
|
||||
# Only use Xarch with multi-arch, as the option confuses ccache
|
||||
count(VALID_ARCHS, 1, greaterThan): \
|
||||
QMAKE_CFLAGS_USE_PRECOMPILE += \
|
||||
-Xarch_$${arch}
|
||||
|
||||
QMAKE_CFLAGS_USE_PRECOMPILE += \
|
||||
-Xarch_$${arch} \
|
||||
$${use_flag}${QMAKE_PCH_OUTPUT_$${arch}}
|
||||
}
|
||||
icc_pch_style {
|
||||
|
@ -31,10 +31,10 @@ if(gcc|intel_icl|msvc):!rim_qcc:!uikit:!no_moc_predefs:if(!macos|count(QMAKE_APP
|
||||
moc_predefs.name = "Generate moc_predefs.h"
|
||||
moc_predefs.CONFIG = no_link
|
||||
gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
||||
else:intel_icl: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -QdM -P -Za -Fi${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
||||
else:intel_icl: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -QdM -P -Fi${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
||||
else:msvc {
|
||||
moc_predefs.commands += $$QMAKE_CXX -Bx$$shell_quote($$shell_path($$QMAKE_QMAKE)) $$QMAKE_CXXFLAGS \
|
||||
-E -Za ${QMAKE_FILE_IN} 2>NUL >${QMAKE_FILE_OUT}
|
||||
-E ${QMAKE_FILE_IN} 2>NUL >${QMAKE_FILE_OUT}
|
||||
} else: error("Oops, I messed up")
|
||||
moc_predefs.output = $$MOC_DIR/moc_predefs.h
|
||||
moc_predefs.input = MOC_PREDEF_FILE
|
||||
|
@ -17,6 +17,7 @@ DEFINES *= QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
|
||||
qtConfig(c++11): CONFIG += c++11 strict_c++
|
||||
qtConfig(c++14): CONFIG += c++14
|
||||
qtConfig(c++1z): CONFIG += c++1z
|
||||
qtConfig(stack-protector-strong): CONFIG += stack_protector_strong
|
||||
contains(TEMPLATE, .*lib) {
|
||||
# module and plugins
|
||||
if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols
|
||||
|
@ -326,7 +326,7 @@ defineTest(qtConfParseCommandLine) {
|
||||
}
|
||||
|
||||
defineReplace(qtConfToolchainSupportsFlag) {
|
||||
test_out_dir = $$shadowed($$QMAKE_CONFIG_TESTS_DIR)
|
||||
test_out_dir = $$OUT_PWD/$$basename(QMAKE_CONFIG_TESTS_DIR)
|
||||
test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
|
||||
|
||||
conftest = "int main() { return 0; }"
|
||||
@ -849,7 +849,7 @@ defineTest(qtConfTest_compile) {
|
||||
isEmpty(host): host = false
|
||||
|
||||
test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$test
|
||||
test_base_out_dir = $$shadowed($$QMAKE_CONFIG_TESTS_DIR)
|
||||
test_base_out_dir = $$OUT_PWD/$$basename(QMAKE_CONFIG_TESTS_DIR)
|
||||
test_out_dir = $$test_base_out_dir/$$test
|
||||
!isEmpty($${1}.pro): \
|
||||
test_dir = $$test_dir/$$eval($${1}.pro)
|
||||
|
@ -47,7 +47,9 @@ isEmpty($${target_prefix}.INCDIRS) {
|
||||
# gcc is fine with just preprocessing
|
||||
cxx_flags += -E -v
|
||||
|
||||
output = $$system("$$cmd_prefix $$QMAKE_CXX $$qtMakeExpand($$cxx_flags) -xc++ - 2>&1 $$cmd_suffix", lines)
|
||||
output = $$system("$$cmd_prefix $$QMAKE_CXX $$qtMakeExpand($$cxx_flags) -xc++ - 2>&1 $$cmd_suffix", lines, ec)
|
||||
!equals(ec, 0): \
|
||||
error("Cannot run compiler '$$QMAKE_CXX'. Maybe you forgot to setup the environment?")
|
||||
add_includes = false
|
||||
add_libraries = false
|
||||
for (line, output) {
|
||||
@ -102,13 +104,19 @@ isEmpty($${target_prefix}.INCDIRS) {
|
||||
#
|
||||
|
||||
defineReplace(qtVariablesFromMSVC) {
|
||||
return($$system("$$1 -nologo -E $$2 $$system_quote($$PWD/data/macros.cpp) <NUL 2>NUL", lines))
|
||||
ret = $$system("$$1 -nologo -E $$2 $$system_quote($$PWD/data/macros.cpp) <NUL 2>NUL", lines, ec)
|
||||
!equals(ec, 0): \
|
||||
error("Cannot run compiler '$$1'. Maybe you forgot to setup the environment?")
|
||||
return($$ret)
|
||||
}
|
||||
|
||||
defineReplace(qtVariablesFromGCC) {
|
||||
null_device = /dev/null
|
||||
equals(QMAKE_HOST.os, Windows): null_device = NUL
|
||||
return($$system("$$1 -E $$system_quote($$PWD/data/macros.cpp) <$$null_device 2>$$null_device", lines))
|
||||
ret = $$system("$$1 -E $$system_quote($$PWD/data/macros.cpp) <$$null_device 2>$$null_device", lines, ec)
|
||||
!equals(ec, 0): \
|
||||
error("Cannot run compiler '$$1'. Maybe you forgot to setup the environment?")
|
||||
return($$ret)
|
||||
}
|
||||
|
||||
isEmpty($${target_prefix}.COMPILER_MACROS) {
|
||||
@ -155,35 +163,27 @@ unset(target_prefix)
|
||||
# Populate QMAKE_COMPILER_DEFINES and some compatibility variables.
|
||||
# The $$format_number() calls strip leading zeros to avoid misinterpretation as octal.
|
||||
QMAKE_COMPILER_DEFINES += __cplusplus=$$QT_COMPILER_STDCXX
|
||||
!isEmpty(QMAKE_MSC_VER) {
|
||||
!isEmpty(QMAKE_MSC_VER): \
|
||||
QMAKE_COMPILER_DEFINES += _MSC_VER=$$QMAKE_MSC_VER _MSC_FULL_VER=$$QMAKE_MSC_FULL_VER
|
||||
QT_MSVC_MAJOR_VERSION = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\1")
|
||||
QT_MSVC_MINOR_VERSION = $$format_number($$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\2"))
|
||||
QT_MSVC_PATCH_VERSION = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\3"))
|
||||
}
|
||||
!isEmpty(QMAKE_ICC_VER) {
|
||||
!isEmpty(QMAKE_ICC_VER): \
|
||||
QMAKE_COMPILER_DEFINES += __INTEL_COMPILER=$$QMAKE_ICC_VER __INTEL_COMPILER_UPDATE=$$QMAKE_ICC_UPDATE_VER
|
||||
QT_ICC_MAJOR_VERSION = $$replace(QMAKE_ICC_VER, "(..)(..)", "\\1")
|
||||
QT_ICC_MINOR_VERSION = $$format_number($$replace(QMAKE_ICC_VER, "(..)(..)", "\\2"))
|
||||
QT_ICC_PATCH_VERSION = $$QMAKE_ICC_UPDATE_VER
|
||||
}
|
||||
!isEmpty(QMAKE_APPLE_CC): \
|
||||
QMAKE_COMPILER_DEFINES += __APPLE_CC__=$$QMAKE_APPLE_CC
|
||||
!isEmpty(QT_APPLE_CLANG_MAJOR_VERSION): \
|
||||
QMAKE_COMPILER_DEFINES += __clang__ \
|
||||
__clang_major__=$$QT_APPLE_CLANG_MAJOR_VERSION \
|
||||
__clang_minor__=$$QT_APPLE_CLANG_MINOR_VERSION \
|
||||
__clang_patchlevel__=$$QT_APPLE_CLANG_PATCH_VERSION
|
||||
__clang_major__=$$QMAKE_APPLE_CLANG_MAJOR_VERSION \
|
||||
__clang_minor__=$$QMAKE_APPLE_CLANG_MINOR_VERSION \
|
||||
__clang_patchlevel__=$$QMAKE_APPLE_CLANG_PATCH_VERSION
|
||||
!isEmpty(QT_CLANG_MAJOR_VERSION): \
|
||||
QMAKE_COMPILER_DEFINES += __clang__ \
|
||||
__clang_major__=$$QT_CLANG_MAJOR_VERSION \
|
||||
__clang_minor__=$$QT_CLANG_MINOR_VERSION \
|
||||
__clang_patchlevel__=$$QT_CLANG_PATCH_VERSION
|
||||
__clang_major__=$$QMAKE_CLANG_MAJOR_VERSION \
|
||||
__clang_minor__=$$QMAKE_CLANG_MINOR_VERSION \
|
||||
__clang_patchlevel__=$$QMAKE_CLANG_PATCH_VERSION
|
||||
!isEmpty(QT_GCC_MAJOR_VERSION): \
|
||||
QMAKE_COMPILER_DEFINES += \
|
||||
__GNUC__=$$QT_GCC_MAJOR_VERSION \
|
||||
__GNUC_MINOR__=$$QT_GCC_MINOR_VERSION \
|
||||
__GNUC_PATCHLEVEL__=$$QT_GCC_PATCH_VERSION
|
||||
__GNUC__=$$QMAKE_GCC_MAJOR_VERSION \
|
||||
__GNUC_MINOR__=$$QMAKE_GCC_MINOR_VERSION \
|
||||
__GNUC_PATCHLEVEL__=$$QMAKE_GCC_PATCH_VERSION
|
||||
|
||||
QMAKE_CFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT
|
||||
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT
|
||||
|
@ -7,11 +7,3 @@ DEFINES += _FORTIFY_SOURCE=2
|
||||
QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
include(../common/qcc-base-qnx-aarch64le.conf)
|
||||
|
||||
qtConfig(stack-protector-strong) {
|
||||
QMAKE_CFLAGS += -fstack-protector-strong
|
||||
QMAKE_CXXFLAGS += -fstack-protector-strong
|
||||
} else {
|
||||
QMAKE_CFLAGS += -fstack-protector -fstack-protector-all
|
||||
QMAKE_CXXFLAGS += -fstack-protector -fstack-protector-all
|
||||
}
|
||||
|
@ -5,11 +5,3 @@
|
||||
QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
include(../common/qcc-base-qnx-x86-64.conf)
|
||||
|
||||
qtConfig(stack-protector-strong) {
|
||||
QMAKE_CFLAGS += -fstack-protector-strong
|
||||
QMAKE_CXXFLAGS += -fstack-protector-strong
|
||||
} else {
|
||||
QMAKE_CFLAGS += -fstack-protector -fstack-protector-all
|
||||
QMAKE_CXXFLAGS += -fstack-protector -fstack-protector-all
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ MakefileGenerator::initOutPaths()
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// We don't want to add a separator for DLLDESTDIR on Windows (###why?)
|
||||
if(!(dirs[x] == "DLLDESTDIR"))
|
||||
if (dkey != "DLLDESTDIR")
|
||||
#endif
|
||||
{
|
||||
if(!pathRef.endsWith(Option::dir_sep))
|
||||
|
@ -36,6 +36,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#define NULL_DEVICE "NUL"
|
||||
#else
|
||||
#define NULL_DEVICE "/dev/null"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
MingwMakefileGenerator::MingwMakefileGenerator() : Win32MakefileGenerator()
|
||||
@ -318,6 +324,7 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
||||
t << "\n\t" <<var("QMAKE_PRE_LINK");
|
||||
if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
|
||||
t << "\n\t-$(DEL_FILE) $(DESTDIR_TARGET) 2>" NULL_DEVICE;
|
||||
if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) {
|
||||
t << "\n\t$(LIB) $(DESTDIR_TARGET) " << objectsLinkLine << " " ;
|
||||
} else {
|
||||
|
@ -42,7 +42,6 @@ const char _CLCompile[] = "ClCompile";
|
||||
const char _ItemGroup[] = "ItemGroup";
|
||||
const char _Link[] = "Link";
|
||||
const char _Lib[] = "Lib";
|
||||
const char _ManifestTool[] = "ManifestTool";
|
||||
const char _Midl[] = "Midl";
|
||||
const char _ResourceCompile[] = "ResourceCompile";
|
||||
|
||||
@ -55,7 +54,6 @@ const char _AdditionalManifestDependencies[] = "AdditionalManifestDependencie
|
||||
const char _AdditionalOptions[] = "AdditionalOptions";
|
||||
const char _AdditionalUsingDirectories[] = "AdditionalUsingDirectories";
|
||||
const char _AllowIsolation[] = "AllowIsolation";
|
||||
const char _AlwaysAppend[] = "AlwaysAppend";
|
||||
const char _ApplicationConfigurationMode[] = "ApplicationConfigurationMode";
|
||||
const char _AssemblerListingLocation[] = "AssemblerListingLocation";
|
||||
const char _AssemblerOutput[] = "AssemblerOutput";
|
||||
@ -82,7 +80,6 @@ const char _CompileAsWinRT[] = "CompileAsWinRT";
|
||||
const char _ConfigurationType[] = "ConfigurationType";
|
||||
const char _CPreprocessOptions[] = "CPreprocessOptions";
|
||||
const char _CreateHotpatchableImage[] = "CreateHotpatchableImage";
|
||||
const char _CreateHotPatchableImage[] = "CreateHotPatchableImage";
|
||||
const char _Culture[] = "Culture";
|
||||
const char _DataExecutionPrevention[] = "DataExecutionPrevention";
|
||||
const char _DebugInformationFormat[] = "DebugInformationFormat";
|
||||
@ -92,7 +89,6 @@ const char _DelaySign[] = "DelaySign";
|
||||
const char _DeleteExtensionsOnClean[] = "DeleteExtensionsOnClean";
|
||||
const char _DisableLanguageExtensions[] = "DisableLanguageExtensions";
|
||||
const char _DisableSpecificWarnings[] = "DisableSpecificWarnings";
|
||||
const char _DisplayLibrary[] = "DisplayLibrary";
|
||||
const char _DLLDataFileName[] = "DLLDataFileName";
|
||||
const char _EmbedManagedResourceFile[] = "EmbedManagedResourceFile";
|
||||
const char _EmbedManifest[] = "EmbedManifest";
|
||||
@ -166,8 +162,6 @@ const char _ModuleDefinitionFile[] = "ModuleDefinitionFile";
|
||||
const char _MultiProcessorCompilation[] = "MultiProcessorCompilation";
|
||||
const char _Name[] = "Name";
|
||||
const char _NoEntryPoint[] = "NoEntryPoint";
|
||||
const char _NullTerminateStrings[] = "NullTerminateStrings";
|
||||
const char _ObjectFiles[] = "ObjectFiles";
|
||||
const char _ObjectFileName[] = "ObjectFileName";
|
||||
const char _OmitDefaultLibName[] = "OmitDefaultLibName";
|
||||
const char _OmitFramePointers[] = "OmitFramePointers";
|
||||
@ -195,7 +189,6 @@ const char _ProxyFileName[] = "ProxyFileName";
|
||||
const char _RandomizedBaseAddress[] = "RandomizedBaseAddress";
|
||||
const char _RedirectOutputAndErrors[] = "RedirectOutputAndErrors";
|
||||
const char _RegisterOutput[] = "RegisterOutput";
|
||||
const char _RemoveObjects[] = "RemoveObjects";
|
||||
const char _ResourceOutputFileName[] = "ResourceOutputFileName";
|
||||
const char _RuntimeLibrary[] = "RuntimeLibrary";
|
||||
const char _RuntimeTypeInfo[] = "RuntimeTypeInfo";
|
||||
@ -211,7 +204,6 @@ const char _StringPooling[] = "StringPooling";
|
||||
const char _StripPrivateSymbols[] = "StripPrivateSymbols";
|
||||
const char _StructMemberAlignment[] = "StructMemberAlignment";
|
||||
const char _SubSystem[] = "SubSystem";
|
||||
const char _SupportNobindOfDelayLoadedDLL[] = "SupportNobindOfDelayLoadedDLL";
|
||||
const char _SupportUnloadOfDelayLoadedDLL[] = "SupportUnloadOfDelayLoadedDLL";
|
||||
const char _SuppressCompilerWarnings[] = "SuppressCompilerWarnings";
|
||||
const char _SuppressStartupBanner[] = "SuppressStartupBanner";
|
||||
@ -220,8 +212,6 @@ const char _SwapRunFromNet[] = "SwapRunFromNet";
|
||||
const char _TargetEnvironment[] = "TargetEnvironment";
|
||||
const char _TargetMachine[] = "TargetMachine";
|
||||
const char _TerminalServerAware[] = "TerminalServerAware";
|
||||
const char _TrackerLogDirectory[] = "TrackerLogDirectory";
|
||||
const char _TreatLibWarningAsErrors[] = "TreatLibWarningAsErrors";
|
||||
const char _TreatLinkerWarningAsErrors[] = "TreatLinkerWarningAsErrors";
|
||||
const char _TreatSpecificWarningsAsErrors[] = "TreatSpecificWarningsAsErrors";
|
||||
const char _TreatWarningAsError[] = "TreatWarningAsError";
|
||||
@ -240,8 +230,6 @@ const char _UseOfATL[] = "UseOfATL";
|
||||
const char _UseOfMfc[] = "UseOfMfc";
|
||||
const char _UseUnicodeForAssemblerListing[] = "UseUnicodeForAssemblerListing";
|
||||
const char _ValidateAllParameters[] = "ValidateAllParameters";
|
||||
const char _VCCustomBuildTool[] = "VCCustomBuildTool";
|
||||
const char _Verbose[] = "Verbose";
|
||||
const char _Version[] = "Version";
|
||||
const char _WarnAsError[] = "WarnAsError";
|
||||
const char _WarningLevel[] = "WarningLevel";
|
||||
@ -1450,7 +1438,6 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
|
||||
<< attrTagX(_AdditionalIncludeDirectories, tool.AdditionalIncludeDirectories, ";")
|
||||
<< attrTagX(_AdditionalOptions, tool.AdditionalOptions, " ")
|
||||
<< attrTagX(_AdditionalUsingDirectories, tool.AdditionalUsingDirectories, ";")
|
||||
//unused << attrTagS(_AlwaysAppend, tool.AlwaysAppend)
|
||||
<< attrTagS(_AssemblerListingLocation, tool.AssemblerListingLocation)
|
||||
<< attrTagS(_AssemblerOutput, toString(tool.AssemblerOutput))
|
||||
<< attrTagS(_BasicRuntimeChecks, toString(tool.BasicRuntimeChecks))
|
||||
@ -1486,7 +1473,6 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
|
||||
<< attrTagT(_MinimalRebuild, tool.MinimalRebuild)
|
||||
<< attrTagT(_MultiProcessorCompilation, tool.MultiProcessorCompilation)
|
||||
<< attrTagS(_ObjectFileName, tool.ObjectFile)
|
||||
//unused << attrTagX(_ObjectFiles, tool.ObjectFiles, ";")
|
||||
<< attrTagT(_OmitDefaultLibName, tool.OmitDefaultLibName)
|
||||
<< attrTagT(_OmitFramePointers, tool.OmitFramePointers)
|
||||
<< attrTagT(_OpenMPSupport, tool.OpenMP)
|
||||
@ -1538,7 +1524,6 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCLinkerTool &tool)
|
||||
<< attrTagS(_CLRSupportLastError, tool.CLRSupportLastError)
|
||||
<< attrTagS(_CLRThreadAttribute, tool.CLRThreadAttribute)
|
||||
<< attrTagT(_CLRUnmanagedCodeCheck, tool.CLRUnmanagedCodeCheck)
|
||||
//unused << attrTagS(_CreateHotPatchableImage, tool.CreateHotPatchableImage)
|
||||
<< attrTagT(_DataExecutionPrevention, tool.DataExecutionPrevention)
|
||||
<< attrTagX(_DelayLoadDLLs, tool.DelayLoadDLLs, ";")
|
||||
<< attrTagT(_DelaySign, tool.DelaySign)
|
||||
@ -1690,22 +1675,13 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCLibrarianTool &tool)
|
||||
<< attrTagX(_AdditionalDependencies, tool.AdditionalDependencies, ";")
|
||||
<< attrTagX(_AdditionalLibraryDirectories, tool.AdditionalLibraryDirectories, ";")
|
||||
<< attrTagX(_AdditionalOptions, tool.AdditionalOptions, " ")
|
||||
//unused << attrTagS(_DisplayLibrary, tool.DisplayLibrary)
|
||||
//unused << attrTagS(_ErrorReporting, tool.ErrorReporting)
|
||||
<< attrTagX(_ExportNamedFunctions, tool.ExportNamedFunctions, ";")
|
||||
<< attrTagX(_ForceSymbolReferences, tool.ForceSymbolReferences, ";")
|
||||
<< attrTagT(_IgnoreAllDefaultLibraries, tool.IgnoreAllDefaultLibraries)
|
||||
<< attrTagX(_IgnoreSpecificDefaultLibraries, tool.IgnoreDefaultLibraryNames, ";")
|
||||
//unused << attrTagT(_LinkTimeCodeGeneration, tool.LinkTimeCodeGeneration)
|
||||
<< attrTagS(_ModuleDefinitionFile, tool.ModuleDefinitionFile)
|
||||
//unused << attrTagS(_Name, tool.Name)
|
||||
<< attrTagS(_OutputFile, tool.OutputFile)
|
||||
//unused << attrTagX(_RemoveObjects, tool.RemoveObjects, ";")
|
||||
//unused << attrTagS(_SubSystem, tool.SubSystem)
|
||||
<< attrTagT(_SuppressStartupBanner, tool.SuppressStartupBanner)
|
||||
//unused << attrTagS(_TargetMachine, tool.TargetMachine)
|
||||
//unused << attrTagT(_TreatLibWarningAsErrors, tool.TreatLibWarningAsErrors)
|
||||
//unused << attrTagT(_Verbose, tool.Verbose)
|
||||
<< closetag(_Lib);
|
||||
}
|
||||
|
||||
@ -1717,13 +1693,10 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCResourceCompilerTool &tool)
|
||||
<< attrTagX(_AdditionalOptions, tool.AdditionalOptions, " ")
|
||||
<< attrTagS(_Culture, toString(tool.Culture))
|
||||
<< attrTagT(_IgnoreStandardIncludePath, tool.IgnoreStandardIncludePath)
|
||||
//unused << attrTagT(_NullTerminateStrings, tool.NullTerminateStrings)
|
||||
<< attrTagX(_PreprocessorDefinitions, tool.PreprocessorDefinitions, ";")
|
||||
<< attrTagS(_ResourceOutputFileName, tool.ResourceOutputFileName)
|
||||
<< attrTagT(_ShowProgress, toTriState(tool.ShowProgress))
|
||||
<< attrTagT(_SuppressStartupBanner, tool.SuppressStartupBanner)
|
||||
//unused << attrTagS(_TrackerLogDirectory, tool.TrackerLogDirectory)
|
||||
//unused << attrTagS(_UndefinePreprocessorDefinitions, tool.UndefinePreprocessorDefinitions)
|
||||
<< closetag(_ResourceCompile);
|
||||
}
|
||||
|
||||
|
@ -47,15 +47,15 @@ static DotNET vsVersionFromString(const char *versionString)
|
||||
DotNET version;
|
||||
};
|
||||
static VSVersionMapping mapping[] = {
|
||||
"7.0", NET2002,
|
||||
"7.1", NET2003,
|
||||
"8.0", NET2005,
|
||||
"9.0", NET2008,
|
||||
"10.0", NET2010,
|
||||
"11.0", NET2012,
|
||||
"12.0", NET2013,
|
||||
"14.0", NET2015,
|
||||
"15.0", NET2017
|
||||
{ "7.0", NET2002 },
|
||||
{ "7.1", NET2003 },
|
||||
{ "8.0", NET2005 },
|
||||
{ "9.0", NET2008 },
|
||||
{ "10.0", NET2010 },
|
||||
{ "11.0", NET2012 },
|
||||
{ "12.0", NET2013 },
|
||||
{ "14.0", NET2015 },
|
||||
{ "15.0", NET2017 }
|
||||
};
|
||||
DotNET result = NETUnknown;
|
||||
for (const auto entry : mapping) {
|
||||
|
@ -111,8 +111,8 @@ const char _slnExtSections[] = "\n\tGlobalSection(ExtensibilityGlobals) = pos
|
||||
VcprojGenerator::VcprojGenerator()
|
||||
: Win32MakefileGenerator(),
|
||||
is64Bit(false),
|
||||
projectWriter(0),
|
||||
customBuildToolFilterFileSuffix(QStringLiteral(".cbt"))
|
||||
customBuildToolFilterFileSuffix(QStringLiteral(".cbt")),
|
||||
projectWriter(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -652,7 +652,7 @@ const Type &GetTypeInfo(GLenum type)
|
||||
}
|
||||
}
|
||||
|
||||
const InternalFormat &GetInternalFormatInfo(GLenum internalFormat)
|
||||
const InternalFormat GetInternalFormatInfo(GLenum internalFormat)
|
||||
{
|
||||
const InternalFormatInfoMap &formatMap = GetInternalFormatMap();
|
||||
InternalFormatInfoMap::const_iterator iter = formatMap.find(internalFormat);
|
||||
|
@ -79,7 +79,7 @@ struct InternalFormat
|
||||
GLint skipRows,
|
||||
GLint skipPixels) const;
|
||||
};
|
||||
const InternalFormat &GetInternalFormatInfo(GLenum internalFormat);
|
||||
const InternalFormat GetInternalFormatInfo(GLenum internalFormat);
|
||||
|
||||
GLenum GetSizedInternalFormat(GLenum internalFormat, GLenum type);
|
||||
|
||||
|
@ -775,20 +775,20 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
|
||||
// with the values of the source buffer's [channel sizes]. Table 3.17 is used if the
|
||||
// FRAMEBUFFER_ATTACHMENT_ENCODING is LINEAR and table 3.18 is used if the FRAMEBUFFER_ATTACHMENT_ENCODING
|
||||
// is SRGB.
|
||||
const InternalFormat *sourceEffectiveFormat = NULL;
|
||||
InternalFormat sourceEffectiveFormat;
|
||||
if (readBufferHandle != 0)
|
||||
{
|
||||
// Not the default framebuffer, therefore the read buffer must be a user-created texture or renderbuffer
|
||||
if (framebufferInternalFormatInfo.pixelBytes > 0)
|
||||
{
|
||||
sourceEffectiveFormat = &framebufferInternalFormatInfo;
|
||||
sourceEffectiveFormat = framebufferInternalFormatInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Renderbuffers cannot be created with an unsized internal format, so this must be an unsized-format
|
||||
// texture. We can use the same table we use when creating textures to get its effective sized format.
|
||||
GLenum sizedInternalFormat = GetSizedInternalFormat(framebufferInternalFormatInfo.format, framebufferInternalFormatInfo.type);
|
||||
sourceEffectiveFormat = &GetInternalFormatInfo(sizedInternalFormat);
|
||||
sourceEffectiveFormat = GetInternalFormatInfo(sizedInternalFormat);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -800,7 +800,7 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
|
||||
GLenum effectiveFormat;
|
||||
if (GetEffectiveInternalFormat(framebufferInternalFormatInfo, textureInternalFormatInfo, &effectiveFormat))
|
||||
{
|
||||
sourceEffectiveFormat = &GetInternalFormatInfo(effectiveFormat);
|
||||
sourceEffectiveFormat = GetInternalFormatInfo(effectiveFormat);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -816,7 +816,7 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
|
||||
(framebufferInternalFormatInfo.blueBits >= 1 && framebufferInternalFormatInfo.blueBits <= 8) &&
|
||||
(framebufferInternalFormatInfo.alphaBits >= 1 && framebufferInternalFormatInfo.alphaBits <= 8))
|
||||
{
|
||||
sourceEffectiveFormat = &GetInternalFormatInfo(GL_SRGB8_ALPHA8);
|
||||
sourceEffectiveFormat = GetInternalFormatInfo(GL_SRGB8_ALPHA8);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -834,10 +834,10 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
|
||||
{
|
||||
// Section 3.8.5 of the GLES 3.0.3 spec, pg 139, requires that, if the destination format is sized,
|
||||
// component sizes of the source and destination formats must exactly match
|
||||
if (textureInternalFormatInfo.redBits != sourceEffectiveFormat->redBits ||
|
||||
textureInternalFormatInfo.greenBits != sourceEffectiveFormat->greenBits ||
|
||||
textureInternalFormatInfo.blueBits != sourceEffectiveFormat->blueBits ||
|
||||
textureInternalFormatInfo.alphaBits != sourceEffectiveFormat->alphaBits)
|
||||
if (textureInternalFormatInfo.redBits != sourceEffectiveFormat.redBits ||
|
||||
textureInternalFormatInfo.greenBits != sourceEffectiveFormat.greenBits ||
|
||||
textureInternalFormatInfo.blueBits != sourceEffectiveFormat.blueBits ||
|
||||
textureInternalFormatInfo.alphaBits != sourceEffectiveFormat.alphaBits)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -107,13 +107,14 @@ public class CursorHandle implements ViewTreeObserver.OnPreDrawListener
|
||||
private int m_id;
|
||||
private int m_attr;
|
||||
private Activity m_activity;
|
||||
private int m_posX;
|
||||
private int m_posY;
|
||||
private int m_posX = 0;
|
||||
private int m_posY = 0;
|
||||
private int m_lastX;
|
||||
private int m_lastY;
|
||||
int tolerance;
|
||||
private boolean m_rtl;
|
||||
|
||||
public CursorHandle(Activity activity, View layout, int id, int attr) {
|
||||
public CursorHandle(Activity activity, View layout, int id, int attr, boolean rtl) {
|
||||
m_activity = activity;
|
||||
m_id = id;
|
||||
m_attr = attr;
|
||||
@ -122,6 +123,7 @@ public class CursorHandle implements ViewTreeObserver.OnPreDrawListener
|
||||
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
tolerance = Math.round(2 * metrics.density);
|
||||
m_lastX = m_lastY = -1 - tolerance;
|
||||
m_rtl = rtl;
|
||||
}
|
||||
|
||||
private boolean initOverlay(){
|
||||
@ -160,9 +162,9 @@ public class CursorHandle implements ViewTreeObserver.OnPreDrawListener
|
||||
|
||||
if (m_id == QtNative.IdCursorHandle) {
|
||||
x2 -= m_cursorView.getWidth() / 2 ;
|
||||
} else if (m_id == QtNative.IdLeftHandle) {
|
||||
} else if ((m_id == QtNative.IdLeftHandle && !m_rtl) || (m_id == QtNative.IdRightHandle && m_rtl)) {
|
||||
x2 -= m_cursorView.getWidth() * 3 / 4;
|
||||
} else if (m_id == QtNative.IdRightHandle) {
|
||||
} else {
|
||||
x2 -= m_cursorView.getWidth() / 4;
|
||||
}
|
||||
|
||||
|
@ -490,7 +490,7 @@ public class QtActivityDelegate
|
||||
be adjusted.
|
||||
mode is one of QAndroidInputContext::CursorHandleShowMode
|
||||
*/
|
||||
public void updateHandles(int mode, int x1, int y1, int x2, int y2)
|
||||
public void updateHandles(int mode, int x1, int y1, int x2, int y2, boolean rtl)
|
||||
{
|
||||
if (mode == CursorHandleNotShown) {
|
||||
if (m_cursorHandle != null)
|
||||
@ -498,6 +498,8 @@ public class QtActivityDelegate
|
||||
if (m_rightSelectionHandle != null) {
|
||||
m_rightSelectionHandle.hide();
|
||||
m_leftSelectionHandle.hide();
|
||||
m_rightSelectionHandle = null;
|
||||
m_leftSelectionHandle = null;
|
||||
}
|
||||
if (m_editMenu != null)
|
||||
m_editMenu.hide();
|
||||
@ -506,19 +508,25 @@ public class QtActivityDelegate
|
||||
} else if (mode == CursorHandleShowNormal || mode == CursorHandleShowPopup) {
|
||||
if (m_cursorHandle == null) {
|
||||
m_cursorHandle = new CursorHandle(m_activity, m_layout, QtNative.IdCursorHandle,
|
||||
android.R.attr.textSelectHandle);
|
||||
android.R.attr.textSelectHandle, false);
|
||||
}
|
||||
m_cursorHandle.setPosition(x1, y1);
|
||||
if (m_rightSelectionHandle != null) {
|
||||
m_rightSelectionHandle.hide();
|
||||
m_leftSelectionHandle.hide();
|
||||
m_rightSelectionHandle = null;
|
||||
m_leftSelectionHandle = null;
|
||||
}
|
||||
} else if (mode == CursorHandleShowSelection) {
|
||||
if (m_rightSelectionHandle == null) {
|
||||
m_leftSelectionHandle = new CursorHandle(m_activity, m_layout, QtNative.IdLeftHandle,
|
||||
android.R.attr.textSelectHandleLeft);
|
||||
!rtl ? android.R.attr.textSelectHandleLeft :
|
||||
android.R.attr.textSelectHandleRight,
|
||||
rtl);
|
||||
m_rightSelectionHandle = new CursorHandle(m_activity, m_layout, QtNative.IdRightHandle,
|
||||
android.R.attr.textSelectHandleRight);
|
||||
!rtl ? android.R.attr.textSelectHandleRight :
|
||||
android.R.attr.textSelectHandleLeft,
|
||||
rtl);
|
||||
}
|
||||
m_leftSelectionHandle.setPosition(x1,y1);
|
||||
m_rightSelectionHandle.setPosition(x2,y2);
|
||||
|
@ -61,6 +61,7 @@ import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.InputDevice;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.security.KeyStore;
|
||||
@ -470,6 +471,17 @@ public class QtNative
|
||||
}
|
||||
}
|
||||
|
||||
static public void sendGenericMotionEvent(MotionEvent event, int id)
|
||||
{
|
||||
if (event.getActionMasked() != MotionEvent.ACTION_SCROLL
|
||||
|| (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != InputDevice.SOURCE_CLASS_POINTER) {
|
||||
return;
|
||||
}
|
||||
|
||||
mouseWheel(id, (int) event.getX(), (int) event.getY(),
|
||||
event.getAxisValue(MotionEvent.AXIS_HSCROLL), event.getAxisValue(MotionEvent.AXIS_VSCROLL));
|
||||
}
|
||||
|
||||
public static Context getContext() {
|
||||
if (m_activity != null)
|
||||
return m_activity;
|
||||
@ -516,12 +528,13 @@ public class QtNative
|
||||
final int x1,
|
||||
final int y1,
|
||||
final int x2,
|
||||
final int y2)
|
||||
final int y2,
|
||||
final boolean rtl)
|
||||
{
|
||||
runAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
m_activityDelegate.updateHandles(mode, x1, y1, x2, y2);
|
||||
m_activityDelegate.updateHandles(mode, x1, y1, x2, y2, rtl);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -800,6 +813,7 @@ public class QtNative
|
||||
public static native void mouseDown(int winId, int x, int y);
|
||||
public static native void mouseUp(int winId, int x, int y);
|
||||
public static native void mouseMove(int winId, int x, int y);
|
||||
public static native void mouseWheel(int winId, int x, int y, float hdelta, float vdelta);
|
||||
public static native void touchBegin(int winId);
|
||||
public static native void touchAdd(int winId, int pointerId, int action, boolean primary, int x, int y, float major, float minor, float rotation, float pressure);
|
||||
public static native void touchEnd(int winId, int action);
|
||||
|
@ -112,4 +112,11 @@ public class QtSurface extends SurfaceView implements SurfaceHolder.Callback
|
||||
QtNative.sendTrackballEvent(event, getId());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onGenericMotionEvent(MotionEvent event)
|
||||
{
|
||||
QtNative.sendGenericMotionEvent(event, getId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,110 @@
|
||||
From c30bdc7d961ff09d74117e038c1bb9f06ad49738 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Wolff <oliver.wolff@qt.io>
|
||||
Date: Wed, 7 Jun 2017 10:07:43 +0200
|
||||
Subject: [PATCH] ANGLE: Fix crash with ltcg on Visual Studio 2015 Update 3
|
||||
|
||||
Release builds of applications that used Qt configured with "link time
|
||||
code generation" crashed (memory access violation), when calling
|
||||
GetInternalFormatInfo in Context::initCaps.
|
||||
|
||||
It looks like this is a compiler problem that can be avoided by not
|
||||
using a reference for the return value.
|
||||
|
||||
Task-number: QTBUG-55718
|
||||
Change-Id: Ic1fb95d7b518a49859f41c819e860864387a8d3c
|
||||
---
|
||||
src/3rdparty/angle/src/libANGLE/formatutils.cpp | 2 +-
|
||||
src/3rdparty/angle/src/libANGLE/formatutils.h | 2 +-
|
||||
src/3rdparty/angle/src/libANGLE/validationES3.cpp | 18 +++++++++---------
|
||||
3 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/3rdparty/angle/src/libANGLE/formatutils.cpp b/src/3rdparty/angle/src/libANGLE/formatutils.cpp
|
||||
index 3a4df12..f8b9a8b 100644
|
||||
--- a/src/3rdparty/angle/src/libANGLE/formatutils.cpp
|
||||
+++ b/src/3rdparty/angle/src/libANGLE/formatutils.cpp
|
||||
@@ -652,7 +652,7 @@ const Type &GetTypeInfo(GLenum type)
|
||||
}
|
||||
}
|
||||
|
||||
-const InternalFormat &GetInternalFormatInfo(GLenum internalFormat)
|
||||
+const InternalFormat GetInternalFormatInfo(GLenum internalFormat)
|
||||
{
|
||||
const InternalFormatInfoMap &formatMap = GetInternalFormatMap();
|
||||
InternalFormatInfoMap::const_iterator iter = formatMap.find(internalFormat);
|
||||
diff --git a/src/3rdparty/angle/src/libANGLE/formatutils.h b/src/3rdparty/angle/src/libANGLE/formatutils.h
|
||||
index 6863e4d..2165e6b 100644
|
||||
--- a/src/3rdparty/angle/src/libANGLE/formatutils.h
|
||||
+++ b/src/3rdparty/angle/src/libANGLE/formatutils.h
|
||||
@@ -79,7 +79,7 @@ struct InternalFormat
|
||||
GLint skipRows,
|
||||
GLint skipPixels) const;
|
||||
};
|
||||
-const InternalFormat &GetInternalFormatInfo(GLenum internalFormat);
|
||||
+const InternalFormat GetInternalFormatInfo(GLenum internalFormat);
|
||||
|
||||
GLenum GetSizedInternalFormat(GLenum internalFormat, GLenum type);
|
||||
|
||||
diff --git a/src/3rdparty/angle/src/libANGLE/validationES3.cpp b/src/3rdparty/angle/src/libANGLE/validationES3.cpp
|
||||
index e08e5d2..2db64ec 100644
|
||||
--- a/src/3rdparty/angle/src/libANGLE/validationES3.cpp
|
||||
+++ b/src/3rdparty/angle/src/libANGLE/validationES3.cpp
|
||||
@@ -775,20 +775,20 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
|
||||
// with the values of the source buffer's [channel sizes]. Table 3.17 is used if the
|
||||
// FRAMEBUFFER_ATTACHMENT_ENCODING is LINEAR and table 3.18 is used if the FRAMEBUFFER_ATTACHMENT_ENCODING
|
||||
// is SRGB.
|
||||
- const InternalFormat *sourceEffectiveFormat = NULL;
|
||||
+ InternalFormat sourceEffectiveFormat;
|
||||
if (readBufferHandle != 0)
|
||||
{
|
||||
// Not the default framebuffer, therefore the read buffer must be a user-created texture or renderbuffer
|
||||
if (framebufferInternalFormatInfo.pixelBytes > 0)
|
||||
{
|
||||
- sourceEffectiveFormat = &framebufferInternalFormatInfo;
|
||||
+ sourceEffectiveFormat = framebufferInternalFormatInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Renderbuffers cannot be created with an unsized internal format, so this must be an unsized-format
|
||||
// texture. We can use the same table we use when creating textures to get its effective sized format.
|
||||
GLenum sizedInternalFormat = GetSizedInternalFormat(framebufferInternalFormatInfo.format, framebufferInternalFormatInfo.type);
|
||||
- sourceEffectiveFormat = &GetInternalFormatInfo(sizedInternalFormat);
|
||||
+ sourceEffectiveFormat = GetInternalFormatInfo(sizedInternalFormat);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -800,7 +800,7 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
|
||||
GLenum effectiveFormat;
|
||||
if (GetEffectiveInternalFormat(framebufferInternalFormatInfo, textureInternalFormatInfo, &effectiveFormat))
|
||||
{
|
||||
- sourceEffectiveFormat = &GetInternalFormatInfo(effectiveFormat);
|
||||
+ sourceEffectiveFormat = GetInternalFormatInfo(effectiveFormat);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -816,7 +816,7 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
|
||||
(framebufferInternalFormatInfo.blueBits >= 1 && framebufferInternalFormatInfo.blueBits <= 8) &&
|
||||
(framebufferInternalFormatInfo.alphaBits >= 1 && framebufferInternalFormatInfo.alphaBits <= 8))
|
||||
{
|
||||
- sourceEffectiveFormat = &GetInternalFormatInfo(GL_SRGB8_ALPHA8);
|
||||
+ sourceEffectiveFormat = GetInternalFormatInfo(GL_SRGB8_ALPHA8);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -834,10 +834,10 @@ static bool IsValidES3CopyTexImageCombination(GLenum textureInternalFormat, GLen
|
||||
{
|
||||
// Section 3.8.5 of the GLES 3.0.3 spec, pg 139, requires that, if the destination format is sized,
|
||||
// component sizes of the source and destination formats must exactly match
|
||||
- if (textureInternalFormatInfo.redBits != sourceEffectiveFormat->redBits ||
|
||||
- textureInternalFormatInfo.greenBits != sourceEffectiveFormat->greenBits ||
|
||||
- textureInternalFormatInfo.blueBits != sourceEffectiveFormat->blueBits ||
|
||||
- textureInternalFormatInfo.alphaBits != sourceEffectiveFormat->alphaBits)
|
||||
+ if (textureInternalFormatInfo.redBits != sourceEffectiveFormat.redBits ||
|
||||
+ textureInternalFormatInfo.greenBits != sourceEffectiveFormat.greenBits ||
|
||||
+ textureInternalFormatInfo.blueBits != sourceEffectiveFormat.blueBits ||
|
||||
+ textureInternalFormatInfo.alphaBits != sourceEffectiveFormat.alphaBits)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
--
|
||||
2.5.3.windows.1
|
||||
|
@ -84,6 +84,14 @@
|
||||
"-ldl"
|
||||
]
|
||||
},
|
||||
"librt": {
|
||||
"label": "clock_gettime()",
|
||||
"test": "unix/clock-gettime",
|
||||
"sources": [
|
||||
"",
|
||||
"-lrt"
|
||||
]
|
||||
},
|
||||
"pcre2": {
|
||||
"label": "PCRE2",
|
||||
"test": "unix/pcre2",
|
||||
@ -119,15 +127,11 @@
|
||||
"type": "compile",
|
||||
"test": "common/atomicfptr"
|
||||
},
|
||||
"clock-gettime": {
|
||||
"label": "clock_gettime()",
|
||||
"type": "compile",
|
||||
"test": "unix/clock-gettime"
|
||||
},
|
||||
"clock-monotonic": {
|
||||
"label": "POSIX monotonic clock",
|
||||
"type": "compile",
|
||||
"test": "unix/clock-monotonic"
|
||||
"test": "unix/clock-monotonic",
|
||||
"use": "librt"
|
||||
},
|
||||
"cloexec": {
|
||||
"label": "O_CLOEXEC",
|
||||
@ -199,7 +203,7 @@
|
||||
"features": {
|
||||
"clock-gettime": {
|
||||
"label": "clock_gettime()",
|
||||
"condition": "tests.clock-gettime",
|
||||
"condition": "config.unix && libs.librt",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"clock-monotonic": {
|
||||
|
@ -45,7 +45,7 @@
|
||||
access.
|
||||
|
||||
More details about the JSON data format can be found at \l{http://json.org}{json.org}
|
||||
and in \l{http://tools.ietf.org/html/rfc4627}{RFC-4627}.
|
||||
and in \l{https://tools.ietf.org/html/rfc7159}{RFC-7159}.
|
||||
|
||||
\tableofcontents
|
||||
|
||||
|
@ -27,7 +27,6 @@ HEADERS += \
|
||||
SOURCES += \
|
||||
global/archdetect.cpp \
|
||||
global/qglobal.cpp \
|
||||
global/qglobalstatic.cpp \
|
||||
global/qlibraryinfo.cpp \
|
||||
global/qmalloc.cpp \
|
||||
global/qnumeric.cpp \
|
||||
|
@ -37,8 +37,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qglobalstatic.h"
|
||||
|
||||
/*!
|
||||
\macro Q_GLOBAL_STATIC(Type, VariableName)
|
||||
\since 5.1
|
@ -254,7 +254,7 @@ Q_CORE_EXPORT bool qt_logging_to_console()
|
||||
\sa QMessageLogContext, qDebug(), qInfo(), qWarning(), qCritical(), qFatal()
|
||||
*/
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
|
||||
static inline void convert_to_wchar_t_elided(wchar_t *d, size_t space, const char *s) Q_DECL_NOEXCEPT
|
||||
{
|
||||
size_t len = qstrlen(s);
|
||||
|
@ -154,8 +154,8 @@ QT_BEGIN_NAMESPACE
|
||||
QStringList QProcessEnvironmentPrivate::toList() const
|
||||
{
|
||||
QStringList result;
|
||||
result.reserve(hash.size());
|
||||
for (Hash::const_iterator it = hash.cbegin(), end = hash.cend(); it != end; ++it)
|
||||
result.reserve(vars.size());
|
||||
for (auto it = vars.cbegin(), end = vars.cend(); it != end; ++it)
|
||||
result << nameToString(it.key()) + QLatin1Char('=') + valueToString(it.value());
|
||||
return result;
|
||||
}
|
||||
@ -181,9 +181,9 @@ QProcessEnvironment QProcessEnvironmentPrivate::fromList(const QStringList &list
|
||||
QStringList QProcessEnvironmentPrivate::keys() const
|
||||
{
|
||||
QStringList result;
|
||||
result.reserve(hash.size());
|
||||
Hash::ConstIterator it = hash.constBegin(),
|
||||
end = hash.constEnd();
|
||||
result.reserve(vars.size());
|
||||
auto it = vars.constBegin();
|
||||
const auto end = vars.constEnd();
|
||||
for ( ; it != end; ++it)
|
||||
result << nameToString(it.key());
|
||||
return result;
|
||||
@ -191,14 +191,14 @@ QStringList QProcessEnvironmentPrivate::keys() const
|
||||
|
||||
void QProcessEnvironmentPrivate::insert(const QProcessEnvironmentPrivate &other)
|
||||
{
|
||||
Hash::ConstIterator it = other.hash.constBegin(),
|
||||
end = other.hash.constEnd();
|
||||
auto it = other.vars.constBegin();
|
||||
const auto end = other.vars.constEnd();
|
||||
for ( ; it != end; ++it)
|
||||
hash.insert(it.key(), it.value());
|
||||
vars.insert(it.key(), it.value());
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
QHash<QString, Key>::ConstIterator nit = other.nameMap.constBegin(),
|
||||
nend = other.nameMap.constEnd();
|
||||
auto nit = other.nameMap.constBegin();
|
||||
const auto nend = other.nameMap.constEnd();
|
||||
for ( ; nit != nend; ++nit)
|
||||
nameMap.insert(nit.key(), nit.value());
|
||||
#endif
|
||||
@ -271,7 +271,7 @@ bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const
|
||||
if (d) {
|
||||
if (other.d) {
|
||||
QProcessEnvironmentPrivate::OrderedMutexLocker locker(d, other.d);
|
||||
return d->hash == other.d->hash;
|
||||
return d->vars == other.d->vars;
|
||||
} else {
|
||||
return isEmpty();
|
||||
}
|
||||
@ -289,7 +289,7 @@ bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const
|
||||
bool QProcessEnvironment::isEmpty() const
|
||||
{
|
||||
// Needs no locking, as no hash nodes are accessed
|
||||
return d ? d->hash.isEmpty() : true;
|
||||
return d ? d->vars.isEmpty() : true;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -301,7 +301,7 @@ bool QProcessEnvironment::isEmpty() const
|
||||
void QProcessEnvironment::clear()
|
||||
{
|
||||
if (d)
|
||||
d->hash.clear();
|
||||
d->vars.clear();
|
||||
// Unix: Don't clear d->nameMap, as the environment is likely to be
|
||||
// re-populated with the same keys again.
|
||||
}
|
||||
@ -318,7 +318,7 @@ bool QProcessEnvironment::contains(const QString &name) const
|
||||
if (!d)
|
||||
return false;
|
||||
QProcessEnvironmentPrivate::MutexLocker locker(d);
|
||||
return d->hash.contains(d->prepareName(name));
|
||||
return d->vars.contains(d->prepareName(name));
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -337,7 +337,7 @@ void QProcessEnvironment::insert(const QString &name, const QString &value)
|
||||
{
|
||||
// our re-impl of detach() detaches from null
|
||||
d.detach(); // detach before prepareName()
|
||||
d->hash.insert(d->prepareName(name), d->prepareValue(value));
|
||||
d->vars.insert(d->prepareName(name), d->prepareValue(value));
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -352,7 +352,7 @@ void QProcessEnvironment::remove(const QString &name)
|
||||
{
|
||||
if (d) {
|
||||
d.detach(); // detach before prepareName()
|
||||
d->hash.remove(d->prepareName(name));
|
||||
d->vars.remove(d->prepareName(name));
|
||||
}
|
||||
}
|
||||
|
||||
@ -369,8 +369,8 @@ QString QProcessEnvironment::value(const QString &name, const QString &defaultVa
|
||||
return defaultValue;
|
||||
|
||||
QProcessEnvironmentPrivate::MutexLocker locker(d);
|
||||
QProcessEnvironmentPrivate::Hash::ConstIterator it = d->hash.constFind(d->prepareName(name));
|
||||
if (it == d->hash.constEnd())
|
||||
const auto it = d->vars.constFind(d->prepareName(name));
|
||||
if (it == d->vars.constEnd())
|
||||
return defaultValue;
|
||||
|
||||
return d->valueToString(it.value());
|
||||
|
@ -48,7 +48,7 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment()
|
||||
__block QProcessEnvironment env;
|
||||
[[[NSProcessInfo processInfo] environment]
|
||||
enumerateKeysAndObjectsUsingBlock:^(NSString *name, NSString *value, BOOL *__unused stop) {
|
||||
env.d->hash.insert(
|
||||
env.d->vars.insert(
|
||||
QProcessEnvironmentPrivate::Key(QString::fromNSString(name).toLocal8Bit()),
|
||||
QProcessEnvironmentPrivate::Value(QString::fromNSString(value).toLocal8Bit()));
|
||||
}];
|
||||
|
@ -55,6 +55,7 @@
|
||||
#include "QtCore/qprocess.h"
|
||||
#include "QtCore/qstringlist.h"
|
||||
#include "QtCore/qhash.h"
|
||||
#include "QtCore/qmap.h"
|
||||
#include "QtCore/qshareddata.h"
|
||||
#include "private/qiodevice_p.h"
|
||||
|
||||
@ -90,22 +91,19 @@ public:
|
||||
QProcEnvKey(const QProcEnvKey &other) : QString(other) {}
|
||||
bool operator==(const QProcEnvKey &other) const { return !compare(other, Qt::CaseInsensitive); }
|
||||
};
|
||||
inline uint qHash(const QProcEnvKey &key) { return qHash(key.toCaseFolded()); }
|
||||
|
||||
inline bool operator<(const QProcEnvKey &a, const QProcEnvKey &b)
|
||||
{
|
||||
// On windows use case-insensitive ordering because that is how Windows needs the environment
|
||||
// block sorted (https://msdn.microsoft.com/en-us/library/windows/desktop/ms682009(v=vs.85).aspx)
|
||||
return a.compare(b, Qt::CaseInsensitive) < 0;
|
||||
}
|
||||
|
||||
Q_DECLARE_TYPEINFO(QProcEnvKey, Q_MOVABLE_TYPE);
|
||||
|
||||
typedef QString QProcEnvValue;
|
||||
#else
|
||||
class QProcEnvKey
|
||||
{
|
||||
public:
|
||||
QProcEnvKey() : hash(0) {}
|
||||
explicit QProcEnvKey(const QByteArray &other) : key(other), hash(qHash(key)) {}
|
||||
QProcEnvKey(const QProcEnvKey &other) { *this = other; }
|
||||
bool operator==(const QProcEnvKey &other) const { return key == other.key; }
|
||||
|
||||
QByteArray key;
|
||||
uint hash;
|
||||
};
|
||||
inline uint qHash(const QProcEnvKey &key) Q_DECL_NOTHROW { return key.hash; }
|
||||
using QProcEnvKey = QByteArray;
|
||||
|
||||
class QProcEnvValue
|
||||
{
|
||||
@ -138,7 +136,6 @@ public:
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QProcEnvValue, Q_MOVABLE_TYPE);
|
||||
#endif
|
||||
Q_DECLARE_TYPEINFO(QProcEnvKey, Q_MOVABLE_TYPE);
|
||||
|
||||
class QProcessEnvironmentPrivate: public QSharedData
|
||||
{
|
||||
@ -161,13 +158,13 @@ public:
|
||||
inline Key prepareName(const QString &name) const
|
||||
{
|
||||
Key &ent = nameMap[name];
|
||||
if (ent.key.isEmpty())
|
||||
ent = Key(name.toLocal8Bit());
|
||||
if (ent.isEmpty())
|
||||
ent = name.toLocal8Bit();
|
||||
return ent;
|
||||
}
|
||||
inline QString nameToString(const Key &name) const
|
||||
{
|
||||
const QString sname = QString::fromLocal8Bit(name.key);
|
||||
const QString sname = QString::fromLocal8Bit(name);
|
||||
nameMap[sname] = name;
|
||||
return sname;
|
||||
}
|
||||
@ -197,17 +194,17 @@ public:
|
||||
// do not need a lock, as they detach objects (however, we need to
|
||||
// ensure that they really detach before using prepareName()).
|
||||
MutexLocker locker(&other);
|
||||
hash = other.hash;
|
||||
vars = other.vars;
|
||||
nameMap = other.nameMap;
|
||||
// We need to detach our members, so that our mutex can protect them.
|
||||
// As we are being detached, they likely would be detached a moment later anyway.
|
||||
hash.detach();
|
||||
vars.detach();
|
||||
nameMap.detach();
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef QHash<Key, Value> Hash;
|
||||
Hash hash;
|
||||
using Map = QMap<Key, Value>;
|
||||
Map vars;
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
typedef QHash<QString, Key> NameHash;
|
||||
|
@ -136,7 +136,7 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment()
|
||||
|
||||
QByteArray name(entry, equal - entry);
|
||||
QByteArray value(equal + 1);
|
||||
env.d->hash.insert(QProcessEnvironmentPrivate::Key(name),
|
||||
env.d->vars.insert(QProcessEnvironmentPrivate::Key(name),
|
||||
QProcessEnvironmentPrivate::Value(value));
|
||||
}
|
||||
return env;
|
||||
@ -338,7 +338,7 @@ bool QProcessPrivate::openChannel(Channel &channel)
|
||||
}
|
||||
}
|
||||
|
||||
static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Hash &environment, int *envc)
|
||||
static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Map &environment, int *envc)
|
||||
{
|
||||
*envc = 0;
|
||||
if (environment.isEmpty())
|
||||
@ -348,10 +348,10 @@ static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Hash &environm
|
||||
envp[environment.count()] = 0;
|
||||
envp[environment.count() + 1] = 0;
|
||||
|
||||
QProcessEnvironmentPrivate::Hash::ConstIterator it = environment.constBegin();
|
||||
const QProcessEnvironmentPrivate::Hash::ConstIterator end = environment.constEnd();
|
||||
auto it = environment.constBegin();
|
||||
const auto end = environment.constEnd();
|
||||
for ( ; it != end; ++it) {
|
||||
QByteArray key = it.key().key;
|
||||
QByteArray key = it.key();
|
||||
QByteArray value = it.value().bytes();
|
||||
key.reserve(key.length() + 1 + value.length());
|
||||
key.append('=');
|
||||
@ -436,7 +436,7 @@ void QProcessPrivate::startProcess()
|
||||
char **envp = 0;
|
||||
if (environment.d.constData()) {
|
||||
QProcessEnvironmentPrivate::MutexLocker locker(environment.d);
|
||||
envp = _q_dupEnvironment(environment.d.constData()->hash, &envc);
|
||||
envp = _q_dupEnvironment(environment.d.constData()->vars, &envc);
|
||||
}
|
||||
|
||||
// Encode the working directory if it's non-empty, otherwise just pass 0.
|
||||
|
@ -75,7 +75,7 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment()
|
||||
int nameLen = equal - entry;
|
||||
QString name = QString::fromWCharArray(entry, nameLen);
|
||||
QString value = QString::fromWCharArray(equal + 1, entryLen - nameLen - 1);
|
||||
env.d->hash.insert(QProcessEnvironmentPrivate::Key(name), value);
|
||||
env.d->vars.insert(QProcessEnvironmentPrivate::Key(name), value);
|
||||
}
|
||||
entry += entryLen + 1;
|
||||
}
|
||||
@ -390,11 +390,11 @@ static QString qt_create_commandline(const QString &program, const QStringList &
|
||||
return args;
|
||||
}
|
||||
|
||||
static QByteArray qt_create_environment(const QProcessEnvironmentPrivate::Hash &environment)
|
||||
static QByteArray qt_create_environment(const QProcessEnvironmentPrivate::Map &environment)
|
||||
{
|
||||
QByteArray envlist;
|
||||
if (!environment.isEmpty()) {
|
||||
QProcessEnvironmentPrivate::Hash copy = environment;
|
||||
QProcessEnvironmentPrivate::Map copy = environment;
|
||||
|
||||
// add PATH if necessary (for DLL loading)
|
||||
QProcessEnvironmentPrivate::Key pathKey(QLatin1String("PATH"));
|
||||
@ -413,8 +413,8 @@ static QByteArray qt_create_environment(const QProcessEnvironmentPrivate::Hash &
|
||||
}
|
||||
|
||||
int pos = 0;
|
||||
QProcessEnvironmentPrivate::Hash::ConstIterator it = copy.constBegin(),
|
||||
end = copy.constEnd();
|
||||
auto it = copy.constBegin();
|
||||
const auto end = copy.constEnd();
|
||||
|
||||
static const wchar_t equal = L'=';
|
||||
static const wchar_t nul = L'\0';
|
||||
@ -475,7 +475,7 @@ void QProcessPrivate::startProcess()
|
||||
QString args = qt_create_commandline(program, arguments);
|
||||
QByteArray envlist;
|
||||
if (environment.d.constData())
|
||||
envlist = qt_create_environment(environment.d.constData()->hash);
|
||||
envlist = qt_create_environment(environment.d.constData()->vars);
|
||||
if (!nativeArguments.isEmpty()) {
|
||||
if (!args.isEmpty())
|
||||
args += QLatin1Char(' ');
|
||||
|
@ -243,7 +243,7 @@ public:
|
||||
uint i = qFromLittleEndian(val);
|
||||
i <<= 32 - width - pos;
|
||||
int t = (int) i;
|
||||
t >>= pos;
|
||||
t >>= 32 - width;
|
||||
return t;
|
||||
}
|
||||
bool operator !() const {
|
||||
|
@ -162,7 +162,7 @@ unix|integrity {
|
||||
QMAKE_USE_PRIVATE += glib
|
||||
}
|
||||
|
||||
qtConfig(clock-gettime): include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri)
|
||||
qtConfig(clock-gettime): QMAKE_USE_PRIVATE += librt
|
||||
|
||||
!android {
|
||||
SOURCES += kernel/qsharedmemory_posix.cpp \
|
||||
|
@ -254,7 +254,7 @@ bool QCollator::numericMode() const
|
||||
|
||||
The default is locale dependent.
|
||||
|
||||
\note This method is not currently supported on Apple platforms or if Qt is configured to not use ICU on Linux.
|
||||
\note This method is not currently supported if Qt is configured to not use ICU on Linux.
|
||||
|
||||
\sa ignorePunctuation()
|
||||
*/
|
||||
|
@ -66,7 +66,7 @@ void QCollatorPrivate::init()
|
||||
options |= kUCCollateCaseInsensitiveMask;
|
||||
if (numericMode)
|
||||
options |= kUCCollateDigitsAsNumberMask | kUCCollateDigitsOverrideMask;
|
||||
if (ignorePunctuation)
|
||||
if (!ignorePunctuation)
|
||||
options |= kUCCollatePunctuationSignificantMask;
|
||||
|
||||
OSStatus status = UCCreateCollator(
|
||||
|
@ -721,6 +721,14 @@ void qDumpCPUFeatures()
|
||||
printf("%s%s", features_string + features_indices[i],
|
||||
minFeature & (Q_UINT64_C(1) << i) ? "[required]" : "");
|
||||
}
|
||||
if ((features = (qCompilerCpuFeatures & ~features))) {
|
||||
printf("\n!!!!!!!!!!!!!!!!!!!!\n!!! Missing required features:");
|
||||
for (int i = 0; i < features_count; ++i) {
|
||||
if (features & (Q_UINT64_C(1) << i))
|
||||
printf("%s", features_string + features_indices[i]);
|
||||
}
|
||||
printf("\n!!! Applications will likely crash with \"Invalid Instruction\"\n!!!!!!!!!!!!!!!!!!!!");
|
||||
}
|
||||
puts("");
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@
|
||||
#if defined(__SSE4_2__) || (defined(QT_COMPILER_SUPPORTS_SSE4_2) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS))
|
||||
#include <nmmintrin.h>
|
||||
|
||||
# if defined(__SSE4_2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)
|
||||
# if defined(__SSE4_2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC))
|
||||
// POPCNT instructions:
|
||||
// All processors that support SSE4.2 support POPCNT
|
||||
// (but neither MSVC nor the Intel compiler define this macro)
|
||||
@ -245,7 +245,7 @@
|
||||
// immintrin.h is the ultimate header, we don't need anything else after this
|
||||
#include <immintrin.h>
|
||||
|
||||
# if defined(__AVX__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)
|
||||
# if defined(__AVX__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC))
|
||||
// AES, PCLMULQDQ instructions:
|
||||
// All processors that support AVX support AES, PCLMULQDQ
|
||||
// (but neither MSVC nor the Intel compiler define these macros)
|
||||
@ -253,7 +253,7 @@
|
||||
# define __PCLMUL__ 1
|
||||
# endif
|
||||
|
||||
# if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)
|
||||
# if defined(__AVX2__) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) && (defined(Q_CC_INTEL) || defined(Q_CC_MSVC))
|
||||
// F16C & RDRAND instructions:
|
||||
// All processors that support AVX2 support F16C & RDRAND:
|
||||
// (but neither MSVC nor the Intel compiler define these macros)
|
||||
|
@ -1152,7 +1152,6 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla
|
||||
"linuxfb", "vnc", "mirclient",
|
||||
{
|
||||
"type": "feature",
|
||||
"message": "INTEGRITY framebuffer",
|
||||
"condition": "config.integrity",
|
||||
"args": "integrityfb"
|
||||
},
|
||||
|
@ -137,6 +137,17 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Notes for Universal Windows Platform Users
|
||||
|
||||
\list
|
||||
|
||||
\li The Universal Windows Platform only allows to query the
|
||||
clipboard in case the application is active and an application
|
||||
window has focus. Accessing the clipboard data when in background
|
||||
will fail due to access denial.
|
||||
|
||||
\endlist
|
||||
|
||||
\sa QGuiApplication
|
||||
*/
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Copyright (C) 2016 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
@ -393,7 +393,7 @@ void QNetmaskAddress::setPrefixLength(QAbstractSocket::NetworkLayerProtocol prot
|
||||
|
||||
/*! \enum QHostAddress::SpecialAddress
|
||||
|
||||
\value Null The null address object. Equivalent to QHostAddress().
|
||||
\value Null The null address object. Equivalent to QHostAddress(). See also QHostAddress::isNull().
|
||||
\value LocalHost The IPv4 localhost address. Equivalent to QHostAddress("127.0.0.1").
|
||||
\value LocalHostIPv6 The IPv6 localhost address. Equivalent to QHostAddress("::1").
|
||||
\value Broadcast The IPv4 broadcast address. Equivalent to QHostAddress("255.255.255.255").
|
||||
@ -605,6 +605,14 @@ QHostAddress &QHostAddress::operator=(SpecialAddress address)
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn void QHostAddress::swap(QHostAddress &other)
|
||||
\since 5.6
|
||||
|
||||
Swaps this host address with \a other. This operation is very fast
|
||||
and never fails.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QHostAddress::operator!=(const QHostAddress &other) const
|
||||
\since 4.2
|
||||
@ -621,7 +629,9 @@ QHostAddress &QHostAddress::operator=(SpecialAddress address)
|
||||
*/
|
||||
|
||||
/*!
|
||||
Sets the host address to 0.0.0.0.
|
||||
Sets the host address to null.
|
||||
|
||||
\sa QHostAddress::Null
|
||||
*/
|
||||
void QHostAddress::clear()
|
||||
{
|
||||
@ -982,9 +992,11 @@ bool QHostAddress::operator ==(SpecialAddress other) const
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns \c true if this host address is null (INADDR_ANY or in6addr_any).
|
||||
The default constructor creates a null address, and that address is
|
||||
not valid for any host or interface.
|
||||
Returns \c true if this host address is not valid for any host or interface.
|
||||
|
||||
The default constructor creates a null address.
|
||||
|
||||
\sa QHostAddress::Null
|
||||
*/
|
||||
bool QHostAddress::isNull() const
|
||||
{
|
||||
|
@ -1219,8 +1219,10 @@ bool QSslSocketBackendPrivate::verifyPeerTrust()
|
||||
QCFType<CFMutableArrayRef> certArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
|
||||
for (const QSslCertificate &cert : qAsConst(configuration.caCertificates)) {
|
||||
QCFType<CFDataRef> certData = cert.d->derData.toCFData();
|
||||
QCFType<SecCertificateRef> certRef = SecCertificateCreateWithData(NULL, certData);
|
||||
CFArrayAppendValue(certArray, certRef);
|
||||
if (QCFType<SecCertificateRef> secRef = SecCertificateCreateWithData(NULL, certData))
|
||||
CFArrayAppendValue(certArray, secRef);
|
||||
else
|
||||
qCWarning(lcSsl, "Failed to create SecCertificate from QSslCertificate");
|
||||
}
|
||||
|
||||
SecTrustSetAnchorCertificates(trust, certArray);
|
||||
|
@ -366,6 +366,14 @@ void QKdeThemePrivate::refresh()
|
||||
resources.fonts[QPlatformTheme::FixedFont] = fixedFont;
|
||||
}
|
||||
|
||||
if (QFont *menuFont = kdeFont(readKdeSetting(QStringLiteral("menuFont"), kdeDirs, kdeVersion, kdeSettings))) {
|
||||
resources.fonts[QPlatformTheme::MenuFont] = menuFont;
|
||||
resources.fonts[QPlatformTheme::MenuBarFont] = new QFont(*menuFont);
|
||||
}
|
||||
|
||||
if (QFont *toolBarFont = kdeFont(readKdeSetting(QStringLiteral("toolBarFont"), kdeDirs, kdeVersion, kdeSettings)))
|
||||
resources.fonts[QPlatformTheme::ToolButtonFont] = toolBarFont;
|
||||
|
||||
qDeleteAll(kdeSettings);
|
||||
}
|
||||
|
||||
|
@ -121,11 +121,11 @@ namespace QtAndroidInput
|
||||
return m_softwareKeyboardRect;
|
||||
}
|
||||
|
||||
void updateHandles(int mode, QPoint cursor, QPoint anchor)
|
||||
void updateHandles(int mode, QPoint cursor, QPoint anchor, bool rtl)
|
||||
{
|
||||
QJNIObjectPrivate::callStaticMethod<void>(applicationClass(), "updateHandles", "(IIIII)V",
|
||||
QJNIObjectPrivate::callStaticMethod<void>(applicationClass(), "updateHandles", "(IIIIIZ)V",
|
||||
mode, cursor.x(), cursor.y(), anchor.x(),
|
||||
anchor.y());
|
||||
anchor.y(), rtl);
|
||||
}
|
||||
|
||||
static void mouseDown(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y)
|
||||
@ -173,6 +173,25 @@ namespace QtAndroidInput
|
||||
Qt::MouseButtons(Qt::LeftButton));
|
||||
}
|
||||
|
||||
static void mouseWheel(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y, jfloat hdelta, jfloat vdelta)
|
||||
{
|
||||
if (m_ignoreMouseEvents)
|
||||
return;
|
||||
|
||||
QPoint globalPos(x,y);
|
||||
QWindow *tlw = m_mouseGrabber.data();
|
||||
if (!tlw)
|
||||
tlw = topLevelWindowAt(globalPos);
|
||||
QPoint localPos = tlw ? (globalPos-tlw->position()) : globalPos;
|
||||
QPoint angleDelta(hdelta * 120, vdelta * 120);
|
||||
|
||||
QWindowSystemInterface::handleWheelEvent(tlw,
|
||||
localPos,
|
||||
globalPos,
|
||||
QPoint(),
|
||||
angleDelta);
|
||||
}
|
||||
|
||||
static void longPress(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y)
|
||||
{
|
||||
QAndroidInputContext *inputContext = QAndroidInputContext::androidInputContext();
|
||||
@ -824,6 +843,7 @@ namespace QtAndroidInput
|
||||
{"mouseDown", "(III)V", (void *)mouseDown},
|
||||
{"mouseUp", "(III)V", (void *)mouseUp},
|
||||
{"mouseMove", "(III)V", (void *)mouseMove},
|
||||
{"mouseWheel", "(IIIFF)V", (void *)mouseWheel},
|
||||
{"longPress", "(III)V", (void *)longPress},
|
||||
{"isTabletEventSupported", "()Z", (void *)isTabletEventSupported},
|
||||
{"tabletEvent", "(IIJIIIFFF)V", (void *)tabletEvent},
|
||||
|
@ -58,7 +58,7 @@ namespace QtAndroidInput
|
||||
// Software keyboard support
|
||||
|
||||
// cursor/selection handles
|
||||
void updateHandles(int handleCount, QPoint cursor = QPoint(), QPoint anchor = QPoint());
|
||||
void updateHandles(int handleCount, QPoint cursor = QPoint(), QPoint anchor = QPoint(), bool rtl = false);
|
||||
|
||||
bool registerNatives(JNIEnv *env);
|
||||
}
|
||||
|
@ -537,7 +537,7 @@ void QAndroidInputContext::updateSelectionHandles()
|
||||
? QHighDpiScaling::factor(window)
|
||||
: QHighDpiScaling::factor(QtAndroid::androidPlatformIntegration()->screen());
|
||||
|
||||
QInputMethodQueryEvent query(Qt::ImCursorPosition | Qt::ImAnchorPosition | Qt::ImEnabled);
|
||||
QInputMethodQueryEvent query(Qt::ImCursorPosition | Qt::ImAnchorPosition | Qt::ImEnabled | Qt::ImCurrentSelection);
|
||||
QCoreApplication::sendEvent(m_focusObject, &query);
|
||||
int cpos = query.value(Qt::ImCursorPosition).toInt();
|
||||
int anchor = query.value(Qt::ImAnchorPosition).toInt();
|
||||
@ -563,7 +563,8 @@ void QAndroidInputContext::updateSelectionHandles()
|
||||
|
||||
QPoint leftPoint(leftRect.bottomLeft().toPoint() * pixelDensity);
|
||||
QPoint righPoint(rightRect.bottomRight().toPoint() * pixelDensity);
|
||||
QtAndroidInput::updateHandles(CursorHandleShowSelection, leftPoint, righPoint);
|
||||
QtAndroidInput::updateHandles(CursorHandleShowSelection, leftPoint, righPoint,
|
||||
query.value(Qt::ImCurrentSelection).toString().isRightToLeft());
|
||||
|
||||
if (m_cursorHandleShown == CursorHandleShowPopup) {
|
||||
// make sure the popup does not reappear when the selection menu closes
|
||||
|
@ -177,7 +177,10 @@ static bool _q_dontOverrideCtrlLMB = false;
|
||||
- (void)dealloc
|
||||
{
|
||||
CGImageRelease(m_maskImage);
|
||||
[m_trackingArea release];
|
||||
if (m_trackingArea) {
|
||||
[self removeTrackingArea:m_trackingArea];
|
||||
[m_trackingArea release];
|
||||
}
|
||||
m_maskImage = 0;
|
||||
[m_inputSource release];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
@ -89,7 +89,8 @@ public:
|
||||
|
||||
if (FAILED(hr)) {
|
||||
success = false;
|
||||
qWarning("%s: EndDraw failed: %#x, tag1: %lld, tag2: %lld", __FUNCTION__, hr, tag1, tag2);
|
||||
qWarning("%s: EndDraw failed: %#lx, tag1: %lld, tag2: %lld",
|
||||
__FUNCTION__, long(hr), tag1, tag2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,10 +45,6 @@
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
#include <X11/extensions/XIproto.h>
|
||||
#endif //XCB_USE_XLIB
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
/* Implementation of http://standards.freedesktop.org/xsettings-spec/xsettings-0.5.html */
|
||||
|
||||
@ -145,19 +141,18 @@ public:
|
||||
return value + 4 - remainder;
|
||||
}
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
void populateSettings(const QByteArray &xSettings)
|
||||
{
|
||||
if (xSettings.length() < 12)
|
||||
return;
|
||||
char byteOrder = xSettings.at(0);
|
||||
if (byteOrder != LSBFirst && byteOrder != MSBFirst) {
|
||||
if (byteOrder != XCB_IMAGE_ORDER_LSB_FIRST && byteOrder != XCB_IMAGE_ORDER_MSB_FIRST) {
|
||||
qWarning("ByteOrder byte %d not 0 or 1", byteOrder);
|
||||
return;
|
||||
}
|
||||
|
||||
#define ADJUST_BO(b, t, x) \
|
||||
((b == LSBFirst) ? \
|
||||
((b == XCB_IMAGE_ORDER_LSB_FIRST) ? \
|
||||
qFromLittleEndian<t>(x) : \
|
||||
qFromBigEndian<t>(x))
|
||||
#define VALIDATE_LENGTH(x) \
|
||||
@ -220,7 +215,6 @@ public:
|
||||
}
|
||||
|
||||
}
|
||||
#endif //XCB_USE_XLIB
|
||||
|
||||
QXcbVirtualDesktop *screen;
|
||||
xcb_window_t x_settings_window;
|
||||
@ -267,10 +261,8 @@ QXcbXSettings::QXcbXSettings(QXcbVirtualDesktop *screen)
|
||||
const uint32_t event_mask[] = { XCB_EVENT_MASK_STRUCTURE_NOTIFY|XCB_EVENT_MASK_PROPERTY_CHANGE };
|
||||
xcb_change_window_attributes(screen->xcb_connection(),d_ptr->x_settings_window,event,event_mask);
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
d_ptr->populateSettings(d_ptr->getSettings());
|
||||
d_ptr->initialized = true;
|
||||
#endif //XCB_USE_XLIB
|
||||
}
|
||||
|
||||
QXcbXSettings::~QXcbXSettings()
|
||||
@ -290,9 +282,8 @@ void QXcbXSettings::handlePropertyNotifyEvent(const xcb_property_notify_event_t
|
||||
Q_D(QXcbXSettings);
|
||||
if (event->window != d->x_settings_window)
|
||||
return;
|
||||
#ifdef XCB_USE_XLIB
|
||||
|
||||
d->populateSettings(d->getSettings());
|
||||
#endif //XCB_USE_XLIB
|
||||
}
|
||||
|
||||
void QXcbXSettings::registerCallbackForProperty(const QByteArray &property, QXcbXSettings::PropertyChangeFunc func, void *handle)
|
||||
|
19
src/plugins/sqldrivers/.qmake.conf
Normal file
19
src/plugins/sqldrivers/.qmake.conf
Normal file
@ -0,0 +1,19 @@
|
||||
# This file detaches this sub-tree from the rest of qtbase,
|
||||
# so it can be configured stand-alone.
|
||||
# Of course, under normal circumstances, this _is_ part of qtbase,
|
||||
# so we have to make some contortions to restore normality.
|
||||
|
||||
isEmpty(_QMAKE_CONF_): return() # Pre-scan during spec loading.
|
||||
|
||||
SQLDRV_SRC_TREE = $$dirname(_QMAKE_CONF_)
|
||||
QTBASE_SRC_TREE = $$section(SQLDRV_SRC_TREE, /, 0, -4)
|
||||
|
||||
QTBASE_BLD_TREE = $$shadowed($$QTBASE_SRC_TREE)
|
||||
!isEmpty(QTBASE_BLD_TREE):exists($$QTBASE_BLD_TREE/.qmake.cache) {
|
||||
# This tricks qt_build_config.prf and qt_build_paths.prf
|
||||
_QMAKE_CONF_ = $$QTBASE_SRC_TREE/.qmake.conf
|
||||
} else {
|
||||
CONFIG += sqldrivers_standalone
|
||||
}
|
||||
|
||||
include($$QTBASE_SRC_TREE/.qmake.conf)
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"module": "sql",
|
||||
"module": "sqldrivers",
|
||||
"depends": [
|
||||
"core"
|
||||
],
|
||||
"testDir": "../../config.tests",
|
||||
"testDir": "../../../config.tests",
|
||||
|
||||
"commandline": {
|
||||
"assignments": {
|
||||
@ -129,47 +129,42 @@
|
||||
"sql-db2": {
|
||||
"label": "DB2 (IBM)",
|
||||
"condition": "libs.db2",
|
||||
"output": [ "publicFeature" ]
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"sql-ibase": {
|
||||
"label": "InterBase",
|
||||
"condition": "libs.ibase",
|
||||
"output": [ "publicFeature" ]
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"sql-mysql": {
|
||||
"label": "MySql",
|
||||
"condition": "libs.mysql",
|
||||
"output": [ "publicFeature" ]
|
||||
},
|
||||
"use_libmysqlclient_r": {
|
||||
"label": "MySql (threadsafe)",
|
||||
"condition": "features.sql-mysql && (libs.mysql.source == 0 || libs.mysql.source == 2)",
|
||||
"output": [ "privateConfig" ]
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"sql-oci": {
|
||||
"label": "OCI (Oracle)",
|
||||
"condition": "libs.oci",
|
||||
"output": [ "publicFeature" ]
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"sql-odbc": {
|
||||
"label": "ODBC",
|
||||
"condition": "libs.odbc && features.datestring",
|
||||
"output": [ "publicFeature" ]
|
||||
"condition": "features.datestring && libs.odbc",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"sql-psql": {
|
||||
"label": "PostgreSQL",
|
||||
"condition": "libs.psql",
|
||||
"output": [ "publicFeature" ]
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"sql-sqlite2": {
|
||||
"label": "SQLite2",
|
||||
"condition": "libs.sqlite2",
|
||||
"output": [ "publicFeature" ]
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"sql-sqlite": {
|
||||
"label": "SQLite",
|
||||
"condition": "features.datestring",
|
||||
"output": [ "publicFeature" ]
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"system-sqlite": {
|
||||
"label": " Using system provided SQLite",
|
||||
@ -179,8 +174,8 @@
|
||||
},
|
||||
"sql-tds": {
|
||||
"label": "TDS (Sybase)",
|
||||
"condition": "libs.tds && features.datestring",
|
||||
"output": [ "publicFeature" ]
|
||||
"condition": "features.datestring && libs.tds",
|
||||
"output": [ "privateFeature" ]
|
||||
}
|
||||
},
|
||||
|
@ -1,5 +1,8 @@
|
||||
QT = core core-private sql-private
|
||||
|
||||
# For QMAKE_USE in the parent projects.
|
||||
include($$shadowed($$PWD)/qtsqldrivers-config.pri)
|
||||
|
||||
PLUGIN_TYPE = sqldrivers
|
||||
load(qt_plugin)
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
TEMPLATE = subdirs
|
||||
QT_FOR_CONFIG += sql
|
||||
|
||||
sqldrivers_standalone {
|
||||
_QMAKE_CACHE_ = $$shadowed($$SQLDRV_SRC_TREE)/.qmake.conf
|
||||
load(qt_configure)
|
||||
}
|
||||
|
||||
qtConfig(sql-psql) : SUBDIRS += psql
|
||||
qtConfig(sql-mysql) : SUBDIRS += mysql
|
||||
|
@ -1,10 +1,11 @@
|
||||
TARGET = qsqlite
|
||||
|
||||
QT_FOR_CONFIG += sql-private
|
||||
|
||||
HEADERS += $$PWD/qsql_sqlite_p.h
|
||||
SOURCES += $$PWD/qsql_sqlite.cpp $$PWD/smain.cpp
|
||||
|
||||
include($$OUT_PWD/../qtsqldrivers-config.pri)
|
||||
QT_FOR_CONFIG += sqldrivers-private
|
||||
|
||||
qtConfig(system-sqlite) {
|
||||
QMAKE_USE += sqlite
|
||||
} else {
|
||||
|
@ -84,9 +84,10 @@ namespace {
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
if (properties.contains(QLatin1String("sizeHint"))) {
|
||||
const DomSize *sizeHint = properties.value(QLatin1String("sizeHint"))->elementSize();
|
||||
w = sizeHint->elementWidth();
|
||||
h = sizeHint->elementHeight();
|
||||
if (const DomSize *sizeHint = properties.value(QLatin1String("sizeHint"))->elementSize()) {
|
||||
w = sizeHint->elementWidth();
|
||||
h = sizeHint->elementHeight();
|
||||
}
|
||||
}
|
||||
output << w << ", " << h << ", ";
|
||||
|
||||
|
@ -22,8 +22,7 @@ win32 {
|
||||
SOURCES += dialogs/qwizard_win.cpp
|
||||
}
|
||||
|
||||
wince: FORMS += dialogs/qfiledialog_embedded.ui
|
||||
else: FORMS += dialogs/qfiledialog.ui
|
||||
FORMS += dialogs/qfiledialog.ui
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
SOURCES += \
|
||||
|
@ -1049,7 +1049,7 @@ QSize QDialog::minimumSizeHint() const
|
||||
\brief whether show() should pop up the dialog as modal or modeless
|
||||
|
||||
By default, this property is \c false and show() pops up the dialog
|
||||
as modeless. Setting his property to true is equivalent to setting
|
||||
as modeless. Setting this property to true is equivalent to setting
|
||||
QWidget::windowModality to Qt::ApplicationModal.
|
||||
|
||||
exec() ignores the value of this property and always pops up the
|
||||
|
@ -1,353 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<comment>*********************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtWidgets 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 The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
*********************************************************************</comment>
|
||||
<class>QFileDialog</class>
|
||||
<widget class="QDialog" name="QFileDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>240</width>
|
||||
<height>320</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizeGripEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<widget class="QFileDialogComboBox" name="lookInCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<widget class="QToolButton" name="backButton">
|
||||
<property name="toolTip">
|
||||
<string>Back</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="forwardButton">
|
||||
<property name="toolTip">
|
||||
<string>Forward</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toParentButton">
|
||||
<property name="toolTip">
|
||||
<string>Parent Directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="newFolderButton">
|
||||
<property name="toolTip">
|
||||
<string>Create New Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="listModeButton">
|
||||
<property name="toolTip">
|
||||
<string>List View</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="detailModeButton">
|
||||
<property name="toolTip">
|
||||
<string>Detail View</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="childrenCollapsible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QSidebar" name="sidebar"/>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<layout class="QVBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFileDialogListView" name="listView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2">
|
||||
<layout class="QVBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFileDialogTreeView" name="treeView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QFileDialogLineEdit" name="fileNameEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QComboBox" name="fileTypeCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="fileNameLabel">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="fileTypeLabel">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Files of type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lookInLabel">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Look in:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QFileDialogTreeView</class>
|
||||
<extends>QTreeView</extends>
|
||||
<header>private/qfiledialog_p.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QFileDialogListView</class>
|
||||
<extends>QListView</extends>
|
||||
<header>private/qfiledialog_p.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QSidebar</class>
|
||||
<extends>QListWidget</extends>
|
||||
<header>private/qsidebar_p.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QFileDialogLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>private/qfiledialog_p.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QFileDialogComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>private/qfiledialog_p.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>lookInCombo</tabstop>
|
||||
<tabstop>backButton</tabstop>
|
||||
<tabstop>forwardButton</tabstop>
|
||||
<tabstop>toParentButton</tabstop>
|
||||
<tabstop>newFolderButton</tabstop>
|
||||
<tabstop>listModeButton</tabstop>
|
||||
<tabstop>detailModeButton</tabstop>
|
||||
<tabstop>sidebar</tabstop>
|
||||
<tabstop>listView</tabstop>
|
||||
<tabstop>fileNameEdit</tabstop>
|
||||
<tabstop>fileTypeCombo</tabstop>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
<tabstop>treeView</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -28,9 +28,6 @@ HEADERS += \
|
||||
itemviews/qitemeditorfactory_p.h \
|
||||
itemviews/qtreewidgetitemiterator.h \
|
||||
itemviews/qdatawidgetmapper.h \
|
||||
itemviews/qcolumnviewgrip_p.h \
|
||||
itemviews/qcolumnview.h \
|
||||
itemviews/qcolumnview_p.h \
|
||||
itemviews/qstyleditemdelegate.h
|
||||
|
||||
SOURCES += \
|
||||
@ -49,11 +46,20 @@ SOURCES += \
|
||||
itemviews/qitemeditorfactory.cpp \
|
||||
itemviews/qtreewidgetitemiterator.cpp \
|
||||
itemviews/qdatawidgetmapper.cpp \
|
||||
itemviews/qcolumnview.cpp \
|
||||
itemviews/qcolumnviewgrip.cpp \
|
||||
itemviews/qstyleditemdelegate.cpp
|
||||
}
|
||||
|
||||
qtConfig(columnview) {
|
||||
HEADERS += \
|
||||
itemviews/qcolumnviewgrip_p.h \
|
||||
itemviews/qcolumnview.h \
|
||||
itemviews/qcolumnview_p.h
|
||||
|
||||
SOURCES += \
|
||||
itemviews/qcolumnview.cpp \
|
||||
itemviews/qcolumnviewgrip.cpp
|
||||
}
|
||||
|
||||
HEADERS += \
|
||||
itemviews/qfileiconprovider.h \
|
||||
itemviews/qfileiconprovider_p.h \
|
||||
|
@ -43,11 +43,10 @@
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <QtWidgets/qabstractitemview.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(columnview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_COLUMNVIEW
|
||||
|
||||
class QColumnViewPrivate;
|
||||
|
||||
class Q_WIDGETS_EXPORT QColumnView : public QAbstractItemView {
|
||||
@ -109,8 +108,6 @@ private:
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_clicked(const QModelIndex &))
|
||||
};
|
||||
|
||||
#endif // QT_NO_COLUMNVIEW
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QCOLUMNVIEW_H
|
||||
|
@ -54,8 +54,6 @@
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include "qcolumnview.h"
|
||||
|
||||
#ifndef QT_NO_QCOLUMNVIEW
|
||||
|
||||
#include <private/qabstractitemview_p.h>
|
||||
|
||||
#include <QtCore/qabstractitemmodel.h>
|
||||
@ -67,6 +65,8 @@
|
||||
#include <qevent.h>
|
||||
#include <qscrollbar.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(columnview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QColumnViewPreviewColumn : public QAbstractItemView {
|
||||
@ -190,9 +190,7 @@ public:
|
||||
const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const Q_DECL_OVERRIDE;
|
||||
};
|
||||
#endif // QT_NO_QCOLUMNVIEW
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif //QCOLUMNVIEW_P_H
|
||||
|
||||
#endif //QCOLUMNVIEW_P_H
|
||||
|
@ -37,8 +37,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QT_NO_QCOLUMNVIEW
|
||||
|
||||
#include "qcolumnviewgrip_p.h"
|
||||
#include <qstyleoption.h>
|
||||
#include <qpainter.h>
|
||||
@ -190,5 +188,3 @@ originalXLocation(-1)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qcolumnviewgrip_p.cpp"
|
||||
|
||||
#endif // QT_NO_QCOLUMNVIEW
|
||||
|
@ -54,7 +54,7 @@
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include <private/qwidget_p.h>
|
||||
|
||||
#ifndef QT_NO_QCOLUMNVIEW
|
||||
QT_REQUIRE_CONFIG(columnview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -98,6 +98,4 @@ public:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_QCOLUMNVIEW
|
||||
|
||||
#endif //QCOLUMNVIEWGRIP_P_H
|
||||
|
@ -608,7 +608,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_LINEEDIT
|
||||
#ifndef QT_NO_COLUMNVIEW
|
||||
#if QT_CONFIG(columnview)
|
||||
case PE_IndicatorColumnViewArrow: {
|
||||
if (const QStyleOptionViewItem *viewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
|
||||
bool reverse = (viewOpt->direction == Qt::RightToLeft);
|
||||
@ -660,7 +660,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
||||
p->restore();
|
||||
}
|
||||
break; }
|
||||
#endif //QT_NO_COLUMNVIEW
|
||||
#endif //QT_CONFIG(columnview)
|
||||
case PE_IndicatorItemViewItemDrop: {
|
||||
QRect rect = opt->rect;
|
||||
if (opt->rect.height() == 0)
|
||||
|
@ -94,6 +94,7 @@ private slots:
|
||||
void setEnvironment();
|
||||
void setProcessEnvironment_data();
|
||||
void setProcessEnvironment();
|
||||
void environmentIsSorted();
|
||||
void spaceInName();
|
||||
void setStandardInputFile();
|
||||
void setStandardOutputFile_data();
|
||||
@ -1733,6 +1734,47 @@ void tst_QProcess::setProcessEnvironment()
|
||||
}
|
||||
}
|
||||
|
||||
void tst_QProcess::environmentIsSorted()
|
||||
{
|
||||
QProcessEnvironment env;
|
||||
env.insert(QLatin1String("a"), QLatin1String("foo_a"));
|
||||
env.insert(QLatin1String("B"), QLatin1String("foo_B"));
|
||||
env.insert(QLatin1String("c"), QLatin1String("foo_c"));
|
||||
env.insert(QLatin1String("D"), QLatin1String("foo_D"));
|
||||
env.insert(QLatin1String("e"), QLatin1String("foo_e"));
|
||||
env.insert(QLatin1String("F"), QLatin1String("foo_F"));
|
||||
env.insert(QLatin1String("Path"), QLatin1String("foo_Path"));
|
||||
env.insert(QLatin1String("SystemRoot"), QLatin1String("foo_SystemRoot"));
|
||||
|
||||
const QStringList envlist = env.toStringList();
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
// The environment block passed to CreateProcess "[Requires that] All strings in the
|
||||
// environment block must be sorted alphabetically by name. The sort is case-insensitive,
|
||||
// Unicode order, without regard to locale."
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms682009(v=vs.85).aspx
|
||||
// So on Windows we sort that way.
|
||||
const QStringList expected = { QLatin1String("a=foo_a"),
|
||||
QLatin1String("B=foo_B"),
|
||||
QLatin1String("c=foo_c"),
|
||||
QLatin1String("D=foo_D"),
|
||||
QLatin1String("e=foo_e"),
|
||||
QLatin1String("F=foo_F"),
|
||||
QLatin1String("Path=foo_Path"),
|
||||
QLatin1String("SystemRoot=foo_SystemRoot") };
|
||||
#else
|
||||
const QStringList expected = { QLatin1String("B=foo_B"),
|
||||
QLatin1String("D=foo_D"),
|
||||
QLatin1String("F=foo_F"),
|
||||
QLatin1String("Path=foo_Path"),
|
||||
QLatin1String("SystemRoot=foo_SystemRoot"),
|
||||
QLatin1String("a=foo_a"),
|
||||
QLatin1String("c=foo_c"),
|
||||
QLatin1String("e=foo_e") };
|
||||
#endif
|
||||
QCOMPARE(envlist, expected);
|
||||
}
|
||||
|
||||
void tst_QProcess::systemEnvironment()
|
||||
{
|
||||
QVERIFY(!QProcess::systemEnvironment().isEmpty());
|
||||
|
@ -1,2 +1,3 @@
|
||||
[elapsed]
|
||||
windows
|
||||
osx-10.12
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include <qlocale.h>
|
||||
#include <qcollator.h>
|
||||
#include <private/qglobal_p.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@ -88,6 +89,8 @@ void tst_QCollator::compare_data()
|
||||
QTest::addColumn<int>("result");
|
||||
QTest::addColumn<int>("caseInsensitiveResult");
|
||||
QTest::addColumn<bool>("numericMode");
|
||||
QTest::addColumn<bool>("ignorePunctuation");
|
||||
QTest::addColumn<int>("punctuationResult");
|
||||
|
||||
/*
|
||||
A few tests below are commented out on the mac. It's unclear why they fail,
|
||||
@ -102,55 +105,72 @@ void tst_QCollator::compare_data()
|
||||
comparison of Latin-1 values, although I'm not sure. So I
|
||||
just test digits to make sure that it's not totally broken.
|
||||
*/
|
||||
QTest::newRow("english1") << QString("en_US") << QString("5") << QString("4") << 1 << 1 << false;
|
||||
QTest::newRow("english2") << QString("en_US") << QString("4") << QString("6") << -1 << -1 << false;
|
||||
QTest::newRow("english3") << QString("en_US") << QString("5") << QString("6") << -1 << -1 << false;
|
||||
QTest::newRow("english4") << QString("en_US") << QString("a") << QString("b") << -1 << -1 << false;
|
||||
QTest::newRow("english5") << QString("en_US") << QString("test 9") << QString("test 19") << -1 << -1 << true;
|
||||
QTest::newRow("english1") << QString("en_US") << QString("5") << QString("4") << 1 << 1 << false << false << 1;
|
||||
QTest::newRow("english2") << QString("en_US") << QString("4") << QString("6") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("english3") << QString("en_US") << QString("5") << QString("6") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("english4") << QString("en_US") << QString("a") << QString("b") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("english5") << QString("en_US") << QString("test 9") << QString("test 19") << -1 << -1 << true << false << -1;
|
||||
QTest::newRow("english6") << QString("en_US") << QString("test 9") << QString("test_19") << -1 << -1 << true << true << -1;
|
||||
QTest::newRow("english7") << QString("en_US") << QString("test_19") << QString("test 19") << 1 << 1 << true << false << 1;
|
||||
QTest::newRow("english8") << QString("en_US") << QString("test.19") << QString("test,19") << 1 << 1 << true << true << 0;
|
||||
|
||||
/*
|
||||
In Swedish, a with ring above (E5) comes before a with
|
||||
diaresis (E4), which comes before o diaresis (F6), which
|
||||
all come after z.
|
||||
*/
|
||||
QTest::newRow("swedish1") << QString("sv_SE") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << -1 << -1 << false;
|
||||
QTest::newRow("swedish2") << QString("sv_SE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1 << -1 << false;
|
||||
QTest::newRow("swedish3") << QString("sv_SE") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1 << -1 << false;
|
||||
QTest::newRow("swedish4") << QString("sv_SE") << QString::fromLatin1("z") << QString::fromLatin1("\xe5") << -1 << -1 << false;
|
||||
QTest::newRow("swedish5") << QString("sv_SE") << QString("9") << QString("19") << -1 << -1 << true;
|
||||
QTest::newRow("swedish1") << QString("sv_SE") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("swedish2") << QString("sv_SE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("swedish3") << QString("sv_SE") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("swedish4") << QString("sv_SE") << QString::fromLatin1("z") << QString::fromLatin1("\xe5") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("swedish5") << QString("sv_SE") << QString("9") << QString("19") << -1 << -1 << true << false << -1;
|
||||
QTest::newRow("swedish6") << QString("sv_SE") << QString("Test 9") << QString("Test_19") << -1 << -1 << true << true << -1;
|
||||
QTest::newRow("swedish7") << QString("sv_SE") << QString("test_19") << QString("test 19") << 1 << 1 << true << false << 1;
|
||||
QTest::newRow("swedish8") << QString("sv_SE") << QString("test.19") << QString("test,19") << 1 << 1 << true << true << 0;
|
||||
|
||||
|
||||
/*
|
||||
In Norwegian, ae (E6) comes before o with stroke (D8), which
|
||||
comes before a with ring above (E5).
|
||||
*/
|
||||
QTest::newRow("norwegian1") << QString("no_NO") << QString::fromLatin1("\xe6") << QString::fromLatin1("\xd8") << -1 << -1 << false;
|
||||
QTest::newRow("norwegian2") << QString("no_NO") << QString::fromLatin1("\xd8") << QString::fromLatin1("\xe5") << -1 << -1 << false;
|
||||
QTest::newRow("norwegian3") << QString("no_NO") << QString::fromLatin1("\xe6") << QString::fromLatin1("\xe5") << -1 << -1 << false;
|
||||
QTest::newRow("norwegian4") << QString("no_NO") << QString("9") << QString("19") << -1 << -1 << true;
|
||||
QTest::newRow("norwegian1") << QString("no_NO") << QString::fromLatin1("\xe6") << QString::fromLatin1("\xd8") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("norwegian2") << QString("no_NO") << QString::fromLatin1("\xd8") << QString::fromLatin1("\xe5") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("norwegian3") << QString("no_NO") << QString::fromLatin1("\xe6") << QString::fromLatin1("\xe5") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("norwegian4") << QString("no_NO") << QString("9") << QString("19") << -1 << -1 << true << false << -1;
|
||||
QTest::newRow("norwegian5") << QString("no_NO") << QString("Test 9") << QString("Test_19") << -1 << -1 << true << true << -1;
|
||||
QTest::newRow("norwegian6") << QString("no_NO") << QString("Test 9") << QString("Test_19") << -1 << -1 << true << true << -1;
|
||||
QTest::newRow("norwegian7") << QString("no_NO") << QString("test_19") << QString("test 19") << 1 << 1 << true << false << 1;
|
||||
QTest::newRow("norwegian8") << QString("no_NO") << QString("test.19") << QString("test,19") << 1 << 1 << true << true << 0;
|
||||
|
||||
/*
|
||||
In German, z comes *after* a with diaresis (E4),
|
||||
which comes before o diaresis (F6).
|
||||
*/
|
||||
QTest::newRow("german1") << QString("de_DE") << QString::fromLatin1("a") << QString::fromLatin1("\xe4") << -1 << -1 << false;
|
||||
QTest::newRow("german2") << QString("de_DE") << QString::fromLatin1("b") << QString::fromLatin1("\xe4") << 1 << 1 << false;
|
||||
QTest::newRow("german3") << QString("de_DE") << QString::fromLatin1("z") << QString::fromLatin1("\xe4") << 1 << 1 << false;
|
||||
QTest::newRow("german4") << QString("de_DE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1 << -1 << false;
|
||||
QTest::newRow("german5") << QString("de_DE") << QString::fromLatin1("z") << QString::fromLatin1("\xf6") << 1 << 1 << false;
|
||||
QTest::newRow("german6") << QString("de_DE") << QString::fromLatin1("\xc0") << QString::fromLatin1("\xe0") << 1 << 0 << false;
|
||||
QTest::newRow("german7") << QString("de_DE") << QString::fromLatin1("\xd6") << QString::fromLatin1("\xf6") << 1 << 0 << false;
|
||||
QTest::newRow("german8") << QString("de_DE") << QString::fromLatin1("oe") << QString::fromLatin1("\xf6") << 1 << 1 << false;
|
||||
QTest::newRow("german9") << QString("de_DE") << QString("A") << QString("a") << 1 << 0 << false;
|
||||
QTest::newRow("german10") << QString("de_DE") << QString("9") << QString("19") << -1 << -1 << true;
|
||||
QTest::newRow("german1") << QString("de_DE") << QString::fromLatin1("a") << QString::fromLatin1("\xe4") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("german2") << QString("de_DE") << QString::fromLatin1("b") << QString::fromLatin1("\xe4") << 1 << 1 << false << false << 1;
|
||||
QTest::newRow("german3") << QString("de_DE") << QString::fromLatin1("z") << QString::fromLatin1("\xe4") << 1 << 1 << false << false << 1;
|
||||
QTest::newRow("german4") << QString("de_DE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("german5") << QString("de_DE") << QString::fromLatin1("z") << QString::fromLatin1("\xf6") << 1 << 1 << false << false << 1;
|
||||
QTest::newRow("german6") << QString("de_DE") << QString::fromLatin1("\xc0") << QString::fromLatin1("\xe0") << 1 << 0 << false << false << 0;
|
||||
QTest::newRow("german7") << QString("de_DE") << QString::fromLatin1("\xd6") << QString::fromLatin1("\xf6") << 1 << 0 << false << false << 0;
|
||||
QTest::newRow("german8") << QString("de_DE") << QString::fromLatin1("oe") << QString::fromLatin1("\xf6") << 1 << 1 << false << false << 1;
|
||||
QTest::newRow("german9") << QString("de_DE") << QString("A") << QString("a") << 1 << 0 << false << false << 0;
|
||||
QTest::newRow("german10") << QString("de_DE") << QString("9") << QString("19") << -1 << -1 << true << false << -1;
|
||||
QTest::newRow("german11") << QString("de_DE") << QString("Test 9") << QString("Test_19") << -1 << -1 << true << true << -1;
|
||||
QTest::newRow("german12") << QString("de_DE") << QString("test_19") << QString("test 19") << 1 << 1 << true << false << 1;
|
||||
QTest::newRow("german13") << QString("de_DE") << QString("test.19") << QString("test,19") << 1 << 1 << true << true << 0;
|
||||
|
||||
/*
|
||||
French sorting of e and e with accent
|
||||
*/
|
||||
QTest::newRow("french1") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("e") << 1 << 1 << false;
|
||||
QTest::newRow("french2") << QString("fr_FR") << QString::fromLatin1("\xe9t") << QString::fromLatin1("et") << 1 << 1 << false;
|
||||
QTest::newRow("french3") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("d") << 1 << 1 << false;
|
||||
QTest::newRow("french4") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("f") << -1 << -1 << false;
|
||||
QTest::newRow("french5") << QString("fr_FR") << QString("9") << QString("19") << -1 << -1 << true;
|
||||
QTest::newRow("french1") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("e") << 1 << 1 << false << false << 1;
|
||||
QTest::newRow("french2") << QString("fr_FR") << QString::fromLatin1("\xe9t") << QString::fromLatin1("et") << 1 << 1 << false << false << 1;
|
||||
QTest::newRow("french3") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("d") << 1 << 1 << false << false << 1;
|
||||
QTest::newRow("french4") << QString("fr_FR") << QString::fromLatin1("\xe9") << QString::fromLatin1("f") << -1 << -1 << false << false << -1;
|
||||
QTest::newRow("french5") << QString("fr_FR") << QString("9") << QString("19") << -1 << -1 << true << false << -1;
|
||||
QTest::newRow("french6") << QString("fr_FR") << QString("Test 9") << QString("Test_19") << -1 << -1 << true << true << -1;
|
||||
QTest::newRow("french7") << QString("fr_FR") << QString("test_19") << QString("test 19") << 1 << 1 << true << false << 1;
|
||||
QTest::newRow("french8") << QString("fr_FR") << QString("test.19") << QString("test,19") << 1 << 1 << true << true << 0;
|
||||
}
|
||||
|
||||
|
||||
@ -162,6 +182,8 @@ void tst_QCollator::compare()
|
||||
QFETCH(int, result);
|
||||
QFETCH(int, caseInsensitiveResult);
|
||||
QFETCH(bool, numericMode);
|
||||
QFETCH(bool, ignorePunctuation);
|
||||
QFETCH(int, punctuationResult);
|
||||
|
||||
QCollator collator(locale);
|
||||
|
||||
@ -176,6 +198,10 @@ void tst_QCollator::compare()
|
||||
QCOMPARE(collator.compare(s1, s2), result);
|
||||
collator.setCaseSensitivity(Qt::CaseInsensitive);
|
||||
QCOMPARE(collator.compare(s1, s2), caseInsensitiveResult);
|
||||
#if !QT_CONFIG(iconv)
|
||||
collator.setIgnorePunctuation(ignorePunctuation);
|
||||
QCOMPARE(collator.compare(s1, s2), punctuationResult);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
[interpolation]
|
||||
windows
|
||||
osx-10.12
|
||||
[duration]
|
||||
windows
|
||||
[frameRate]
|
||||
osx-10.12
|
||||
|
@ -4,6 +4,6 @@ TARGET = tst_qicon
|
||||
QT += testlib
|
||||
qtHaveModule(widgets): QT += widgets
|
||||
SOURCES += tst_qicon.cpp
|
||||
RESOURCES = tst_qicon.qrc
|
||||
RESOURCES = tst_qicon.qrc tst_qicon.cpp
|
||||
|
||||
TESTDATA += icons/* second_icons/* *.png *.svg *.svgz
|
||||
|
@ -83,7 +83,7 @@ bool tst_QIcon::haveImageFormat(QByteArray const& desiredFormat)
|
||||
tst_QIcon::tst_QIcon()
|
||||
: m_pngImageFileName(QFINDTESTDATA("image.png"))
|
||||
, m_pngRectFileName(QFINDTESTDATA("rect.png"))
|
||||
, m_sourceFileName(QFINDTESTDATA(__FILE__))
|
||||
, m_sourceFileName(":/tst_qicon.cpp")
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ void tst_QImageReader::getSetCheck()
|
||||
}
|
||||
|
||||
tst_QImageReader::tst_QImageReader() :
|
||||
m_temporaryDir(QStringLiteral("tst_qimagereaderXXXXXX"))
|
||||
m_temporaryDir(QDir::tempPath() + QStringLiteral("/tst_qimagereaderXXXXXX"))
|
||||
{
|
||||
m_temporaryDir.setAutoRemove(true);
|
||||
}
|
||||
@ -728,13 +728,15 @@ void tst_QImageReader::imageFormatBeforeRead()
|
||||
|
||||
SKIP_IF_UNSUPPORTED(format);
|
||||
|
||||
QImageReader reader(fileName);
|
||||
QImageReader reader(prefix + fileName);
|
||||
QVERIFY(reader.canRead());
|
||||
if (reader.supportsOption(QImageIOHandler::ImageFormat)) {
|
||||
QImage::Format fileFormat = reader.imageFormat();
|
||||
QCOMPARE(fileFormat, imageFormat);
|
||||
QSize size = reader.size();
|
||||
QImage image(size, fileFormat);
|
||||
QVERIFY(reader.read(&image));
|
||||
QEXPECT_FAIL("bmp-3", "Semi-transparent BMPs not predicted", Continue);
|
||||
QCOMPARE(image.format(), fileFormat);
|
||||
}
|
||||
}
|
||||
|
2
tests/auto/gui/kernel/qguieventloop/BLACKLIST
Normal file
2
tests/auto/gui/kernel/qguieventloop/BLACKLIST
Normal file
@ -0,0 +1,2 @@
|
||||
[processEvents]
|
||||
osx-10.12
|
@ -6,7 +6,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>416</width>
|
||||
<height>488</height>
|
||||
<height>515</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -16,44 +16,24 @@
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4" >
|
||||
<item>
|
||||
<widget class="QComboBox" name="unit" />
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="QGroupBox" name="groupBox_2" >
|
||||
<property name="title" >
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Paper</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="pageSizeLabel" >
|
||||
<property name="text" >
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="pageSizeLabel">
|
||||
<property name="text">
|
||||
<string>Page size:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>paperSize</cstring>
|
||||
<property name="buddy">
|
||||
<cstring>pageSizeCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="paperSize" />
|
||||
<widget class="QComboBox" name="pageSizeCombo" />
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="widthLabel" >
|
||||
@ -61,14 +41,14 @@
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>paperWidth</cstring>
|
||||
<cstring>pageWidth</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3" >
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="paperWidth" >
|
||||
<widget class="QDoubleSpinBox" name="pageWidth" >
|
||||
<property name="maximum" >
|
||||
<double>9999.989999999999782</double>
|
||||
</property>
|
||||
@ -80,12 +60,12 @@
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>paperHeight</cstring>
|
||||
<cstring>pageHeight</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="paperHeight" >
|
||||
<widget class="QDoubleSpinBox" name="pageHeight" >
|
||||
<property name="maximum" >
|
||||
<double>9999.989999999999782</double>
|
||||
</property>
|
||||
@ -122,9 +102,32 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox_3" >
|
||||
<property name="title" >
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QComboBox" name="unitCombo"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="1" rowspan="2">
|
||||
<widget class="QWidget" name="preview" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Orientation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||
@ -175,12 +178,9 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="2" column="1" >
|
||||
<widget class="QWidget" native="1" name="preview" />
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="title" >
|
||||
<item row="3" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Margins</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" >
|
||||
@ -280,9 +280,25 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QDoubleSpinBox" name="bottomMargin" >
|
||||
<property name="toolTip" >
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="bottomMargin">
|
||||
<property name="toolTip">
|
||||
<string>bottom margin</string>
|
||||
</property>
|
||||
<property name="accessibleName" >
|
||||
@ -296,28 +312,15 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<spacer name="horizontalSpacer_2" >
|
||||
<property name="orientation" >
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<spacer name="horizontalSpacer_5" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
@ -333,15 +336,57 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="pagesPerSheetButtonGroup">
|
||||
<property name="title">
|
||||
<string>Page Layout</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="pagesPerSheetCombo"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Page order:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="pagesPerSheetLayoutCombo"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Pages per sheet:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'qpagesetupwidget.ui'
|
||||
**
|
||||
** Created by: Qt User Interface Compiler version 5.0.0
|
||||
** Created by: Qt User Interface Compiler version 5.9.0
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
********************************************************************************/
|
||||
@ -31,21 +31,22 @@ class Ui_QPageSetupWidget
|
||||
{
|
||||
public:
|
||||
QGridLayout *gridLayout_3;
|
||||
QHBoxLayout *horizontalLayout_4;
|
||||
QComboBox *unit;
|
||||
QSpacerItem *horizontalSpacer_3;
|
||||
QGroupBox *groupBox_2;
|
||||
QGridLayout *gridLayout_2;
|
||||
QLabel *pageSizeLabel;
|
||||
QComboBox *paperSize;
|
||||
QComboBox *pageSizeCombo;
|
||||
QLabel *widthLabel;
|
||||
QHBoxLayout *horizontalLayout_3;
|
||||
QDoubleSpinBox *paperWidth;
|
||||
QDoubleSpinBox *pageWidth;
|
||||
QLabel *heightLabel;
|
||||
QDoubleSpinBox *paperHeight;
|
||||
QDoubleSpinBox *pageHeight;
|
||||
QLabel *paperSourceLabel;
|
||||
QComboBox *paperSource;
|
||||
QSpacerItem *horizontalSpacer_4;
|
||||
QHBoxLayout *horizontalLayout_4;
|
||||
QComboBox *unitCombo;
|
||||
QSpacerItem *horizontalSpacer_3;
|
||||
QWidget *preview;
|
||||
QGroupBox *groupBox_3;
|
||||
QVBoxLayout *verticalLayout;
|
||||
QRadioButton *portrait;
|
||||
@ -53,7 +54,6 @@ public:
|
||||
QRadioButton *reverseLandscape;
|
||||
QRadioButton *reversePortrait;
|
||||
QSpacerItem *verticalSpacer_5;
|
||||
QWidget *preview;
|
||||
QGroupBox *groupBox;
|
||||
QHBoxLayout *horizontalLayout_2;
|
||||
QGridLayout *gridLayout;
|
||||
@ -64,33 +64,26 @@ public:
|
||||
QSpacerItem *horizontalSpacer;
|
||||
QDoubleSpinBox *rightMargin;
|
||||
QSpacerItem *horizontalSpacer_8;
|
||||
QDoubleSpinBox *bottomMargin;
|
||||
QSpacerItem *horizontalSpacer_2;
|
||||
QDoubleSpinBox *bottomMargin;
|
||||
QSpacerItem *horizontalSpacer_5;
|
||||
QGroupBox *pagesPerSheetButtonGroup;
|
||||
QGridLayout *gridLayout_4;
|
||||
QComboBox *pagesPerSheetCombo;
|
||||
QSpacerItem *horizontalSpacer_6;
|
||||
QLabel *label;
|
||||
QComboBox *pagesPerSheetLayoutCombo;
|
||||
QLabel *label_2;
|
||||
QSpacerItem *verticalSpacer;
|
||||
|
||||
void setupUi(QWidget *QPageSetupWidget)
|
||||
{
|
||||
if (QPageSetupWidget->objectName().isEmpty())
|
||||
QPageSetupWidget->setObjectName(QStringLiteral("QPageSetupWidget"));
|
||||
QPageSetupWidget->resize(416, 488);
|
||||
QPageSetupWidget->resize(416, 515);
|
||||
gridLayout_3 = new QGridLayout(QPageSetupWidget);
|
||||
gridLayout_3->setContentsMargins(0, 0, 0, 0);
|
||||
gridLayout_3->setObjectName(QStringLiteral("gridLayout_3"));
|
||||
horizontalLayout_4 = new QHBoxLayout();
|
||||
horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4"));
|
||||
unit = new QComboBox(QPageSetupWidget);
|
||||
unit->setObjectName(QStringLiteral("unit"));
|
||||
|
||||
horizontalLayout_4->addWidget(unit);
|
||||
|
||||
horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
horizontalLayout_4->addItem(horizontalSpacer_3);
|
||||
|
||||
|
||||
gridLayout_3->addLayout(horizontalLayout_4, 0, 0, 1, 2);
|
||||
|
||||
groupBox_2 = new QGroupBox(QPageSetupWidget);
|
||||
groupBox_2->setObjectName(QStringLiteral("groupBox_2"));
|
||||
gridLayout_2 = new QGridLayout(groupBox_2);
|
||||
@ -100,10 +93,10 @@ public:
|
||||
|
||||
gridLayout_2->addWidget(pageSizeLabel, 0, 0, 1, 1);
|
||||
|
||||
paperSize = new QComboBox(groupBox_2);
|
||||
paperSize->setObjectName(QStringLiteral("paperSize"));
|
||||
pageSizeCombo = new QComboBox(groupBox_2);
|
||||
pageSizeCombo->setObjectName(QStringLiteral("pageSizeCombo"));
|
||||
|
||||
gridLayout_2->addWidget(paperSize, 0, 1, 1, 1);
|
||||
gridLayout_2->addWidget(pageSizeCombo, 0, 1, 1, 1);
|
||||
|
||||
widthLabel = new QLabel(groupBox_2);
|
||||
widthLabel->setObjectName(QStringLiteral("widthLabel"));
|
||||
@ -112,22 +105,22 @@ public:
|
||||
|
||||
horizontalLayout_3 = new QHBoxLayout();
|
||||
horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3"));
|
||||
paperWidth = new QDoubleSpinBox(groupBox_2);
|
||||
paperWidth->setObjectName(QStringLiteral("paperWidth"));
|
||||
paperWidth->setMaximum(9999.99);
|
||||
pageWidth = new QDoubleSpinBox(groupBox_2);
|
||||
pageWidth->setObjectName(QStringLiteral("pageWidth"));
|
||||
pageWidth->setMaximum(9999.99);
|
||||
|
||||
horizontalLayout_3->addWidget(paperWidth);
|
||||
horizontalLayout_3->addWidget(pageWidth);
|
||||
|
||||
heightLabel = new QLabel(groupBox_2);
|
||||
heightLabel->setObjectName(QStringLiteral("heightLabel"));
|
||||
|
||||
horizontalLayout_3->addWidget(heightLabel);
|
||||
|
||||
paperHeight = new QDoubleSpinBox(groupBox_2);
|
||||
paperHeight->setObjectName(QStringLiteral("paperHeight"));
|
||||
paperHeight->setMaximum(9999.99);
|
||||
pageHeight = new QDoubleSpinBox(groupBox_2);
|
||||
pageHeight->setObjectName(QStringLiteral("pageHeight"));
|
||||
pageHeight->setMaximum(9999.99);
|
||||
|
||||
horizontalLayout_3->addWidget(paperHeight);
|
||||
horizontalLayout_3->addWidget(pageHeight);
|
||||
|
||||
|
||||
gridLayout_2->addLayout(horizontalLayout_3, 1, 1, 1, 1);
|
||||
@ -149,6 +142,25 @@ public:
|
||||
|
||||
gridLayout_3->addWidget(groupBox_2, 1, 0, 1, 2);
|
||||
|
||||
horizontalLayout_4 = new QHBoxLayout();
|
||||
horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4"));
|
||||
unitCombo = new QComboBox(QPageSetupWidget);
|
||||
unitCombo->setObjectName(QStringLiteral("unitCombo"));
|
||||
|
||||
horizontalLayout_4->addWidget(unitCombo);
|
||||
|
||||
horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
horizontalLayout_4->addItem(horizontalSpacer_3);
|
||||
|
||||
|
||||
gridLayout_3->addLayout(horizontalLayout_4, 0, 0, 1, 2);
|
||||
|
||||
preview = new QWidget(QPageSetupWidget);
|
||||
preview->setObjectName(QStringLiteral("preview"));
|
||||
|
||||
gridLayout_3->addWidget(preview, 2, 1, 2, 1);
|
||||
|
||||
groupBox_3 = new QGroupBox(QPageSetupWidget);
|
||||
groupBox_3->setObjectName(QStringLiteral("groupBox_3"));
|
||||
verticalLayout = new QVBoxLayout(groupBox_3);
|
||||
@ -181,11 +193,6 @@ public:
|
||||
|
||||
gridLayout_3->addWidget(groupBox_3, 2, 0, 1, 1);
|
||||
|
||||
preview = new QWidget(QPageSetupWidget);
|
||||
preview->setObjectName(QStringLiteral("preview"));
|
||||
|
||||
gridLayout_3->addWidget(preview, 2, 1, 2, 1);
|
||||
|
||||
groupBox = new QGroupBox(QPageSetupWidget);
|
||||
groupBox->setObjectName(QStringLiteral("groupBox"));
|
||||
horizontalLayout_2 = new QHBoxLayout(groupBox);
|
||||
@ -230,6 +237,10 @@ public:
|
||||
|
||||
gridLayout->addLayout(horizontalLayout, 1, 0, 1, 3);
|
||||
|
||||
horizontalSpacer_2 = new QSpacerItem(0, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
|
||||
|
||||
gridLayout->addItem(horizontalSpacer_2, 0, 2, 1, 1);
|
||||
|
||||
bottomMargin = new QDoubleSpinBox(groupBox);
|
||||
bottomMargin->setObjectName(QStringLiteral("bottomMargin"));
|
||||
bottomMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
|
||||
@ -237,10 +248,6 @@ public:
|
||||
|
||||
gridLayout->addWidget(bottomMargin, 2, 1, 1, 1);
|
||||
|
||||
horizontalSpacer_2 = new QSpacerItem(0, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
|
||||
|
||||
gridLayout->addItem(horizontalSpacer_2, 0, 2, 1, 1);
|
||||
|
||||
horizontalSpacer_5 = new QSpacerItem(0, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
|
||||
|
||||
gridLayout->addItem(horizontalSpacer_5, 0, 0, 1, 1);
|
||||
@ -251,14 +258,45 @@ public:
|
||||
|
||||
gridLayout_3->addWidget(groupBox, 3, 0, 1, 1);
|
||||
|
||||
verticalSpacer = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
pagesPerSheetButtonGroup = new QGroupBox(QPageSetupWidget);
|
||||
pagesPerSheetButtonGroup->setObjectName(QStringLiteral("pagesPerSheetButtonGroup"));
|
||||
gridLayout_4 = new QGridLayout(pagesPerSheetButtonGroup);
|
||||
gridLayout_4->setObjectName(QStringLiteral("gridLayout_4"));
|
||||
pagesPerSheetCombo = new QComboBox(pagesPerSheetButtonGroup);
|
||||
pagesPerSheetCombo->setObjectName(QStringLiteral("pagesPerSheetCombo"));
|
||||
|
||||
gridLayout_3->addItem(verticalSpacer, 4, 0, 1, 1);
|
||||
gridLayout_4->addWidget(pagesPerSheetCombo, 0, 1, 1, 1);
|
||||
|
||||
horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
gridLayout_4->addItem(horizontalSpacer_6, 0, 2, 1, 1);
|
||||
|
||||
label = new QLabel(pagesPerSheetButtonGroup);
|
||||
label->setObjectName(QStringLiteral("label"));
|
||||
|
||||
gridLayout_4->addWidget(label, 1, 0, 1, 1);
|
||||
|
||||
pagesPerSheetLayoutCombo = new QComboBox(pagesPerSheetButtonGroup);
|
||||
pagesPerSheetLayoutCombo->setObjectName(QStringLiteral("pagesPerSheetLayoutCombo"));
|
||||
|
||||
gridLayout_4->addWidget(pagesPerSheetLayoutCombo, 1, 1, 1, 1);
|
||||
|
||||
label_2 = new QLabel(pagesPerSheetButtonGroup);
|
||||
label_2->setObjectName(QStringLiteral("label_2"));
|
||||
|
||||
gridLayout_4->addWidget(label_2, 0, 0, 1, 1);
|
||||
|
||||
|
||||
gridLayout_3->addWidget(pagesPerSheetButtonGroup, 5, 0, 1, 2);
|
||||
|
||||
verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
|
||||
gridLayout_3->addItem(verticalSpacer, 6, 0, 1, 1);
|
||||
|
||||
#ifndef QT_NO_SHORTCUT
|
||||
pageSizeLabel->setBuddy(paperSize);
|
||||
widthLabel->setBuddy(paperWidth);
|
||||
heightLabel->setBuddy(paperHeight);
|
||||
pageSizeLabel->setBuddy(pageSizeCombo);
|
||||
widthLabel->setBuddy(pageWidth);
|
||||
heightLabel->setBuddy(pageHeight);
|
||||
paperSourceLabel->setBuddy(paperSource);
|
||||
#endif // QT_NO_SHORTCUT
|
||||
|
||||
@ -305,6 +343,9 @@ public:
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
bottomMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "bottom margin", Q_NULLPTR));
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
pagesPerSheetButtonGroup->setTitle(QApplication::translate("QPageSetupWidget", "Page Layout", Q_NULLPTR));
|
||||
label->setText(QApplication::translate("QPageSetupWidget", "Page order:", Q_NULLPTR));
|
||||
label_2->setText(QApplication::translate("QPageSetupWidget", "Pages per sheet:", Q_NULLPTR));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
@ -7,7 +7,7 @@ ubuntu-14.04
|
||||
ubuntu-16.04
|
||||
b2qt
|
||||
[restoreVersion1Geometry]
|
||||
ubuntu-14.04
|
||||
xcb
|
||||
osx
|
||||
[updateWhileMinimized]
|
||||
ubuntu-14.04
|
||||
|
@ -3195,9 +3195,6 @@ void tst_QWidget::restoreVersion1Geometry()
|
||||
widget.showNormal();
|
||||
QTest::qWait(10);
|
||||
|
||||
if (m_platform == QStringLiteral("xcb"))
|
||||
QSKIP("QTBUG-26421");
|
||||
|
||||
if (expectedWindowState != Qt::WindowNoState) {
|
||||
// restoring from maximized or fullscreen, we can only restore to the normal geometry
|
||||
QTRY_COMPARE(widget.geometry(), expectedNormalGeometry);
|
||||
|
@ -817,22 +817,45 @@ static bool testForColors(const QImage& image, const QColor& color, bool ensureP
|
||||
return false;
|
||||
}
|
||||
|
||||
static const QList<QWidget*> sample_widgets() // returning const to avoid detaching when passing to range-for
|
||||
class TestDialog : public QDialog {
|
||||
public:
|
||||
explicit TestDialog(const QString &styleSheet);
|
||||
|
||||
QWidgetList widgets() const { return m_widgets; }
|
||||
QLineEdit *focusDummy() const { return m_focusDummy; }
|
||||
|
||||
private:
|
||||
void addWidget(QWidget *w)
|
||||
{
|
||||
w->setStyleSheet(m_styleSheet);
|
||||
m_layout->addWidget(w);
|
||||
m_widgets.append(w);
|
||||
}
|
||||
|
||||
const QString m_styleSheet;
|
||||
QVBoxLayout* m_layout;
|
||||
QLineEdit *m_focusDummy;
|
||||
QWidgetList m_widgets;
|
||||
};
|
||||
|
||||
TestDialog::TestDialog(const QString &styleSheet) :
|
||||
m_styleSheet(styleSheet),
|
||||
m_layout(new QVBoxLayout(this)),
|
||||
m_focusDummy(new QLineEdit)
|
||||
{
|
||||
QList<QWidget *> widgets;
|
||||
widgets << new QPushButton("TESTING TESTING");
|
||||
widgets << new QLineEdit("TESTING TESTING");
|
||||
widgets << new QLabel("TESTING TESTING");
|
||||
m_layout->addWidget(m_focusDummy); // Avoids initial focus.
|
||||
addWidget(new QPushButton("TESTING TESTING"));
|
||||
addWidget(new QLineEdit("TESTING TESTING"));
|
||||
addWidget(new QLabel("TESTING TESTING"));
|
||||
QSpinBox *spinbox = new QSpinBox;
|
||||
spinbox->setMaximum(1000000000);
|
||||
spinbox->setValue(123456789);
|
||||
widgets << spinbox;
|
||||
addWidget(spinbox);
|
||||
QComboBox *combobox = new QComboBox;
|
||||
combobox->setEditable(true);
|
||||
combobox->addItems(QStringList() << "TESTING TESTING");
|
||||
widgets << combobox;
|
||||
widgets << new QLabel("<b>TESTING TESTING</b>");
|
||||
return widgets;
|
||||
addWidget(spinbox);
|
||||
addWidget(new QLabel("<b>TESTING TESTING</b>"));
|
||||
}
|
||||
|
||||
void tst_QStyleSheetStyle::focusColors()
|
||||
@ -852,28 +875,21 @@ void tst_QStyleSheetStyle::focusColors()
|
||||
"That doesn't mean that the feature doesn't work in practice.");
|
||||
#endif
|
||||
|
||||
TestDialog frame(QStringLiteral("*:focus { border:none; background: #e8ff66; color: #ff0084 }"));
|
||||
frame.setWindowTitle(QTest::currentTestFunction());
|
||||
|
||||
for (QWidget *widget : sample_widgets()) {
|
||||
QDialog frame;
|
||||
QLayout* layout = new QGridLayout;
|
||||
centerOnScreen(&frame);
|
||||
frame.show();
|
||||
|
||||
QLineEdit* dummy = new QLineEdit; // Avoids initial focus.
|
||||
QApplication::setActiveWindow(&frame);
|
||||
QVERIFY(QTest::qWaitForWindowActive(&frame));
|
||||
|
||||
widget->setStyleSheet("*:focus { border:none; background: #e8ff66; color: #ff0084 }");
|
||||
|
||||
layout->addWidget(dummy);
|
||||
layout->addWidget(widget);
|
||||
frame.setLayout(layout);
|
||||
|
||||
centerOnScreen(&frame);
|
||||
frame.show();
|
||||
QApplication::setActiveWindow(&frame);
|
||||
QVERIFY(QTest::qWaitForWindowActive(&frame));
|
||||
for (QWidget *widget : frame.widgets()) {
|
||||
widget->setFocus();
|
||||
QApplication::processEvents();
|
||||
|
||||
QImage image(frame.width(), frame.height(), QImage::Format_ARGB32);
|
||||
frame.render(&image);
|
||||
QImage image(widget->width(), widget->height(), QImage::Format_ARGB32);
|
||||
widget->render(&image);
|
||||
if (image.depth() < 24)
|
||||
QSKIP("Test doesn't support color depth < 24");
|
||||
|
||||
@ -896,32 +912,35 @@ void tst_QStyleSheetStyle::hoverColors()
|
||||
#ifdef Q_OS_OSX
|
||||
QSKIP("This test is fragile on Mac, most likely due to QTBUG-33959.");
|
||||
#endif
|
||||
TestDialog frame(QStringLiteral("*:hover { border:none; background: #e8ff66; color: #ff0084 }"));
|
||||
frame.setWindowTitle(QTest::currentTestFunction());
|
||||
|
||||
for (QWidget *widget : sample_widgets()) {
|
||||
//without Qt::X11BypassWindowManagerHint the window manager may move the window after we moved the cursor
|
||||
QDialog frame(0, Qt::X11BypassWindowManagerHint);
|
||||
QLayout* layout = new QGridLayout;
|
||||
centerOnScreen(&frame);
|
||||
// Move the mouse cursor out of the way to suppress spontaneous QEvent::Enter
|
||||
// events interfering with QApplicationPrivate::dispatchEnterLeave().
|
||||
// Mouse events can then be sent directly to the QWindow instead of the
|
||||
// QWidget, triggering the enter/leave handling within the dialog window,
|
||||
// speeding up the test.
|
||||
QCursor::setPos(frame.geometry().topLeft() - QPoint(100, 0));
|
||||
frame.show();
|
||||
|
||||
QLineEdit* dummy = new QLineEdit;
|
||||
QApplication::setActiveWindow(&frame);
|
||||
QVERIFY(QTest::qWaitForWindowActive(&frame));
|
||||
|
||||
widget->setStyleSheet("*:hover { border:none; background: #e8ff66; color: #ff0084 }");
|
||||
QWindow *frameWindow = frame.windowHandle();
|
||||
QVERIFY(frameWindow);
|
||||
|
||||
layout->addWidget(dummy);
|
||||
layout->addWidget(widget);
|
||||
frame.setLayout(layout);
|
||||
const QPoint dummyPos = frame.focusDummy()->geometry().center();
|
||||
QTest::mouseMove(frameWindow, dummyPos);
|
||||
|
||||
centerOnScreen(&frame);
|
||||
frame.show();
|
||||
|
||||
QApplication::setActiveWindow(&frame);
|
||||
QVERIFY(QTest::qWaitForWindowActive(&frame));
|
||||
for (QWidget *widget : frame.widgets()) {
|
||||
//move the mouse inside the widget, it should be colored
|
||||
QTest::mouseMove ( widget, QPoint(6,6));
|
||||
const QRect widgetGeometry = widget->geometry();
|
||||
QTest::mouseMove(frameWindow, widgetGeometry.center());
|
||||
QTRY_VERIFY2(widget->testAttribute(Qt::WA_UnderMouse), widget->metaObject()->className());
|
||||
|
||||
QTRY_VERIFY(widget->testAttribute(Qt::WA_UnderMouse));
|
||||
|
||||
QImage image(frame.width(), frame.height(), QImage::Format_ARGB32);
|
||||
frame.render(&image);
|
||||
QImage image(widgetGeometry.size(), QImage::Format_ARGB32);
|
||||
widget->render(&image);
|
||||
|
||||
QVERIFY2(testForColors(image, QColor(0xe8, 0xff, 0x66)),
|
||||
(QString::fromLatin1(widget->metaObject()->className())
|
||||
@ -931,10 +950,10 @@ void tst_QStyleSheetStyle::hoverColors()
|
||||
+ " did not contain text color #ff0084").toLocal8Bit().constData());
|
||||
|
||||
//move the mouse outside the widget, it should NOT be colored
|
||||
QTest::mouseMove ( dummy, QPoint(5,5));
|
||||
QTest::qWait(60);
|
||||
QTest::mouseMove(frameWindow, dummyPos);
|
||||
QTRY_VERIFY2(frame.focusDummy()->testAttribute(Qt::WA_UnderMouse), "FocusDummy");
|
||||
|
||||
frame.render(&image);
|
||||
widget->render(&image);
|
||||
|
||||
QVERIFY2(!testForColors(image, QColor(0xe8, 0xff, 0x66)),
|
||||
(QString::fromLatin1(widget->metaObject()->className())
|
||||
@ -944,10 +963,10 @@ void tst_QStyleSheetStyle::hoverColors()
|
||||
+ " did contain text color #ff0084").toLocal8Bit().constData());
|
||||
|
||||
//move the mouse again inside the widget, it should be colored
|
||||
QTest::mouseMove (widget, QPoint(5,5));
|
||||
QTRY_VERIFY(widget->testAttribute(Qt::WA_UnderMouse));
|
||||
QTest::mouseMove (frameWindow, widgetGeometry.center());
|
||||
QTRY_VERIFY2(widget->testAttribute(Qt::WA_UnderMouse), widget->metaObject()->className());
|
||||
|
||||
frame.render(&image);
|
||||
widget->render(&image);
|
||||
|
||||
QVERIFY2(testForColors(image, QColor(0xe8, 0xff, 0x66)),
|
||||
(QString::fromLatin1(widget->metaObject()->className())
|
||||
|
@ -3,3 +3,5 @@ osx
|
||||
[tileSubWindows]
|
||||
osx
|
||||
xcb
|
||||
[resizeTimer]
|
||||
osx
|
||||
|
@ -300,7 +300,7 @@ QFileDialog::Options FileDialogPanel::options() const
|
||||
result |= QFileDialog::DontConfirmOverwrite;
|
||||
if (!m_native->isChecked())
|
||||
result |= QFileDialog::DontUseNativeDialog;
|
||||
if (!m_customDirIcons->isChecked())
|
||||
if (m_customDirIcons->isChecked())
|
||||
result |= QFileDialog::DontUseCustomDirectoryIcons;
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user