Merge commit 'dev' into 'wip/cmake-merge'

Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
This commit is contained in:
Tobias Hunger 2019-04-16 16:32:08 +02:00
commit 6630937e63
4763 changed files with 440518 additions and 202726 deletions

1
.gitignore vendored
View File

@ -101,7 +101,6 @@ qt*-config.pri
/bin/qhelpgenerator
/bin/qlalr
/bin/qml
/bin/qml1plugindump
/bin/qmleasing
/bin/qmlimportscanner
/bin/qmljs

View File

@ -4,4 +4,4 @@ CONFIG += warning_clean
QT_SOURCE_TREE = $$PWD
QT_BUILD_TREE = $$shadowed($$PWD)
MODULE_VERSION = 5.13.0
MODULE_VERSION = 5.14.0

View File

@ -7,4 +7,3 @@ or follow one of these links:
Mac OS X: http://doc.qt.io/qt-%SHORTVERSION%/osx-building.html
Windows: http://doc.qt.io/qt-%SHORTVERSION%/windows-building.html
X11 Platforms: http://doc.qt.io/qt-%SHORTVERSION%/linux-building.html
Windows CE: http://doc.qt.io/qt-%SHORTVERSION%/install-wince.html

View File

@ -941,7 +941,7 @@ foreach my $lib (@modules_to_sync) {
my %master_contents = ();
#remove the old files
if($remove_stale) {
if ($remove_stale && !$minimal) {
my %injections = ();
for my $p (keys %inject_headers) {
next unless ($p =~ /^\Q$dir\E(\/|$)/);

View File

@ -1 +0,0 @@
#define HEADER_H

View File

@ -1,4 +0,0 @@
CONFIG += precompile_header
PRECOMPILED_DIR = .pch
PRECOMPILED_HEADER = header.h
SOURCES = source.cpp

View File

@ -1 +0,0 @@
OBJECTIVE_SOURCES = corewlantest.mm

View File

@ -1 +0,0 @@
SOURCES = gnu-libiconv.cpp

View File

@ -1,2 +0,0 @@
SOURCES = iconv.cpp
mac|mingw|openbsd|qnx|haiku:LIBS += -liconv

View File

@ -1 +0,0 @@
SOURCES = openssl.cpp

View File

@ -1,58 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2017 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$
**
****************************************************************************/
// This is a header-only test. Qt does not rely on linking to a Vulkan library directly.
#include <vulkan/vulkan.h>
// The pData parameter has changed from uint32_t* to void* at some point.
// Ensure the headers have the updated one to prevent compile errors later on.
PFN_vkCmdUpdateBuffer cmdUpdBuf;
void testUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData)
{
cmdUpdBuf(commandBuffer, dstBuffer, dstOffset, dataSize, pData);
}
int main(int, char **)
{
VkInstanceCreateInfo info;
testUpdateBuffer(0, 0, 0, 0, 0);
return 0;
}

View File

@ -1 +0,0 @@
SOURCES = vulkan.cpp

View File

@ -1 +0,0 @@
SOURCES = ../gnu-libiconv/gnu-libiconv.cpp

View File

@ -1 +0,0 @@
SOURCES = cxx11_random.cpp

View File

@ -1,47 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 Raphael Gozzo <raphael.rg91@gmail.com>
** Contact: http://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$
**
****************************************************************************/
#include <sys/stat.h>
int main(int, char **)
{
futimens(-1,0);
return 0;
}

View File

@ -1,6 +0,0 @@
SOURCES += futimens.cpp
# Block futimens() on Apple platforms unless it's available on ALL deployment
# targets. This simplifies the logic at the call site dramatically, as it isn't
# strictly needed compared to futimes().
darwin: QMAKE_CXXFLAGS += -Werror=unguarded-availability

View File

@ -1,47 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 Raphael Gozzo <raphael.rg91@gmail.com>
** Contact: http://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$
**
****************************************************************************/
#include <sys/time.h>
int main(int, char **)
{
futimes(-1,0);
return 0;
}

View File

@ -1 +0,0 @@
SOURCES += futimes.cpp

View File

@ -1 +0,0 @@
SOURCES = getauxval.cpp

View File

@ -1 +0,0 @@
SOURCES = getentropy.cpp

View File

@ -1,7 +0,0 @@
# The library is expected to be the same as in ES 2.0 (libGLESv2).
# The difference is the header and the presence of the functions in
# the library.
SOURCES = opengles32.cpp
CONFIG -= qt

View File

@ -1,48 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2017 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$
**
****************************************************************************/
#include <openssl/opensslv.h>
#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L
# error "OpenSSL >= 1.1 is required"
#endif
int main()
{
}

View File

@ -1,2 +0,0 @@
SOURCES = openssl.cpp
CONFIG -= x11 qt

View File

@ -1,52 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2017 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$
**
****************************************************************************/
#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>
#if RENDER_MAJOR == 0 && RENDER_MINOR < 5
# error "Required Xrender version 0.6 not found."
#else
int main(int, char **)
{
XRenderPictFormat *format;
format = 0;
return 0;
}
#endif

View File

@ -1,3 +0,0 @@
SOURCES = xrender.cpp
CONFIG += x11
CONFIG -= qt

View File

@ -144,6 +144,9 @@ attribute_target("sha") void test_shani()
#endif
#if T(AVX)
# if defined(__WIN64__) && defined(__GNUC__) && !defined(__clang__)
# error "AVX support is broken in 64-bit MinGW - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49001"
# endif
attribute_target("avx") void test_avx()
{
__m256d a = _mm256_setzero_pd();

View File

@ -1,62 +0,0 @@
/****************************************************************************
**
** 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$
**
****************************************************************************/
#define QT_BEGIN_NAMESPACE
#define QT_END_NAMESPACE
#ifdef _MSVC_VER
#define Q_CC_MSVC _MSVC_VER
#endif
#define QT_NO_DOUBLECONVERSION
#include "../../../src/corelib/tools/qdoublescanprint_p.h"
int main(int argc, char **argv)
{
#ifdef _MSVC_VER
_locale_t invalidLocale = NULL;
#else
locale_t invalidLocale = NULL;
#endif
double a = 3.4;
qDoubleSnprintf(argv[0], 1, invalidLocale, "invalid format", a);
qDoubleSscanf(argv[0], invalidLocale, "invalid format", &a, &argc);
return 0;
}

View File

@ -1 +0,0 @@
SOURCES = xlocalescanprint.cpp

View File

@ -17,7 +17,8 @@ quoting and double quotes for the outer quoting.
Top-level installation directories:
-prefix <dir> ...... The deployment directory, as seen on the target device.
[/usr/local/Qt-$QT_VERSION, $PWD if -developer-build]
[/usr/local/Qt-$QT_VERSION; qtbase build directory if
-developer-build]
-extprefix <dir> ... The installation directory, as seen on the host machine.
[SYSROOT/PREFIX]
-hostprefix [dir] .. The installation directory for build tools running on
@ -135,6 +136,9 @@ Build options:
for example, -sanitize address cannot be combined with
-sanitize thread.
-coverage {trace-pc-guard}
Add code coverage instrumentation (Clang only)
-c++std <edition> .... Select C++ standard <edition> [c++1z/c++14/c++11]
(Not supported with MSVC)
@ -163,7 +167,8 @@ Build options:
-pch ................. Use precompiled headers [auto]
-ltcg ................ Use Link Time Code Generation [no]
-use-gold-linker ..... Use the GNU gold linker [auto]
-linker [bfd,gold,lld] Force use of the GNU ld, GNU gold or LLVM/LLD linker
instead of default one (GCC only)
-incredibuild-xge .... Use the IncrediBuild XGE [no] (Windows only)
-ccache .............. Use the ccache compiler cache [no] (Unix only)
-make-tool <tool> .... Use <tool> to build qmake [nmake] (Windows only)
@ -213,7 +218,8 @@ Component selection:
[libs and examples, also tools if not cross-building,
also tests if -developer-build]
-nomake <part> ....... Exclude <part> from the list of parts to be built.
-compile-examples .... When unset, install only the sources of examples [yes]
-compile-examples .... When unset, install only the sources of examples
[no on WebAssembly, otherwise yes]
-gui ................. Build the Qt GUI module and dependencies [yes]
-widgets ............. Build the Qt Widgets module and dependencies [yes]
-no-dbus ............. Do not build the Qt D-Bus module
@ -235,7 +241,7 @@ Core options:
-inotify ............. Enable inotify support
-iconv ............... Enable iconv(3) support [posix/sun/gnu/no] (Unix only)
-icu ................. Enable ICU support [auto]
-pcre ................ Select used libpcre2 [system/qt]
-pcre ................ Select used libpcre2 [system/qt/no]
-pps ................. Enable PPS support [auto] (QNX only)
-zlib ................ Select used zlib [system/qt]
@ -290,8 +296,7 @@ Gui, printing, widget options:
-gbm ............... Enable backends for GBM [auto] (Linux only)
-kms ............... Enable backends for KMS [auto] (Linux only)
-linuxfb ........... Enable Linux Framebuffer support [auto] (Linux only)
-mirclient ......... Enable Mir client support [no] (Linux only)
-xcb ............... Select used xcb-* libraries [system/qt/no]
-xcb ............... Enable X11 support. Select used xcb-* libraries [system/qt/no]
(-qt-xcb still uses system version of libxcb itself)
Input backends:
@ -302,10 +307,7 @@ Gui, printing, widget options:
-mtdev ............. Enable mtdev support [auto]
-tslib ............. Enable tslib support [auto]
-xcb-xinput ........ Enable XInput2 support [auto]
-xkbcommon-x11 ..... Select xkbcommon used in combination with xcb
[system/qt/no]
-xkbcommon-evdev ... Enable X-less xkbcommon in combination with libinput
[auto]
-xkbcommon ......... Enable key mapping support [auto]
Image formats:
-gif ............... Enable reading support for GIF [auto]

View File

@ -125,11 +125,8 @@ goto doneargs
:platform
shift
if "%~1" == "win32-msvc2012" goto msvc
if "%~1" == "win32-msvc2013" goto msvc
if "%~1" == "win32-msvc2015" goto msvc
if "%~1" == "win32-msvc2017" goto msvc
set PLATFORM=%~1
if "%PLATFORM:~0,10%" == "win32-msvc" goto msvc
goto nextarg
:msvc
echo. >&2
@ -150,7 +147,7 @@ goto doneargs
:doneargs
rem Find various executables
for %%C in (clang-cl.exe cl.exe icl.exe g++.exe perl.exe jom.exe) do set %%C=%%~$PATH:C
for %%C in (clang-cl.exe clang.exe cl.exe icl.exe g++.exe perl.exe jom.exe) do set %%C=%%~$PATH:C
rem Determine host spec
@ -161,6 +158,8 @@ if "%PLATFORM%" == "" (
set PLATFORM=win32-msvc
) else if not "%clang-cl.exe%" == "" (
set PLATFORM=win32-clang-msvc
) else if not "%clang.exe%" == "" (
set PLATFORM=win32-clang-g++
) else if not "%g++.exe%" == "" (
set PLATFORM=win32-g++
) else (
@ -172,7 +171,7 @@ if not exist "%QTSRC%\mkspecs\%PLATFORM%\qmake.conf" (
echo Host platform '%PLATFORM%' is invalid. Aborting. >&2
exit /b 1
)
if "%PLATFORM:win32-g++=%" == "%PLATFORM%" (
if "%PLATFORM:g++=%" == "%PLATFORM%" (
if "%MAKE%" == "" (
if not "%jom.exe%" == "" (
set MAKE=jom

View File

@ -8,12 +8,33 @@
find_package(ZLIB)
set_package_properties(ZLIB PROPERTIES TYPE OPTIONAL)
find_package(ZSTD)
set_package_properties(ZSTD PROPERTIES TYPE OPTIONAL)
find_package(Libudev)
set_package_properties(Libudev PROPERTIES TYPE OPTIONAL)
#### Tests
# precompile_header
qt_config_compile_test(precompile_header
LABEL "precompiled header support"
"
#ifndef HEADER_H
#error no go
#endif
int main(int argc, char **argv)
{
(void)argc; (void)argv;
/* BEGIN TEST: */
/* END TEST: */
return 0;
}
"# FIXME: qmake: ['CONFIG += precompile_header', 'PRECOMPILED_DIR = .pch', 'PRECOMPILED_HEADER = header.h']
)
# reduce_relocations
qt_config_compile_test(reduce_relocations
LABEL "-Bsymbolic-functions support"
@ -192,6 +213,10 @@ qt_feature("android_style_assets" PRIVATE
LABEL "Android Style Assets"
CONDITION ANDROID
)
qt_feature("use_gold_linker_alias"
AUTODETECT false
CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND tests.use_gold_linker OR FIXME
)
qt_feature("developer_build"
LABEL "Developer build"
AUTODETECT OFF
@ -361,10 +386,15 @@ qt_feature("alloca" PRIVATE
LABEL "alloca()"
CONDITION QT_FEATURE_alloca_h OR QT_FEATURE_alloca_malloc_h OR TEST_alloca_stdlib_h
)
qt_feature("zstd" PRIVATE
LABEL "Zstandard support"
CONDITION ZSTD_FOUND
)
qt_feature("thread" PUBLIC
SECTION "Kernel"
LABEL "Thread support"
PURPOSE "Provides QThread and related classes."
AUTODETECT NOT WASM
)
qt_feature("future" PUBLIC
SECTION "Kernel"

View File

@ -67,6 +67,7 @@
"commercial": "void",
"compile-examples": { "type": "boolean", "name": "compile_examples" },
"confirm-license": "void",
"coverage": "coverage",
"dbus": { "type": "optionalString", "values": [ "no", "yes", "linked", "runtime" ] },
"dbus-linked": { "type": "void", "name": "dbus", "value": "linked" },
"dbus-runtime": { "type": "void", "name": "dbus", "value": "runtime" },
@ -89,6 +90,7 @@
"headersclean": "boolean",
"incredibuild-xge": { "type": "boolean", "name": "incredibuild_xge" },
"libudev": "boolean",
"linker": { "type": "optionalString", "values": [ "bfd", "gold", "lld" ] },
"ltcg": "boolean",
"make": { "type": "addString", "values": [ "examples", "libs", "tests", "tools" ] },
"make-tool": "string",
@ -130,12 +132,13 @@
"syncqt": "boolean",
"sysroot": "string",
"testcocoon": "boolean",
"use-gold-linker": { "type": "boolean", "name": "use_gold_linker" },
"use-gold-linker": { "type": "boolean", "name": "use_gold_linker_alias" },
"warnings-are-errors": { "type": "boolean", "name": "warnings_are_errors" },
"Werror": { "type": "boolean", "name": "warnings_are_errors" },
"widgets": "boolean",
"xplatform": "string",
"zlib": { "type": "enum", "name": "system-zlib", "values": { "system": "yes", "qt": "no" } }
"zlib": { "type": "enum", "name": "system-zlib", "values": { "system": "yes", "qt": "no" } },
"zstd": "boolean"
},
"prefix": {
"D": "defines",
@ -152,13 +155,13 @@
"zlib": {
"label": "zlib",
"test": {
"include": "zlib.h",
"main": [
"z_streamp stream = 0;",
"(void) zlibVersion();",
"(void) compress2(0, 0, 0, 0, 1); // compress2 was added in zlib version 1.0.8"
]
},
"headers": "zlib.h",
"sources": [
{ "libs": "-lzdll", "condition": "config.msvc" },
{ "libs": "-lzlib", "condition": "config.msvc" },
@ -166,12 +169,27 @@
{ "libs": "-s USE_ZLIB=1", "condition": "config.wasm" }
]
},
"zstd": {
"label": "Zstandard",
"test": {
"include": "zstd.h",
"main": [
"(void) ZSTD_compress(NULL, 0, NULL, 0, 1);",
"unsigned long long n = ZSTD_getFrameContentSize(NULL, 0);",
"(void) ZSTD_decompress(NULL, 0, NULL, n);"
]
},
"sources": [
{ "type": "pkgConfig", "args": "libzstd >= 1.3" },
"-lzstd"
]
},
"dbus": {
"label": "D-Bus >= 1.2",
"test": {
"include": "dbus/dbus.h",
"main": "(void) dbus_bus_get_private(DBUS_BUS_SYSTEM, (DBusError *)NULL);"
},
"headers": "dbus/dbus.h",
"sources": [
{ "type": "pkgConfig", "args": "dbus-1 >= 1.2" },
{
@ -196,9 +214,9 @@
"libudev": {
"label": "udev",
"test": {
"include": "libudev.h",
"main": "udev_unref(udev_new());"
},
"headers": "libudev.h",
"sources": [
{ "type": "pkgConfig", "args": "libudev" },
"-ludev"
@ -207,11 +225,11 @@
},
"testTypeDependencies": {
"linkerSupportsFlag": [ "use_gold_linker" ],
"verifySpec": [ "shared", "use_gold_linker", "compiler-flags", "qmakeargs", "commit" ],
"linkerSupportsFlag": [ "use_bfd_linker", "use_gold_linker", "use_lld_linker" ],
"verifySpec": [ "shared", "use_bfd_linker", "use_gold_linker", "use_lld_linker", "compiler-flags", "qmakeargs", "commit" ],
"compile": [ "verifyspec" ],
"detectPkgConfig": [ "cross_compile", "machineTuple" ],
"library": [ "pkg-config" ],
"library": [ "pkg-config", "compiler-flags" ],
"getPkgConfigVariable": [ "pkg-config" ]
},
@ -324,13 +342,37 @@
"precompile_header": {
"label": "precompiled header support",
"type": "compile",
"test": "common/pch"
"test": {
"files": {
"header.h": "#define HEADER_H"
},
"tail": [
"#ifndef HEADER_H",
"#error no go",
"#endif"
],
"qmake": [
"CONFIG += precompile_header",
"PRECOMPILED_DIR = .pch",
"PRECOMPILED_HEADER = header.h"
]
}
},
"use_bfd_linker": {
"label": "bfd linker",
"type": "compilerSupportsFlag",
"flag": "-fuse-ld=bfd"
},
"use_gold_linker": {
"label": "gold linker",
"type": "compilerSupportsFlag",
"flag": "-fuse-ld=gold"
},
"use_lld_linker" : {
"label": "lld linker",
"type": "compilerSupportsFlag",
"flag": "-fuse-ld=lld"
},
"optimize_debug": {
"label": "-Og support",
"type": "compilerSupportsFlag",
@ -582,7 +624,7 @@
"shared": {
"label": "Building shared libraries",
"autoDetect": "!config.uikit",
"condition": "!config.integrity",
"condition": "!config.integrity && !config.wasm",
"output": [
"shared",
"publicFeature",
@ -618,11 +660,34 @@
"output": [ "qmakeArgs" ],
"condition": "input.qmakeArgs != ''"
},
"use_bfd_linker": {
"label": "bfd",
"autoDetect": "false",
"enable" : "input.linker == 'bfd'",
"disable" : "input.linker == 'gold' || input.linker == 'lld'",
"condition": "!config.win32 && !config.integrity && !config.wasm && tests.use_bfd_linker",
"output": [ "privateConfig", "useBFDLinker" ]
},
"use_gold_linker_alias": {
"autoDetect": "false",
"condition": "!config.win32 && !config.integrity && !config.wasm && tests.use_gold_linker"
},
"use_gold_linker": {
"label": "Using gold linker",
"label": "gold",
"autoDetect": "false",
"enable" : "input.linker == 'gold' || features.use_gold_linker_alias" ,
"disable" : "input.linker == 'bfd' || input.linker == 'lld'",
"condition": "!config.win32 && !config.integrity && !config.wasm && tests.use_gold_linker",
"output": [ "privateConfig", "useGoldLinker" ]
},
"use_lld_linker": {
"label": "lld",
"autoDetect": "false",
"enable" : "input.linker == 'lld'",
"disable" : "input.linker == 'bfd' || input.linker == 'gold'",
"condition": "!config.win32 && !config.integrity && !config.wasm && tests.use_lld_linker",
"output": [ "privateConfig", "useLLDLinker" ]
},
"optimize_debug": {
"label": "Optimize debug build",
"condition": "!config.msvc && !config.clang && (features.debug || features.debug_and_release) && tests.optimize_debug",
@ -791,6 +856,16 @@
"condition": "features.sanitize_address || features.sanitize_thread || features.sanitize_memory || features.sanitize_undefined",
"output": [ "sanitizer", "publicConfig" ]
},
"coverage_trace_pc_guard": {
"label": "trace-pc-guard",
"autoDetect": false,
"output": [ "publicConfig" ]
},
"coverage": {
"label": "Code Coverage Instrumentation",
"condition": "features.coverage_trace_pc_guard",
"output": [ "publicConfig" ]
},
"GNUmake": {
"label": "GNU make",
"autoDetect": false,
@ -1115,10 +1190,16 @@
"condition": "libs.zlib",
"output": [ "privateFeature" ]
},
"zstd": {
"label": "Zstandard support",
"condition": "libs.zstd",
"output": [ "privateFeature" ]
},
"thread": {
"label": "Thread support",
"purpose": "Provides QThread and related classes.",
"section": "Kernel",
"autoDetect": "!config.wasm",
"output": [ "publicFeature" ]
},
"future": {
@ -1202,6 +1283,7 @@
},
"compile_examples": {
"label": "Compile examples",
"autoDetect": "!config.wasm",
"output": [ "privateConfig" ]
},
"incredibuild_xge": {
@ -1265,6 +1347,11 @@
"type": "error",
"condition": "(features.rpath || features.rpath_dir) && var.QMAKE_LFLAGS_RPATH == ''",
"message": "This platform does not support RPATH"
},
{
"type": "error",
"condition": "features.coverage && !config.clang",
"message": "Command line option -coverage is only supported with clang compilers."
}
],
@ -1328,7 +1415,12 @@
"args": "ccache",
"condition": "config.unix"
},
"use_gold_linker",
{
"message": "Linker",
"type": "firstAvailableFeature",
"args": "use_bfd_linker use_gold_linker use_lld_linker",
"condition": "features.use_bfd_linker || features.use_gold_linker || features.use_lld_linker"
},
{
"type": "feature",
"args": "enable_new_dtags",
@ -1395,6 +1487,12 @@
"condition": "features.sanitizer",
"entries": [ "sanitize_address", "sanitize_thread", "sanitize_memory", "sanitize_undefined" ]
},
{
"message": "Code Coverage Instrumentation",
"type": "firstAvailableFeature",
"args": "coverage_trace_pc_guard",
"condition": "features.coverage"
},
{
"message": "Build parts",
"type": "buildParts"
@ -1423,7 +1521,8 @@
"entries": [
"pkg-config",
"libudev",
"system-zlib"
"system-zlib",
"zstd"
]
}
]

View File

@ -58,6 +58,21 @@ defineTest(qtConfCommandline_sanitize) {
}
}
defineTest(qtConfCommandline_coverage) {
arg = $${1}
val = $${2}
isEmpty(val): val = $$qtConfGetNextCommandlineArg()
!contains(val, "^-.*"):!isEmpty(val) {
equals(val, "trace-pc-guard") {
qtConfCommandlineSetInput("coverage_trace_pc_guard", "yes")
} else {
qtConfAddError("Invalid argument $$val to command line parameter $$arg")
}
} else {
qtConfAddError("Missing argument to command line parameter $$arg")
}
}
# callbacks
defineReplace(qtConfFunc_crossCompile) {
@ -106,8 +121,7 @@ defineReplace(qtConfFunc_licenseCheck) {
}
} else {
!$$hasCommercial: \
qtConfFatalError("No license files and no licheck executables found." \
"Cannot proceed. Try re-installing Qt.")
qtConfFatalError("No license files. Cannot proceed. Try re-installing Qt.")
commercial = yes
}
}
@ -277,6 +291,8 @@ defineTest(qtConfTest_architecture) {
content = $$cat($$test_out_dir/libarch.so, blob)
else: wasm:exists($$test_out_dir/arch.wasm): \
content = $$cat($$test_out_dir/arch.wasm, blob)
else: wasm:exists($$test_out_dir/arch.o): \
content = $$cat($$test_out_dir/arch.o, blob)
else: \
error("$$eval($${1}.label) detection binary not found.")
@ -449,7 +465,9 @@ defineTest(reloadSpec) {
$$[QT_HOST_DATA/src]/mkspecs/features/mac/toolchain.prf \
$$[QT_HOST_DATA/src]/mkspecs/features/toolchain.prf
_SAVED_CONFIG = $$CONFIG
saved_variables = CONFIG QMAKE_CXXFLAGS
for (name, saved_variables): \
_SAVED_$$name = $$eval($$name)
load(spec_pre)
# qdevice.pri gets written too late (and we can't write it early
# enough, as it's populated in stages, with later ones depending
@ -458,7 +476,8 @@ defineTest(reloadSpec) {
eval($$l)
include($$QMAKESPEC/qmake.conf)
load(spec_post)
CONFIG += $$_SAVED_CONFIG
for (name, saved_variables): \
$$name += $$eval(_SAVED_$$name)
load(default_pre)
# ensure pristine environment for configuration. again.
@ -604,11 +623,8 @@ defineTest(qtConfOutput_prepareOptions) {
target_arch = armeabi-v7a
platform = $$eval(config.input.android-ndk-platform)
isEmpty(platform): equals(target_arch, arm64-v8a): \
platform = android-21
isEmpty(platform): \
platform = android-16 ### the windows configure disagrees ...
platform = android-21
$${currentConfig}.output.devicePro += \
"DEFAULT_ANDROID_SDK_ROOT = $$val_escape(sdk_root)" \
@ -1015,6 +1031,14 @@ defineTest(qtConfOutput_crossCompile) {
export(CONFIG)
}
defineTest(qtConfOutput_useBFDLinker) {
!$${2}: return()
# We need to preempt the output here, so that qtConfTest_linkerSupportsFlag can work properly in qtbase
CONFIG += use_bfd_linker
export(CONFIG)
}
defineTest(qtConfOutput_useGoldLinker) {
!$${2}: return()
@ -1023,6 +1047,14 @@ defineTest(qtConfOutput_useGoldLinker) {
export(CONFIG)
}
defineTest(qtConfOutput_useLLDLinker) {
!$${2}: return()
# We need to preempt the output here, so that qtConfTest_linkerSupportsFlag can work properly in qtbase
CONFIG += use_lld_linker
export(CONFIG)
}
defineTest(qtConfOutput_debugAndRelease) {
$$qtConfEvaluate("features.debug") {
qtConfOutputVar(append, "publicPro", "CONFIG", "debug")
@ -1303,6 +1335,7 @@ defineTest(createConfigStatus) {
cont = \
"$$system_quote($$system_path($$cfg)$$ext) -redo %*"
} else {
!contains(cfg, .*/.*): cfg = ./$$cfg
cont = \
"$${LITERAL_HASH}!/bin/sh" \
"exec $$system_quote($$cfg) -redo \"$@\""

94
dist/changes-5.11.3 vendored Normal file
View File

@ -0,0 +1,94 @@
Qt 5.11.3 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.11.0 through 5.11.2.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.11 series is binary compatible with the 5.10.x series.
Applications compiled for 5.10 will continue to run with 5.11.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Third-Party Components *
****************************************************************************
- libpng was updated to version 1.6.35
- PCRE2 was updated to version 10.32.
- Added documentation for the SLJIT part of pcre2, which is available
under the BSD-2-Clause license.
****************************************************************************
* Documentation *
****************************************************************************
- Fixed the icons for the "file save" action that were inaccurate
representations of a 3.5-inch floppy disk (the cut edge was on the wrong
side). Now all floppy representations are physically accurate.
****************************************************************************
* QtCore *
****************************************************************************
- QCommandLineParser:
* [QTBUG-70174] Fixed a bug that caused the help output to show two
options or more in the same line if the options didn't have a
description.
- QDateTime:
* [QTBUG-70823] Fixed parsing of date/time strings when the day is the
start of daylight savings and that starts at midnight on the
timezone.
- QPluginLoader:
* [QTBUG-70560] Fixed a bug in parsing certain plugins, which might
conclude a valid plugin wasn't valid.
- QPointer:
* [QTBUG-71412] Fixed a race condition that would cause an assertion
failure when two threads created a QPointer for the same QObject.
- QUrl:
* Fixed a bug that caused QUrl::matches to incorrectly compare two URLs
with different hostnames or different usernames as equal, if certain
QUrl::RemoveXxx options were passed.
* [QTBUG-70386][QTBUG-70852] Updated the public DNS suffix list.
****************************************************************************
* QtGui *
****************************************************************************
- QPicture:
* [QTBUG-71208] Fix crash reading malformed picture file
****************************************************************************
* QtNetwork *
****************************************************************************
- SSL:
* [QTBUG-68156] OpenSSL >= 1.0 is now required to build Qt with OpenSSL
support.
****************************************************************************
* Linux *
****************************************************************************
- Fixed a number of incompatibilities with Linux C libraries due to use of
new kernel system calls statx(2) and renameat2(2). In order to enable
them now in Qt, they need to be provided in the C library's own
headers. Currently, glibc 2.28 contains them.
****************************************************************************
* macOS *
****************************************************************************
- Offline renderers will be disabled when the application is
using Qt WebEngine and running on one of the late 2013 Mac Pro models.

469
dist/changes-5.12.0 vendored Normal file
View File

@ -0,0 +1,469 @@
Qt 5.12 introduces many new features and improvements as well as bugfixes
over the 5.11.x series. For more details, refer to the online documentation
included in this distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- QtCore:
* [QTBUG-34460] qFatal() no longer uses std::abort() on Windows, as
there are circumstances where global destructors are still run after
that call, leading to possible deadlocks.
- QRegularExpression:
* [QTBUG-66781] Regular expressions are now automatically optimized
(including JIT compiling) on their first usage. The pattern options
OptimizeOnFirstUsageOption and DontAutomaticallyOptimizeOption no
longer have any effect, and will get removed in a future version of
Qt. QRegularExpression::optimize() can be still used to compile and
optimize the regular expression in advance (before any match), if
needed.
- QDataStream:
* [QTBUG-59978][QTBUG-67995] version bumped up to 18 to account for
changes in the serialization of QGradient.
- Dialogs:
* QFileSystemModel now uses QRegularExpression internally for wildcard
matching. Note that QRegularExpression might not give the exact same
result as QRegExp as its implementation follows strictly the glob
patterns definition for wildcard expressions.
****************************************************************************
* Third-Party Code *
****************************************************************************
- Sources of xcb-xinput 1.13 were bundled and are available via -qt-xcb.
- The minimal required version of libxcb is now 1.9. Bundled xcb sources
were updated to libxcb 1.9.1 built with xcb-proto 1.8.
- [QTBUG-67654] Updated CLDR to version 33.1
- [QTBUG-71144] Updated CLDR to version 34
- [QTBUG-66561][QTBUG-70008] double-conversion got updated to upstream
version 3.1.1.
- libjpeg-turbo was updated to version 2.0.0
- libpng was updated to version 1.6.35
- Sqlite was updated to version 3.25.2
- [QTBUG-71109] updated bundled libxkbcommon 0.4.1 -> 0.8.2 (up to
31f1f355700870c6615399fbfa7934934b3a9a57)
- PCRE2 was updated to version 10.32.
- Added documentation for the SLJIT part of pcre2, which is available
under the BSD-2-Clause license.
****************************************************************************
* Tools *
****************************************************************************
- rcc:
* Added a --list-mapping option which shows a mapping of resource paths
to file system paths.
- qmake
* New CONFIG options lrelease and embed_translations were added.
CONFIG+=lrelease does run lrelease on translation files listed in
TRANSLATIONS and EXTRA_TRANSLATIONS. CONFIG+=embed_translations does
include the generated .qm files as resources under :/i18n/.
- uic
* [QTBUG-65251][QTBUG-51602] The -no-stringliteral option is now
deprecated and UIC will not generate QStringLiteral anymore.
****************************************************************************
* QtCore *
****************************************************************************
- Added support for CBOR:
* Added QCborStreamReader and QCborStreamWriter, classes for low-level
reading and writing of CBOR streams.
* Added QCborValue, QCborArray and QCborMap, classes that permit DOM-like
access to CBOR data. The API is similar to QJsonValue, QJsonArray and
QJsonObject, respectively.
- QByteArray:
* Added QByteArray::isUpper() and QByteArray::isLower() to check if a
byte array contains only uppercase or only lowercase Latin1 letters.
* Added compare(), which takes Qt::CaseSensitivity as one of the
parameters. This function is more efficient than using toLower() or
toUpper() and then comparing.
* [QTBUG-66187] QByteArray::toInt(), QByteArray::toDouble() and the
other number conversion functions now ignore leading and trailing
whitespaces, as their QString counterparts already did. For
consistency reasons, the same behavior was added to
qEnvironmentVariableIntValue() also.
- QCommandLineParser:
* [QTBUG-70174] Fixed a bug that caused the help output to show two
options or more in the same line if the options didn't have a
description.
- QCryptographicHash:
* Add a static method, hashLength, which returns the length of the
output of a hash function in bytes.
- QDir:
* QDir now uses QRegularExpression internally for wildcard matching.
Note that QRegularExpression might not give the exact same result as
QRegExp as its implementation follows strictly the glob patterns
definition for wildcard expressions. Nevertheless, the tests for QDir
return the same results as before.
* QDir::tempPath() now reports the canonical path of the temporary
directory, with any symlinks resolved.
* On Windows, QDir::drives() no longer returns drives whose media were
ejected.
- QExplicitlySharedDataPointer:
* [QTBUG-66635][QTBUG-66946] Added operator== for nullptr.
- QFile:
* [QTBUG-13470] When opening a file, if Truncate is asked for, or
implied by other flags, it shall be attempted, regardless of what
other options are selected. We previously did this on Windows; now we
do so also on Unix (even when appending).
- QFileSystemWatcher:
* [QTBUG-69320] Fixed a bug that caused addPaths() to crash on Windows
if adding a path to be watched on removable storage, if that
addPaths() was called on a thread not created by QThread and no
QEventLoop has been created yet.
- QFlags's operator| for enum types in the Qt namespace are now declared
in the Qt namespace itself.
- QLocale:
* [QTBUG-57802] Added support for World and Europe as (numeric)
"country" codes ("territory" in CLDR terms), thereby enabling support
for Yiddish and Esperanto, among other locales using such codes.
- Logging:
* [QTBUG-69548] Qt will now accept qtlogging.ini files written by
QSettings.
- QMetaType can now register constructor for a set of dynamic types.
- QRegularExpression:
* Implemented support for wildcard patterns through a static method.
* QRegularExpression now provides anchoredPattern() which is a helper
function to build regular expressions used for exact matching.
* Implemented support for wildcard patterns. Warning: QRegularExpression
might not give the exact same result as QRegExp as its implementation
follows strictly the glob patterns definition for the wildcard
expressions.
- [QTBUG-62894] Introduced QScopeGuard.
- QSharedDataPointer:
* [QTBUG-66635][QTBUG-66946] Added operator== for nullptr.
- QSortFilterProxyModel:
* [QTBUG-46810] QSortFilterProxyModel now supports QRegularExpression.
* Setters of both the filterRegExp and filterRegularExpression
properties are now slots and can be used with the old as well as the
new syntax.
- QString:
* Added the functions QString::isUpper() and QString::isLower() to check
if a string contains only uppercase or only lowercase letters.
- QTextCodec:
* [QTBUG-56203] QTextCodec automatically deregisters on destruction now.
- QTimer:
* [QTBUG-69800] Fixed singleShot() methods that lacked proper "const"
qualification to QObject context receivers.
* Added QTimer::connectTo(), a shorthand way of connecting to the
timeout() signal.
- QTranslator:
* [QTBUG-31031] It is now possible to load qm files without any
translations. This is particularly useful for the language the
untranslated strings are written in; logic to load translations can
now handle the source language like all other languages.
- QUndoStack:
* [QTBUG-40040] Exposed canUndo, canRedo, undoText, redoText and clean as
Q_PROPERTYs.
- QUrl:
* Fixed a bug that caused QUrl::matches to incorrectly compare two URLs
with different hostnames or different usernames as equal, if certain
QUrl::RemoveXxx options were passed.
- other:
* Added an overload of q{To,From}{Big,Little}Endian that operates on a
memory region.
* Added the QT_TR_N_NOOP(), QT_TRANSLATE_N_NOOP(), and
QT_TRANSLATE_N_NOOP3() macros for numeral dependent delayed
translation.
****************************************************************************
* QtGui *
****************************************************************************
- QBitmap:
* Added overloaded QBitmap::fromImage that takes QImage rvalue.
- QDocumentWriter:
* [QTBUG-63581] QDocumentWriter now supports table borders, table
alignment, table width, column widths, line height and image
resolution when exporting QTextDocuments to ODF files.
- QGradient:
* [QTBUG-59978][QTBUG-67995] Added ObjectMode coordinate mode.
- QGuiApplication:
* [QTBUG-26413] Fixed queryKeyboardModifiers() on macOS to actually return
the current modifier key state.
- QImage:
* [QTBUG-45858] QImage now supports 64bit image formats with 16 bits per
color channel, compatible with 16bpc PNG or RGBA16 OpenGL formats.
- QIntValidator:
* [QTBUG-59650] Input value with over the highest acceptable value, but
with no more digits than the maximum value, is now considered
intermediate.
- QOpenGLShader:
* [QTBUG-66074] QOpenGLShader has been fixed to expose geometry and
tessellation evaluation/control shaders with OpenGL ES 3.2.
- QPagedPaintDevice:
* The default constructor has been deprecated since that class is
not meant to be used standalone. The two public but internal
devicePageLayout() methods are now deprecated.
- QPainter:
* [QTBUG-67248] Fixed drawTiledPixmap() and texture-brush painting with
high-DPR images.
* QPainter::drawTiledPixmap() now tiles in the device independent
coordinate system.
- QPicture:
* [QTBUG-71208] Fixed a crash reading malformed picture file.
- QStandardItemModel:
* itemData does not return role 255 any more.
- QTextImageFormat:
* Added two new functions to the class: setQuality(int=100) and
quality(). They are currently used by QTextODFWriter to determine the
image type and quality when exporting images to ODT files.
- Text:
* [QTBUG-57479] Non-breaking spaces are now displayed as a degree symbol
when QTextOption::ShowTabsAndSpaces is used.
* [QTBUG-69085] Fixed position of text cursor set by clicking outside
the bounds of a text line that ends with a surrogate pair or ligature.
* [QTBUG-70293] Fixed a crash that can happen when calling a setter on a
QTextCursor after its QTextDocument has been deleted.
****************************************************************************
* QtNetwork *
****************************************************************************
- Added DTLS over UDP support.
- QPasswordDigestor:
* [QTBUG-30550] Added QPasswordDigestor
- QSslKey:
* [QTBUG-17718] The OpenSSL backend can now load encrypted PKCS#8
DER-encoded keys.
* [QTBUG-59068] Added support for PKCS#8-encoded keys in the generic SSL
back-end (used for SecureTransport on macOS and for WinRT). Note that
it does not support keys encrypted with a PKCS#12 algorithm.
- QSslSocket:
* Enabled ALPN (and thus HTTP/2 negotiation) in SecureTransport backend
(macOS).
* [QTBUG-69420] Implemented renegotiation for SecureTransport backend.
- SSL:
* The OpenSSL 1.1 backend also works with OpenSSL 1.1.1 (and thus can
negotiate TLS 1.3).
* [QTBUG-68156] OpenSSL >= 1.0 is now required to build Qt with OpenSSL
support.
****************************************************************************
* QtSql *
****************************************************************************
- MySQL:
* Now supports MySQL versions >= 8.0.1.
* [QTBUG-57028] The TIME data type is now treated like a string-based
type in order to respect the full range of the TIME data type.
****************************************************************************
* QtTest *
****************************************************************************
- QCOMPARE:
* Now outputs contents of std::tuple on failure.
* [QTBUG-65845] QtTest now prints values of QFlags that failed to compare.
****************************************************************************
* QtWidgets *
****************************************************************************
- Itemviews:
* [QTBUG-12129][QTBUG-14949][QTBUG-57891] Fixed eliding of multi-line
items.
- QAbstractSpinBox:
* [QTBUG-67380] The Qt::ControlModifier now increases the number of steps a
QAbstractSpinBox takes for the following interactions: scrolling, up/down
keyboard keys and the spin box buttons. Previously, Qt::ControlModifier
only affected scrolling.
- QApplication:
* [QTBUG-67736] QApplication no longer sends a mouse move event to the
entered widget if it sends synthetic enter and leave events.
- QHeaderView:
* [QTBUG-23203] Padding/margin is now taken into account when the text gets
elided.
* [QTBUG-59501] The qss padding attribute is now honored in all cases.
* [QTBUG-62091] The size of the decoration is now taken into account in
paintSection().
* [QTBUG-65017] The drag'n'drop indicator is now using the correct font.
* [QTBUG-69431] setDefaultSectionSize() now checks if the given value is
inside min/max section size.
* [QTBUG-70084] The section indicator is now high-DPI-aware.
- QItemDelegate:
* [QTBUG-16134] Fixed text height calculation when the item has a
decoration or checkbox.
- QLineEdit:
* [QTBUG-44046] The textEdited() signal is now emitted even if the
QValidator has changed the user input.
* [QTBUG-57448] Added inputRejected() signal for when a key press is not
accepted by the QLineEdit. For instance, when an invalid key is
pressed for a validator set.
- QListView:
* [QTBUG-27110] The pseudo states :first/:middle/:last are now respected.
* [QTBUG-56606] Added itemAlignment property.
* [QTBUG-67440] Fixed a bug that caused items on internal move to be
deleted.
- QMenu:
* [QTBUG-69199] Removed icon highlight when a stylesheet was applied by
the application.
- QMessageBox:
* [QTBUG-35545] On Android and iOS it's now possible to show a
QMessageBox with custom buttons as a native dialog.
- QSpinBox/QDoubleSpinBox:
* Added an option for adaptive decimal step size.
- QSplashScreen:
* [QTBUG-43081] The alignment when the message is passed as HTML is now
correctly honored.
- QStyle:
* QStyle::SH_SpinBox_StepModifier allows the developer to pick which
keyboard modifier increases the number of steps a QAbstractSpinBox
takes for the following interactions: scrolling, up/down keyboard keys
and the spin box buttons. The Qt::ShiftModifier can now be used, or
the feature can be disabled using Qt::NoModifier. Previously, only
Qt::ControlModifier could be used as the modifier.
- QTabBar:
* [QTBUG-18146] Fixed mixed up CSS pseudo class for left and right.
- QTableView:
* [QTBUG-48244][QTBUG-49548] Fixed calculating geometries for editors.
* [QTBUG-70215] Fixed PageUp not getting to top when first row is hidden.
- QTableWidget:
* Fixed handling of Qt::EditRole and Qt::DisplayRole in setItemData().
- QTreeView:
* [QTBUG-39486] Sped up expanding items when pressing asterisk.
- QWidget:
* [QTBUG-68393][QTBUG-69619][QTBUG-10907] Fixed several bugs that
incorrectly reordered tabs for compound widgets under some special
circumstances.
* [QTBUG-65199] enterEvent() and leaveEvent() now occur when a hovering
drawing tablet stylus enters or leaves a widget.
* Added the Qt::WA_StyleSheetTarget attribute to indicate that a widget
was affected by a style sheet.
****************************************************************************
* Android *
****************************************************************************
- Added Android edit context menu.
- Removed old debugging bridge. To be able to debug Qt on Android apps the
user must use QtCreator 4.6.1+.
- [QTBUG-63735] The system no longer restarts the application when the user
replaces SIM card or changes the logical density of the screen.
- [QTBUG-70280] ARM64 builds now default to android-21 instead of failing.
- [QTBUG-35545] QMessageBox now supports buttons with custom labels.
****************************************************************************
* Linux *
****************************************************************************
- QFileDialog will use the native dialogs provided by the platform theme
instead of trying to use Flatpak portal to select directories.
****************************************************************************
* macOS *
****************************************************************************
- QtGui:
* [QTBUG-63800] Fixed display of condensed fonts when NoFontMerging is
in use.
- Text:
* [QTBUG-69955] Fixed font weights on macOS 10.14.
****************************************************************************
* Windows *
****************************************************************************
- [QTBUG-55762] The dimensions of invisible margins inside the frames of
Windows 10 windows will now be disregarded in the positioning of Qt
windows to avoid a misplaced look (offset by a few pixels from the
expected position).
- [QTBUG-44964][QTBUG-60437] The application attributes
AA_CompressTabletEvents and AA_CompressHighFrequencyEvents are now
supported on Windows 8 and above for touch/pen input, with the same
defaults as on X11 (compress touch events, don't compress tablet events)
- QTimeZone:
* [QTBUG-42021] Changed MS-Win to use ICU for time-zone data, when
available, in preference to MS's TZ APIs. The choice is made when
building Qt. This will give reliable results when non-DST transitions
arise, or when a zone's DST is not simple (e.g. interrupted by
Ramadan).
****************************************************************************
* winrt *
****************************************************************************
- Added support to Windows UI Automation to the WinRT QPA, allowing
Qt-based UWP applications to operate with accessibility and
programmatic UI control tools.
****************************************************************************
* X11 *
****************************************************************************
- [QTBUG-39624] The xcb plugin was ported to use libxcb-xinput instead of
libXi for XInput2 support. The -xinput2 configure option was replaced by
-xcb-xinput.

167
dist/changes-5.12.1 vendored Normal file
View File

@ -0,0 +1,167 @@
Qt 5.12.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- qmake / WinRT:
* Cross-builds will now ignore pre-set values of %INCLUDE% and %LIB%
when building target executables. If necessary, use configure's -I and
-L switches when building Qt, and pass QMAKE_INCDIR and QMAKE_LIBDIR
on qmake's command line when building own projects.
****************************************************************************
* Documentation *
****************************************************************************
- Fixed the icons for the "file save" action that were inaccurate
representations of a 3.5-inch floppy disk (the cut edge was on the wrong
side). Now all floppy representations are physically accurate.
****************************************************************************
* QtCore *
****************************************************************************
- [QTBUG-71256] QString, QByteArray and QLocale's toDouble return an infinity
on overflow (since 5.7), while setting ok to false; this was at odds with
their documented behavior of returning 0 on failure. The documentation now
reflects the actual behavior.
- [QTBUG-71868] QString, QByteArray and QLocale's toFloat returned an
infinity on double-overflow (since 5.7) but returned 0 on a finite double
outside float's range, while setting ok to false; this was at odds with
their documented behavior of returning 0 on any failure. They also
succeeded, returning zero, on underflow of float's range, unless double
underflowed, where they failed. Changed the handling of values outside
float's range to match that of values outside double's range: fail,
returning an infinity on overflow or zero on underflow. The documentation
now reflects the revised behavior, which matches toDouble().
- QCborStreamReader:
* [QTBUG-71426] Made setDevice() clear the last error.
- QCollator:
* [QTBUG-58621] Added support for collation in the C locale, albeit this is
only well-defined for ASCII. Collation sort keys remain unsupported on
Darwin.
- QContiguousCache:
* [QTBUG-52125] Fixed a memory leak.
- QObject:
* [QTBUG-32340] Fixed a bug that caused isSignalConnected() to return
true if the signal was connected and later disconnected.
* [QTBUG-71550] Fixed a bug that caused isSignalConnected() not to
report signals that were connected by the QML engine.
- QPluginLoader:
* [QTBUG-71443] Fixed the parsing of ELF headers (Linux, FreeBSD, Solaris,
etc.), which could cause certain valid plugins to not be deteced as
valid.
- QRegularExpression:
* [QTBUG-72539] The wildcardToRegularExpression method now returns a
properly anchored pattern.
- QSettings:
* [QTBUG-72007] Fixed QSettings parsing of blank spaces after comment lines
in INI-style configuration files.
- QStringListModel:
* setData will now emit the dataChanged() signal only if the string set
is different from the one already contained in the model
- QSysInfo:
* [QTBUG-72489] Now returns "Mojave" in prettyProductName() for macOS
10.14.
- QUrl:
* [QTBUG-71973] Changed the normalization done by
QUrl::NormalizePathSegments) to match what web browsers do for non-local
URLs.
****************************************************************************
* QtGui *
****************************************************************************
- Text:
* Fixed a bug where eliding text could change the height of its bounding
rectangle for certain fonts.
* Improved appearance of monochrome text on some platforms.
* Fixed so ShowTabsAndSpaces will use the correct font.
****************************************************************************
* QtSql *
****************************************************************************
- PostgreSQL:
* Added support for PostgreSQL 11
****************************************************************************
* QtWidgets *
****************************************************************************
- Reverted a Qt 5.12.0 behavior change in QToolTip that made plain tooltip
text be wrapped automatically.
- [QTBUG-72844] Fixed a regression related to accepting a Drag'n'Drop event.
- [QTBUG-27110] Reverted a change that caused a regression related to
styling a QListView using CSS.
- QWidgetLineControl/security:
* Zero-out the string that contains a password entered into the
QLineEdit
* Preallocate a buffer for the string that contains the entered value
when the QLineEdit serves as a password input field to minimize
reallocations.
****************************************************************************
* Platform Specific Changes *
****************************************************************************
- Android:
* QClipboard now supports HTML and URI data.
- Windows:
* Reduced the number of font engines that are created when loading new
fonts, fixing crashes in some special cases where a large number of
fonts are created during a short period of time.
- X11:
* [QTBUG-71296] Fixed a bug with open/close hand cursors not being shown
correctly.
* [QTBUG-46626][QTBUG-70756] Fixed a bug with dialogs hidden by other
windows in certain use cases.
****************************************************************************
* Third-Party Code *
****************************************************************************
- [QTBUG-65503] Removed xkbcommon from bundled sources. This library is
present on all supported platforms. The minimal required version now is
0.5.0.
- Updated bundled SQLite to version 3.26.0.
****************************************************************************
* Tools *
****************************************************************************
- moc now parses enum struct the same way as enum class therefore that
keyword can be used with the Q_ENUM macro as well as Q_FLAG and
Q_DECLARE_FLAGS.

105
dist/changes-5.12.2 vendored Normal file
View File

@ -0,0 +1,105 @@
Qt 5.12.2 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0 through 5.12.1.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- QtTestLib:
* [QTBUG-72928] Blacklisting of tests will be taken into account for
XPASS and XFAIL. A blacklisted test that causes an XPASS will no
longer be a fail.
****************************************************************************
* QtCore *
****************************************************************************
- [QTBUG-72885] Fixed a number of warnings with Clang or Clang-Tidy in
Qt headers related to alignment of Qt private classes.
- QDate, QTime and QDateTime;
* [QTBUG-51208] Corrected documentation of how non-placeholder
characters are handled in format patterns passed to toString().
- QCoreApplication:
* [QTBUG-57171] Fixed an out-of-bounds access if the translatable
string passed to tr() ended in '%'.
- QFileInfo:
* [QTBUG-72644] Fixed a bug that would cause QFileInfo to report an
link incorrectly as a non-link.
- QLocale:
* Fixed a crash if qDebug() is used after main() has exited.
* [QTBUG-73403] Fixed a race condition in getting the system locale
(possible regression from Qt 5.11.x)
- QSysInfo:
* Fixed a bug on BSD systems in getting the machineUniqueId().
* Fixed a bug on Windows in 32-bit applications getting the
machineUniqueId() when the OS is 64-bit.
- QWaitCondition:
* Fixed handling of wait(QDeadlineTimer::Forever) on 32-bit platforms.
****************************************************************************
* QtWidgets *
****************************************************************************
- ItemViews:
* Fixed a regression with wrongly drawn centered/right aligned item
texts
****************************************************************************
* Third-Party Code *
****************************************************************************
- libpng was updated to version 1.6.36
****************************************************************************
* Freetype *
****************************************************************************
- Upgraded bundled Freetype version to 2.9.1. This also adds support for
the latest emoji font in use on Android 9.
****************************************************************************
* Android *
****************************************************************************
- Added the --no-strip command line option to androiddeployqt.
- qmake:
* Can now set the version name and code for Android using
ANDROID_VERSION_NAME and ANDROID_VERSION_CODE respectively in the pro
file.
****************************************************************************
* Windows *
****************************************************************************
- Fixed an issue where loading fonts from files or data would sometimes
mistakenly classify them as oblique.
****************************************************************************
* qmake *
****************************************************************************
- [QTBUG-27079] A new feature "cmdline" was added that implies "CONFIG +=
console" and "CONFIG -= app_bundle".

7
dist/changes-5.13.0 vendored Normal file
View File

@ -0,0 +1,7 @@
****************************************************************************
* Important Source Incompatible Changes *
****************************************************************************
- Moc generated files include the standard <memory> header file now.
A side effect of this is that code including the Moc output from within
a namespace will fail to compile.

View File

@ -3,7 +3,7 @@
dita.metadata.default.author = Qt Project
dita.metadata.default.permissions = all
dita.metadata.default.publisher = Qt Project
dita.metadata.default.copyryear = 2018
dita.metadata.default.copyryear = 2019
dita.metadata.default.copyrholder = The Qt Company Ltd
dita.metadata.default.audience = programmer

View File

@ -78,7 +78,7 @@ HTML.footer += \
" <ul id=\"menu-footer-submenu\" class=\"right clearfix\"><li id=\"menu-item-1795\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1795\"><a title=\"Sign into your account.\" href=\"https://account.qt.io/login\">Sign In</a></li>\n" \
" <li id=\"menu-item-10375\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-10375\"><a href=\"mailto:feedback@theqtcompany.com?Subject=Feedback%20about%20doc.qt.io%20site\">Feedback</a></li>\n" \
" <li id=\"menu-item-1494\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-1494\"><a href=\"http://qt.io/contact-us/\">Contact us</a></li>\n" \
" <li id=\"menu-item-4472\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-4472\"><a href=\"http://qt.io/about-us/\">© 2018 The Qt Company</a></li>\n" \
" <li id=\"menu-item-4472\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-4472\"><a href=\"http://qt.io/about-us/\">© 2019 The Qt Company</a></li>\n" \
" </ul>\n" \
"</div>\n" \
"</div>\n" \

View File

@ -8,7 +8,7 @@ HTML.footer = \
"</div>\n" \
"<div class=\"footer\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2018 The Qt Company Ltd.\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2019 The Qt Company Ltd.\n" \
" Documentation contributions included herein are the copyrights of\n" \
" their respective owners.<br/>" \
" The documentation provided herein is licensed under the terms of the" \

View File

@ -1,6 +1,7 @@
# HTML Header with qt.io branding and online links
HTML.stylesheets = template/style/online.css \
template/style/cookie-confirm.css \
template/style/gsc.css \
template/style/list_arrow.png \
template/style/list_expand.png \
@ -14,6 +15,7 @@ HTML.stylesheets = template/style/online.css \
#for including files into the qch file. Relative to the outputdir of a QDoc build.
qhp.extraFiles += style/online.css \
style/cookie-confirm.css \
style/gsc.css \
style/list_arrow.png \
style/list_expand.png \
@ -27,11 +29,13 @@ qhp.extraFiles += style/online.css \
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/online.css\" />\n" \
" <link rel=\"shortcut icon\" href=\"//d3hp9ud7yvwzy0.cloudfront.net/wp-content/themes/oneqt/images/favicon.ico.gzip\" />\n"
" <link rel=\"shortcut icon\" href=\"//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/images/favicon.ico.gzip\" />\n"
HTML.headerscripts = \
" <script type=\"text/javascript\"> wpThemeFolder = \'http://qt.io/wp-content/themes/oneqt\'; </script>\n" \
" <script type=\"text/javascript\" src=\"//d3hp9ud7yvwzy0.cloudfront.net/wp-content/themes/oneqt/js/combo.js.gzip\"></script>\n" \
" <script type=\"text/javascript\" src=\"//d33sqmjvzgs8hq.cloudfront.net/wp-includes/js/jquery/jquery.js.gzip\"></script>\n" \
" <script type=\"text/javascript\" src=\"//d33sqmjvzgs8hq.cloudfront.net/wp-includes/js/jquery/jquery-migrate.min.js.gzip\"></script>\n" \
" <script type=\"text/javascript\" src=\"//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/js/combo.js.gzip\"></script>\n" \
" <script type=\"text/javascript\" src=\"scripts/main.js\"></script>\n" \
" <script type=\"text/javascript\" src=\"scripts/extras.js\"></script>\n" \
" <script type=\"text/javascript\">\n" \
@ -61,58 +65,25 @@ HTML.endheader = \
# minimal header
HTML.postheader = \
"<body>\n" \
"<div class=\"header\" id=\"header\">\n" \
"<header id=\"navbar\" class=\"\">\n" \
" <div class=\"cookies_yum\">\n" \
" <div>\n" \
" <img src=\"//d3hp9ud7yvwzy0.cloudfront.net/wp-content/themes/oneqt/assets/images/cookie_small.png\" align=\"left\">\n" \
" <p class=\"close_button\">\n" \
" We bake cookies in your browser for a better experience. Using this site means that you consent. <a href=\"//qt.io/terms-conditions/\">Read More</a>\n" \
" </p>\n" \
" <a class=\"close\"></a>\n" \
" </div>\n" \
"<div class=\"header\" id=\"tmpl_header\">\n" \
"<header class=\"\" id=\"navbar\"><div id=\"cookie-confirmation\" style=\"display:none\"><div id=\"cookie-confirmation-inner\"><p>We bake cookies in your browser for a better experience. Using this site means that you consent.\n" \
"<a href=\"https://www1.qt.io/terms-conditions/ \">Read more</a></p><div id=\"cookie-confirmation-buttons-area\"><a href=\"#\" id=\"confirmation-button\">Continue »</a>\n" \
"</div></div>\n" \
"<script>\n" \
" $('#confirmation-button').on('click', function() { $('#cookie-confirmation').fadeOut(); createCookie(\"cookies_nom\", \"yum\", 180); });\n" \
" if (!(readCookie('cookies_nom') == 'yum')) { $('#cookie-confirmation').fadeIn(); }\n" \
"</script>\n" \
"</div>\n" \
"<div class=\"container\">\n" \
" <div class=\"navbar-header cf\">\n" \
" <div id=\"mm-wrap\">\n" \
" <ul id=\"mm-helper\" class=\"mm-menu\" data-event=\"hover_intent\" data-effect=\"fade\" data-effect-speed=\"200\" data-panel-width=\"#navbar\" data-panel-inner-width=\"1280px\" data-second-click=\"go\" data-document-click=\"collapse\" data-vertical-behaviour=\"accordion\" data-breakpoint=\"0\">\n" \
" <li class=\"mm-item\"><a class=\"mm-link\" href=\"http://blog.qt.io/\" tabindex=\"0\">Blog</a></li>\n" \
" <li class=\"mm-item\"><a class=\"mm-link\" href=\"https://www.qt.io/contact-us/\" tabindex=\"0\">Contact Us</a></li>\n" \
" <li class=\"mm-item\"><a title=\"Qt Account\" class=\"mm-link\" href=\"https://account.qt.io/\" tabindex=\"0\"></a></li>\n" \
" </ul>\n" \
" </div>\n" \
" <div class=\"container\">\n" \
" <div class=\"navbar-header clearfix\">\n" \
" <a href=\"#\" class=\"navbar-toggle\">\n" \
" <figure>\n" \
" <span class=\"line\"></span>\n" \
" </figure>\n" \
" <span>Menu</span>\n" \
" </a>\n" \
" <ul id=\"menuextras\">\n" \
" <li>\n" \
" <a href=\"//qt.io/partners/\" data-icon=\"\">\n" \
" <span>Partners</span>\n" \
" </a>\n" \
" </li>\n" \
" <li>\n" \
" <a target=\"_blank\" href=\"http://blog.qt.io/\" data-icon=\"\">\n" \
" <span>Blog</span>\n" \
" </a>\n" \
" </li>\n" \
" <li class=\"sign-in\">\n" \
" <a data-icon=\"\" class=\"signin\" href=\"https://account.qt.io/login\"><span>Sign in</span></a>\n" \
" </li>\n" \
" </ul>\n" \
" <a href=\"http://qt.io/\" class=\"navbar-oneQt retina\" data-icon=\"\">\n" \
" </a>\n" \
" <nav class=\"navbar-menu clearfix\" role=\"navigation\">\n" \
" <ul id=\"mainmenu\" class=\"menu\"><li id=\"menu-item-18\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-18\"><a href=\"http://qt.io/download/\">Download</a></li>\n" \
"<li id=\"menu-item-12207\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-12207\"><a href=\"http://www.qt.io/qt-for-device-creation/\">Device Creation</a></li>\n" \
"<li id=\"menu-item-12208\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-12208\"><a href=\"http://www.qt.io/application-development/\">Application Development</a></li>\n" \
"<li id=\"menu-item-1381\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-1381\"><a href=\"http://www.qt.io/services/\">Services</a></li>\n" \
"<li id=\"menu-item-20\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-20\"><a href=\"http://www.qt.io/developers/\">Developers</a></li>\n" \
"</ul> <ul class=\"menuextraslanguages\">\n" \
" <li class=\"active dark\"><a class=\"dark\" href=\"http://qt.io/support/\">EN</a></li><li class=\"dark\"><a class=\"dark\" href=\"http://qt.io/ru/\">RU</a></li><li class=\"dark\"><a class=\"dark\" href=\"http://qt.io/zh-hans/\">ZH</a></li></ul>\n" \
" </nav>\n" \
" </div>\n" \
" </div>\n" \
"<div class=\"big_bar account\" style=\"\">\n" \
" <div class=\"container\">\n" \
" <h1><!-- mclude oneqt_no_cache_bMrsJxAh /wp-content/themes/oneqt/php_login_info_bottom_header.php --><!-- /mclude oneqt_no_cache_bMrsJxAh -->\n" \
" <div class=\"col-1 right big_bar_button account\" style=\"margin-top:5px !important;\"></div>\n" \
" </h1>\n" \
" <a class=\"navbar-oneQt retina\" data-icon=\"\" href=\"https://www.qt.io/\"></a>\n" \
" </div>\n" \
"</div>\n" \
"</header>\n" \

View File

@ -14,6 +14,7 @@ macro.macos = "macOS"
macro.menu = "\\b"
macro.oslash.HTML = "&oslash;"
macro.ouml.HTML = "&ouml;"
macro.nullptr = "\\c{nullptr}"
macro.QA = "\\e{Qt Assistant}"
macro.QD = "\\e{Qt Designer}"
macro.QL = "\\e{Qt Linguist}"

View File

@ -5,7 +5,7 @@
HTML.footer = \
" </div>\n" \
" <p class=\"copy-notice\">\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2018 The Qt Company Ltd.\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2019 The Qt Company Ltd.\n" \
" Documentation contributions included herein are the copyrights of\n" \
" their respective owners. " \
" The documentation provided herein is licensed under the terms of the" \

View File

@ -0,0 +1,219 @@
body div#cookie-confirmation,
body div#cookie-confirmation.can-use-gradients {
background:#222840 !important;
position:fixed !important;
box-shadow:0 0 10px #222840 !important;
border-bottom:none;
top:auto;
bottom:0;
}
body div#cookie-confirmation div#cookie-confirmation-inner,
body div#cookie-confirmation.can-use-gradients div#cookie-confirmation-inner {
padding:0 30px !important;
overflow:hidden;
display:-ms-flexbox;
display:flex;
-ms-flex-direction:row;
flex-direction:row;
-ms-flex-align:center;
align-items:center;
height:60px;
}
body div#cookie-confirmation div#cookie-confirmation-inner p,
body div#cookie-confirmation.can-use-gradients div#cookie-confirmation-inner p {
text-shadow:none !important;
font-family:"Titillium Web" !important;
font-size:inherit !important;
line-height:inherit !important;
float:left;
margin:0!important;
}
body div#cookie-confirmation div#cookie-confirmation-inner p a,
body div#cookie-confirmation.can-use-gradients div#cookie-confirmation-inner p a {
font-family:inherit !important;
color:#41cd52 !important;
font-size:inherit !important;
}
body div#cookie-confirmation div#cookie-confirmation-inner #cookie-confirmation-buttons-area,
body div#cookie-confirmation.can-use-gradients div#cookie-confirmation-inner #cookie-confirmation-buttons-area {
display:-ms-flexbox;
display:flex;
float:left;
margin-left:50px;
}
body div#cookie-confirmation div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button,
body div#cookie-confirmation.can-use-gradients div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button {
text-shadow:none !important;
border-radius:0;
border:0 !important;
box-shadow:none;
line-height:32px !important;
height:32px !important;
font-size:16px !important;
font-weight:400 !important;
color:#fff !important;
font-family:"Titillium Web" !important;
display:inline-block;
padding:0 15px !important;
position:relative;
background:#41cd52 !important;
transition:all .2s ease-in-out;
}
body div#cookie-confirmation div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button:hover,
body div#cookie-confirmation.can-use-gradients div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button:hover{
background:#17a81a !important;
}
body div#cookie-confirmation div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button:after,
body div#cookie-confirmation div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button:before,
body div#cookie-confirmation.can-use-gradients div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button:after,
body div#cookie-confirmation.can-use-gradients div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button:before {
content:'';
width:20px;
height:20px;
background:#222840;
position:absolute;
}
body div#cookie-confirmation div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button:before,
body div#cookie-confirmation.can-use-gradients div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button:before {
-ms-transform:rotate(45deg);
transform:rotate(45deg);
top:-12px;
left:-13px;
}
body div#cookie-confirmation div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button:after,
body div#cookie-confirmation.can-use-gradients div#cookie-confirmation-inner #cookie-confirmation-buttons-area a#confirmation-button:after {
-ms-transform:rotate(-135deg);
transform:rotate(-135deg);
top:auto;
right:-13px;
bottom:-12px;
}
/*! CSS Used from: Embedded */
div#cookie-confirmation{
position:absolute;
left:0;
top:0;
width:100%;
height:auto;
background-color:#2d2d2d;
border-bottom:1px solid gray;
border-bottom:1px solid rgba(0,0,0,0.5);
-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.2);
-moz-box-shadow:0 1px 2px rgba(0,0,0,0.2);
box-shadow:0 1px 2px rgba(0,0,0,0.2);
font-size:14px !important;
line-height:18px !important;
font-family:helvetica neue,helvetica,arial,sans !important;
color:#fff !important;
text-shadow:0 1px 0 rgba(0,0,0,0.7) !important;
text-align:left !important;
z-index:100000000 !important;
}
div#cookie-confirmation.can-use-gradients{
background-color:rgba(0,0,0,0);
background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0,0,0,0.9)), color-stop(100%, rgba(0,0,0,0.75)));
background-image:-webkit-linear-gradient(top, rgba(0,0,0,0.9),rgba(0,0,0,0.75));
background-image:-moz-linear-gradient(top, rgba(0,0,0,0.9),rgba(0,0,0,0.75));
background-image:-o-linear-gradient(top, rgba(0,0,0,0.9),rgba(0,0,0,0.75));
background-image:linear-gradient(top, rgba(0,0,0,0.9),rgba(0,0,0,0.75));
background-image:linear-gradient(to bottom, rgba(0,0,0,0.9),rgba(0,0,0,0.75));
}
div#cookie-confirmation div#cookie-confirmation-inner{
padding:12px 18px 18px;
}
div#cookie-confirmation div#cookie-confirmation-inner a{
font-family:helvetica neue,helvetica,arial,sans !important;
color:#add8e6 !important;
font-size:14px !important;
text-decoration:none !important;
background:none !important;
border:none !important;
font-weight:normal !important;
}
div#cookie-confirmation div#cookie-confirmation-inner a:hover{
text-decoration:underline !important;
background:none !important;
border:none !important;
}
div#cookie-confirmation div#cookie-confirmation-inner div#cookie-confirmation-buttons-area{
text-align:center !important;
}
div#cookie-confirmation div#cookie-confirmation-inner a#confirmation-button{
font-family:helvetica neue,helvetica,arial,sans!important;
font-size:14px !important;
font-weight:normal !important;
margin-right:16px !important;
padding:4px 12px !important;
background-color:green !important;
border:1px solid gray !important;
border:1px solid rgba(0,0,0,0.5) !important;
background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, transparent), color-stop(100%, rgba(0,0,0,0.2)));
background-image:-webkit-linear-gradient(top, transparent,rgba(0,0,0,0.2));
background-image:-moz-linear-gradient(top, transparent,rgba(0,0,0,0.2));
background-image:-o-linear-gradient(top, transparent,rgba(0,0,0,0.2));
background-image:linear-gradient(top, transparent,rgba(0,0,0,0.2));
-webkit-border-radius:4px;
-moz-border-radius:4px;
-ms-border-radius:4px;
-o-border-radius:4px;
border-radius:4px;
-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.2),inset 0 1px 0 rgba(255,255,255,0.5);
-moz-box-shadow:0 1px 2px rgba(0,0,0,0.2),inset 0 1px 0 rgba(255,255,255,0.5);
box-shadow:0 1px 2px rgba(0,0,0,0.2),inset 0 1px 0 rgba(255,255,255,0.5);
line-height:14px !important;
color:#fff !important;
text-shadow:0 1px 0 rgba(0,0,0,0.5) !important;
text-decoration:none !important;
}
div#cookie-confirmation div#cookie-confirmation-inner a#confirmation-button:hover{
background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, transparent), color-stop(100%, rgba(0,0,0,0.3)));
background-image:-webkit-linear-gradient(top, transparent,rgba(0,0,0,0.3));
background-image:-moz-linear-gradient(top, transparent,rgba(0,0,0,0.3));
background-image:-o-linear-gradient(top, transparent,rgba(0,0,0,0.3));
background-image:linear-gradient(top, transparent,rgba(0,0,0,0.3));
}
div#cookie-confirmation div#cookie-confirmation-inner a#confirmation-button:active{
background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0,0,0,0.3)), color-stop(100%, rgba(0,0,0,0.3)));
background-image:-webkit-linear-gradient(top, rgba(0,0,0,0.3),rgba(0,0,0,0.3));
background-image:-moz-linear-gradient(top, rgba(0,0,0,0.3),rgba(0,0,0,0.3));
background-image:-o-linear-gradient(top, rgba(0,0,0,0.3),rgba(0,0,0,0.3));
background-image:linear-gradient(top, rgba(0,0,0,0.3),rgba(0,0,0,0.3));
-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);
-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);
box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);
}
div#cookie-confirmation div#cookie-confirmation-inner p{
line-height:18px !important;
font-family:helvetica neue,helvetica,arial,sans !important;
font-weight:normal !important;
font-size:14px !important;
margin:0 0 16px !important;
padding:0 !important;
color:#fff !important;
text-align:left !important;
}
@media screen and (max-width: 480px) {
div#cookie-confirmation {
font-size:12px !important;
}
div#cookie-confirmation div#cookie-confirmation-inner {
padding:8px 14px 14px !important;
}
div#cookie-confirmation div#cookie-confirmation-inner a {
font-size:12px !important;
}
div#cookie-confirmation div#cookie-confirmation-inner a#confirmation-button {
font-size:12px !important;
}
div#cookie-confirmation div#cookie-confirmation-inner p {
font-size:12px !important;
margin-bottom:12px !important;
line-height:15px !important;
}
}

View File

@ -1,5 +1,4 @@
pre, .LegaleseLeft {
background-color: #f0f0f0;
font-family: Courier, monospace;
font-weight: 600;
vertical-align: top;
@ -40,7 +39,6 @@ h1.title {
}
h2, p.h2 {
background-color: #F2F3F4;
padding: 4px;
margin: 30px 0px 20px 10px;
}
@ -67,10 +65,6 @@ ul li, ol li {
}
h3.fn, span.fn {
border-width: 3px;
border-style: solid;
border-color: #aaaaaa;
background-color: #eeeeee;
word-spacing: 3px;
padding: 5px;
text-decoration: none;
@ -94,10 +88,6 @@ table td {
padding: 6px 10px 6px 10px;
}
table tr.odd {
background-color: #eeeeee;
}
table.qmlname td {
padding: 0px;
margin-left: 6px;
@ -144,19 +134,10 @@ span.naviSeparator {
margin: 0;
}
.navigationbar table tr {
background-color: #eeeeee;
}
td#buildversion {
background-color: #ffffff;
}
.footer, .footer p {
padding: 5px 0px 5px 0px;
margin: 45px 15px 5px 15px;
font-size: 8.5pt;
background-color: #cccccc;
}
.footer p {

File diff suppressed because it is too large Load Diff

View File

@ -5,5 +5,6 @@ SUBDIRS = \
ipc \
mimetypes \
serialization \
threads \
tools
qtConfig(thread): SUBDIRS += threads

View File

@ -53,14 +53,12 @@
#include <QDialog>
#include <QDataStream>
#include <qlocalsocket.h>
#include <QLocalSocket>
QT_BEGIN_NAMESPACE
class QLabel;
class QLineEdit;
class QPushButton;
class QLocalSocket;
QT_END_NAMESPACE
class Client : public QDialog

View File

@ -49,9 +49,6 @@
****************************************************************************/
#include <QApplication>
#include <QtCore>
#include <stdlib.h>
#include "server.h"

View File

@ -48,15 +48,11 @@
**
****************************************************************************/
#include "server.h"
#include <QtWidgets>
#include <QtNetwork>
#include <stdlib.h>
#include "server.h"
#include <qlocalserver.h>
#include <qlocalsocket.h>
Server::Server(QWidget *parent)
: QDialog(parent)
{

View File

@ -51,7 +51,6 @@
#include "dialog.h"
#include <QFileDialog>
#include <QBuffer>
#include <QtCore/QDebug>
/*!
\class Dialog
@ -81,10 +80,10 @@ Dialog::Dialog(QWidget *parent)
: QDialog(parent), sharedMemory("QSharedMemoryExample")
{
ui.setupUi(this);
connect(ui.loadFromFileButton, SIGNAL(clicked()), SLOT(loadFromFile()));
connect(ui.loadFromSharedMemoryButton,
SIGNAL(clicked()),
SLOT(loadFromMemory()));
connect(ui.loadFromFileButton, &QPushButton::clicked,
this, &Dialog::loadFromFile);
connect(ui.loadFromSharedMemoryButton, &QPushButton::clicked,
this, &Dialog::loadFromMemory);
setWindowTitle(tr("SharedMemory Example"));
}
//! [0]

View File

@ -51,8 +51,8 @@
#ifndef DIALOG_H
#define DIALOG_H
#include <qdialog.h>
#include <qsharedmemory.h>
#include <QDialog>
#include <QSharedMemory>
#include "ui_dialog.h"
//! [0]
@ -61,7 +61,7 @@ class Dialog : public QDialog
Q_OBJECT
public:
Dialog(QWidget *parent = 0);
Dialog(QWidget *parent = nullptr);
public slots:
void loadFromFile();

View File

@ -55,9 +55,6 @@
#include <QCommandLineParser>
#include <QCommandLineOption>
#include <QDebug>
#include <QMimeDatabase>
#include <QMimeType>
int main(int argc, char *argv[])
{

View File

@ -185,7 +185,9 @@ void MainWindow::find()
m_findMatches.clear();
m_findIndex = 0;
foreach (const QStandardItem *item, m_model->findItems(value, Qt::MatchContains | Qt::MatchFixedString | Qt::MatchRecursive))
const QList<QStandardItem *> items =
m_model->findItems(value, Qt::MatchContains | Qt::MatchFixedString | Qt::MatchRecursive);
for (const QStandardItem *item : items)
m_findMatches.append(m_model->indexFromItem(item));
statusBar()->showMessage(tr("%n mime types match \"%1\".", 0, m_findMatches.size()).arg(value));
updateFindActions();

View File

@ -50,9 +50,8 @@
#include "mimetypemodel.h"
#include <QIcon>
#include <QDebug>
#include <QIcon>
#include <QMimeDatabase>
#include <QTextStream>
#include <QVariant>

View File

@ -2,8 +2,7 @@ QT += core
QT -= gui
TARGET = cbordump
CONFIG += console
CONFIG -= app_bundle
CONFIG += cmdline
TEMPLATE = app

View File

@ -56,7 +56,6 @@
#include <QCborArray>
#include <QCborValue>
#include <QDataStream>
#include <QDebug>
#include <QFloat16>
#include <QFile>
#include <QMetaType>

View File

@ -2,8 +2,7 @@ QT += core
QT -= gui
TARGET = convert
CONFIG += console
CONFIG -= app_bundle
CONFIG += cmdline
TEMPLATE = app

View File

@ -70,7 +70,7 @@ static QVariant variantFromXml(QXmlStreamReader &xml, Converter::Options options
static QVariantList listFromXml(QXmlStreamReader &xml, Converter::Options options)
{
QVariantList list;
while (!xml.atEnd() && !xml.isEndElement()) {
while (!xml.atEnd() && !(xml.isEndElement() && xml.name() == QLatin1String("list"))) {
xml.readNext();
switch (xml.tokenType()) {
case QXmlStreamReader::StartElement:
@ -107,7 +107,7 @@ static QVariantList listFromXml(QXmlStreamReader &xml, Converter::Options option
static VariantOrderedMap::value_type mapEntryFromXml(QXmlStreamReader &xml, Converter::Options options)
{
QVariant key, value;
while (!xml.atEnd() && !xml.isEndElement()) {
while (!xml.atEnd() && !(xml.isEndElement() && xml.name() == QLatin1String("entry"))) {
xml.readNext();
switch (xml.tokenType()) {
case QXmlStreamReader::StartElement:
@ -150,7 +150,7 @@ static QVariant mapFromXml(QXmlStreamReader &xml, Converter::Options options)
QVariantMap map1;
VariantOrderedMap map2;
while (!xml.atEnd() && !xml.isEndElement()) {
while (!xml.atEnd() && !(xml.isEndElement() && xml.name() == QLatin1String("map"))) {
xml.readNext();
switch (xml.tokenType()) {
case QXmlStreamReader::StartElement:

View File

@ -185,7 +185,7 @@ void Game::write(QJsonObject &json) const
json["player"] = playerObject;
QJsonArray levelArray;
foreach (const Level level, mLevels) {
for (const Level &level : mLevels) {
QJsonObject levelObject;
level.write(levelObject);
levelArray.append(levelObject);

View File

@ -97,7 +97,7 @@ void Level::write(QJsonObject &json) const
{
json["name"] = mName;
QJsonArray npcArray;
foreach (const Character npc, mNpcs) {
for (const Character &npc : mNpcs) {
QJsonObject npcObject;
npc.write(npcObject);
npcArray.append(npcObject);

View File

@ -2,8 +2,7 @@ QT += core
QT -= gui
TARGET = savegame
CONFIG += console
CONFIG -= app_bundle
CONFIG += cmdline
TEMPLATE = app

View File

@ -48,14 +48,13 @@
**
****************************************************************************/
#include "mandelbrotwidget.h"
#include <QPainter>
#include <QKeyEvent>
#include <math.h>
#include "mandelbrotwidget.h"
//! [0]
const double DefaultCenterX = -0.637011f;
const double DefaultCenterY = -0.0395159f;
@ -75,7 +74,8 @@ MandelbrotWidget::MandelbrotWidget(QWidget *parent)
pixmapScale = DefaultScale;
curScale = DefaultScale;
connect(&thread, SIGNAL(renderedImage(QImage,double)), this, SLOT(updatePixmap(QImage,double)));
connect(&thread, &RenderThread::renderedImage,
this, &MandelbrotWidget::updatePixmap);
setWindowTitle(tr("Mandelbrot"));
#ifndef QT_NO_CURSOR
@ -117,7 +117,8 @@ void MandelbrotWidget::paintEvent(QPaintEvent * /* event */)
painter.save();
painter.translate(newX, newY);
painter.scale(scaleFactor, scaleFactor);
QRectF exposed = painter.matrix().inverted().mapRect(rect()).adjusted(-1, -1, 1, 1);
QRectF exposed = painter.transform().inverted().mapRect(rect()).adjusted(-1, -1, 1, 1);
painter.drawPixmap(exposed, pixmap, exposed);
painter.restore();
}

View File

@ -62,7 +62,7 @@ class MandelbrotWidget : public QWidget
Q_OBJECT
public:
MandelbrotWidget(QWidget *parent = 0);
MandelbrotWidget(QWidget *parent = nullptr);
protected:
void paintEvent(QPaintEvent *event) override;

View File

@ -50,7 +50,7 @@
#include "renderthread.h"
#include <QtWidgets>
#include <QImage>
#include <cmath>
//! [0]

View File

@ -66,7 +66,7 @@ class RenderThread : public QThread
Q_OBJECT
public:
RenderThread(QObject *parent = 0);
RenderThread(QObject *parent = nullptr);
~RenderThread();
void render(double centerX, double centerY, double scaleFactor, QSize resultSize);

View File

@ -48,8 +48,6 @@
**
****************************************************************************/
#include <QColor>
#include <QRect>
#include "block.h"
Block::Block()
@ -57,9 +55,8 @@ Block::Block()
}
Block::Block(const Block &other)
: m_rect(other.m_rect), m_color(other.m_color)
{
m_rect = other.m_rect;
m_color = other.m_color;
}
Block::~Block()
@ -67,9 +64,8 @@ Block::~Block()
}
Block::Block(const QRect &rect, const QColor &color)
: m_rect(rect), m_color(color)
{
m_rect = rect;
m_color = color;
}
QColor Block::color() const

View File

@ -52,7 +52,6 @@
#define BLOCK_H
#include <QColor>
#include <QDebug>
#include <QMetaType>
#include <QRect>

View File

@ -62,7 +62,7 @@ class RenderThread : public QThread
Q_OBJECT
public:
RenderThread(QObject *parent = 0);
RenderThread(QObject *parent = nullptr);
~RenderThread();
void processImage(const QImage &image);

View File

@ -48,30 +48,34 @@
**
****************************************************************************/
#include <QtWidgets>
#include "window.h"
#include <QtWidgets>
//! [Window constructor start]
Window::Window()
Window::Window(QWidget *parent)
: QWidget(parent), thread(new RenderThread(this))
{
thread = new RenderThread();
//! [Window constructor start] //! [set up widgets and connections]
label = new QLabel();
label = new QLabel(this);
label->setAlignment(Qt::AlignCenter);
loadButton = new QPushButton(tr("&Load image..."));
resetButton = new QPushButton(tr("&Stop"));
loadButton = new QPushButton(tr("&Load image..."), this);
resetButton = new QPushButton(tr("&Stop"), this);
resetButton->setEnabled(false);
connect(loadButton, SIGNAL(clicked()), this, SLOT(loadImage()));
connect(resetButton, SIGNAL(clicked()), thread, SLOT(stopProcess()));
connect(thread, SIGNAL(finished()), this, SLOT(resetUi()));
connect(loadButton, &QPushButton::clicked,
this, QOverload<>::of(&Window::loadImage));
connect(resetButton, &QPushButton::clicked,
thread, &RenderThread::stopProcess);
connect(thread, &RenderThread::finished,
this, &Window::resetUi);
//! [set up widgets and connections] //! [connecting signal with custom type]
connect(thread, SIGNAL(sendBlock(Block)), this, SLOT(addBlock(Block)));
connect(thread, &RenderThread::sendBlock,
this, &Window::addBlock);
//! [connecting signal with custom type]
QHBoxLayout *buttonLayout = new QHBoxLayout();
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addStretch();
buttonLayout->addWidget(loadButton);
buttonLayout->addWidget(resetButton);
@ -89,9 +93,10 @@ Window::Window()
void Window::loadImage()
{
QStringList formats;
foreach (QByteArray format, QImageReader::supportedImageFormats())
const QList<QByteArray> supportedFormats = QImageReader::supportedImageFormats();
for (const QByteArray &format : supportedFormats)
if (format.toLower() == format)
formats.append("*." + format);
formats.append(QLatin1String("*.") + QString::fromLatin1(format));
QString newPath = QFileDialog::getOpenFileName(this, tr("Open Image"),
path, tr("Image files (%1)").arg(formats.join(' ')));

View File

@ -65,7 +65,7 @@ class Window : public QWidget
Q_OBJECT
public:
Window();
Window(QWidget *parent = nullptr);
void loadImage(const QImage &image);
public slots:

View File

@ -94,12 +94,6 @@ public:
}
fprintf(stderr, "\n");
}
signals:
void stringConsumed(const QString &text);
protected:
bool finish;
};
//! [4]

View File

@ -1,8 +1,7 @@
SOURCES += semaphores.cpp
QT = core
CONFIG -= app_bundle
CONFIG += console
CONFIG += cmdline
# install
target.path = $$[QT_INSTALL_EXAMPLES]/corelib/threads/semaphores

View File

@ -1,6 +1,6 @@
QT = core
CONFIG -= moc app_bundle
CONFIG += console
CONFIG -= moc
CONFIG += cmdline
SOURCES += waitconditions.cpp

View File

@ -49,7 +49,6 @@
****************************************************************************/
#include "randomlistmodel.h"
#include <QRandomGenerator>
#include <stdlib.h>
static const int bufferSize(500);
static const int lookAhead(100);

View File

@ -59,7 +59,7 @@ class RandomListModel : public QAbstractListModel
{
Q_OBJECT
public:
RandomListModel(QObject *parent = 0);
RandomListModel(QObject *parent = nullptr);
~RandomListModel();
int rowCount(const QModelIndex & = QModelIndex()) const override;

View File

@ -49,6 +49,7 @@
****************************************************************************/
#include <QCoreApplication>
#include <QDebug>
#include <QVariant>
#include "message.h"

View File

@ -50,15 +50,16 @@
#include "message.h"
#include <QDebug>
//! [Message class implementation]
Message::Message()
{
}
Message::Message(const Message &other)
: m_body(other.m_body), m_headers(other.m_headers)
{
m_body = other.m_body;
m_headers = other.m_headers;
}
Message::~Message()
@ -67,9 +68,8 @@ Message::~Message()
//! [Message class implementation]
Message::Message(const QString &body, const QStringList &headers)
: m_body(body), m_headers(headers)
{
m_body = body;
m_headers = headers;
}
//! [custom type streaming operator]

View File

@ -51,7 +51,6 @@
#ifndef MESSAGE_H
#define MESSAGE_H
#include <QDebug>
#include <QMetaType>
#include <QStringList>

View File

@ -57,19 +57,20 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Window window1;
QStringList headers;
headers << "Subject: Hello World"
<< "From: address@example.com";
QString body = "This is a test.\r\n";
Message message(body, headers);
Window window1;
window1.setMessage(message);
Window window2;
QObject::connect(&window1, SIGNAL(messageSent(Message)),
&window2, SLOT(setMessage(Message)));
QObject::connect(&window2, SIGNAL(messageSent(Message)),
&window1, SLOT(setMessage(Message)));
QObject::connect(&window1, &Window::messageSent,
&window2, &Window::setMessage);
QObject::connect(&window2, &Window::messageSent,
&window1, &Window::setMessage);
window1.show();
window2.show();
return app.exec();

View File

@ -55,9 +55,8 @@ Message::Message()
}
Message::Message(const Message &other)
: m_body(other.m_body), m_headers(other.m_headers)
{
m_body = other.m_body;
m_headers = other.m_headers;
}
Message::~Message()
@ -65,9 +64,8 @@ Message::~Message()
}
Message::Message(const QString &body, const QStringList &headers)
: m_body(body), m_headers(headers)
{
m_body = body;
m_headers = headers;
}
QString Message::body() const

View File

@ -51,7 +51,6 @@
#ifndef MESSAGE_H
#define MESSAGE_H
#include <QDebug>
#include <QMetaType>
#include <QStringList>

View File

@ -52,14 +52,15 @@
#include "window.h"
//! [Window constructor]
Window::Window()
Window::Window(QWidget *parent)
: QWidget(parent), editor(new QTextEdit(this))
{
editor = new QTextEdit();
QPushButton *sendButton = new QPushButton(tr("&Send message"));
connect(sendButton, SIGNAL(clicked()), this, SLOT(sendMessage()));
connect(sendButton, &QPushButton::clicked,
this, &Window::sendMessage);
QHBoxLayout *buttonLayout = new QHBoxLayout();
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addStretch();
buttonLayout->addWidget(sendButton);
buttonLayout->addStretch();

View File

@ -62,7 +62,7 @@ class Window : public QWidget
Q_OBJECT
public:
Window();
Window(QWidget *parent = nullptr);
signals:
void messageSent(const Message &message);

View File

@ -117,8 +117,8 @@
\snippet tools/customtype/main.cpp storing a custom value
Alternatively, the QVariant::fromValue() and qVariantSetValue() functions
can be used if you are using a compiler without support for member template
Alternatively, the QVariant::fromValue() function can be used if
you are using a compiler without support for member template
functions.
The value can be retrieved using the QVariant::value() member template
@ -126,9 +126,6 @@
\snippet tools/customtype/main.cpp retrieving a custom value
Alternatively, the qVariantValue() template function can be used if
you are using a compiler without support for member template functions.
\section1 Further Reading
The custom \c Message type can also be used with direct signal-slot

View File

@ -62,7 +62,8 @@ void method1()
qDebug() << "Error:" << reply.error().message();
exit(1);
}
foreach (QString name, reply.value())
const QStringList values = reply.value();
for (const QString &name : values)
qDebug() << name;
}

View File

@ -162,7 +162,6 @@ void SlippyMap::handleNetworkData(QNetworkReply *reply)
{
QImage img;
QPoint tp = reply->request().attribute(QNetworkRequest::User).toPoint();
QUrl url = reply->url();
if (!reply->error())
if (!img.load(reply, 0))
img = QImage();
@ -173,10 +172,12 @@ void SlippyMap::handleNetworkData(QNetworkReply *reply)
emit updated(tileRect(tp));
// purge unused spaces
QRect bound = m_tilesRect.adjusted(-2, -2, 2, 2);
foreach(QPoint tp, m_tilePixmaps.keys())
if (!bound.contains(tp))
m_tilePixmaps.remove(tp);
const QRect bound = m_tilesRect.adjusted(-2, -2, 2, 2);
for (auto it = m_tilePixmaps.keyBegin(); it != m_tilePixmaps.keyEnd(); ++it) {
const QPoint &tp = *it;
if (!bound.contains(tp))
m_tilePixmaps.remove(tp);
}
download();
}

View File

@ -88,7 +88,8 @@ void OpenGLWindow::render()
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
m_device->setSize(size());
m_device->setSize(size() * devicePixelRatio());
m_device->setDevicePixelRatio(devicePixelRatio());
QPainter painter(m_device);
render(&painter);

View File

@ -142,7 +142,8 @@ void BearerMonitor::configurationAdded(const QNetworkConfiguration &config, QTre
treeWidget->addTopLevelItem(item);
if (config.type() == QNetworkConfiguration::ServiceNetwork) {
foreach (const QNetworkConfiguration &child, config.children())
const QList<QNetworkConfiguration> children = config.children();
for (const QNetworkConfiguration &child : children)
configurationAdded(child, item);
}
}
@ -181,7 +182,8 @@ void BearerMonitor::configurationChanged(const QNetworkConfiguration &config)
void BearerMonitor::updateSnapConfiguration(QTreeWidgetItem *parent, const QNetworkConfiguration &snap)
{
QMap<QString, QTreeWidgetItem *> itemMap;
foreach (QTreeWidgetItem *item, parent->takeChildren())
const QList<QTreeWidgetItem *> children = parent->takeChildren();
for (QTreeWidgetItem *item : children)
itemMap.insert(item->data(0, Qt::UserRole).toString(), item);
QList<QNetworkConfiguration> allConfigurations = snap.children();

View File

@ -172,35 +172,43 @@ void DnsManager::showResults()
printf("Error: %i (%s)\n", dns->error(), qPrintable(dns->errorString()));
// CNAME records
foreach (const QDnsDomainNameRecord &record, dns->canonicalNameRecords())
const QList<QDnsDomainNameRecord> cnameRecords = dns->canonicalNameRecords();
for (const QDnsDomainNameRecord &record : cnameRecords)
printf("%s\t%i\tIN\tCNAME\t%s\n", qPrintable(record.name()), record.timeToLive(), qPrintable(record.value()));
// A and AAAA records
foreach (const QDnsHostAddressRecord &record, dns->hostAddressRecords()) {
const QList<QDnsHostAddressRecord> aRecords = dns->hostAddressRecords();
for (const QDnsHostAddressRecord &record : aRecords) {
const char *type = (record.value().protocol() == QAbstractSocket::IPv6Protocol) ? "AAAA" : "A";
printf("%s\t%i\tIN\t%s\t%s\n", qPrintable(record.name()), record.timeToLive(), type, qPrintable(record.value().toString()));
}
// MX records
foreach (const QDnsMailExchangeRecord &record, dns->mailExchangeRecords())
const QList<QDnsMailExchangeRecord> mxRecords = dns->mailExchangeRecords();
for (const QDnsMailExchangeRecord &record : mxRecords)
printf("%s\t%i\tIN\tMX\t%u %s\n", qPrintable(record.name()), record.timeToLive(), record.preference(), qPrintable(record.exchange()));
// NS records
foreach (const QDnsDomainNameRecord &record, dns->nameServerRecords())
const QList<QDnsDomainNameRecord> nsRecords = dns->nameServerRecords();
for (const QDnsDomainNameRecord &record : nsRecords)
printf("%s\t%i\tIN\tNS\t%s\n", qPrintable(record.name()), record.timeToLive(), qPrintable(record.value()));
// PTR records
foreach (const QDnsDomainNameRecord &record, dns->pointerRecords())
const QList<QDnsDomainNameRecord> ptrRecords = dns->pointerRecords();
for (const QDnsDomainNameRecord &record : ptrRecords)
printf("%s\t%i\tIN\tPTR\t%s\n", qPrintable(record.name()), record.timeToLive(), qPrintable(record.value()));
// SRV records
foreach (const QDnsServiceRecord &record, dns->serviceRecords())
const QList<QDnsServiceRecord> srvRecords = dns->serviceRecords();
for (const QDnsServiceRecord &record : srvRecords)
printf("%s\t%i\tIN\tSRV\t%u %u %u %s\n", qPrintable(record.name()), record.timeToLive(), record.priority(), record.weight(), record.port(), qPrintable(record.target()));
// TXT records
foreach (const QDnsTextRecord &record, dns->textRecords()) {
const QList<QDnsTextRecord> txtRecords = dns->textRecords();
for (const QDnsTextRecord &record : txtRecords) {
QStringList values;
foreach (const QByteArray &ba, record.values())
const QList<QByteArray> dnsRecords = record.values();
for (const QByteArray &ba : dnsRecords)
values << "\"" + QString::fromLatin1(ba) + "\"";
printf("%s\t%i\tIN\tTXT\t%s\n", qPrintable(record.name()), record.timeToLive(), qPrintable(values.join(' ')));
}

View File

@ -1,7 +1,6 @@
TEMPLATE = app
QT = core network
mac:CONFIG -= app_bundle
win32:CONFIG += console
CONFIG += cmdline
HEADERS += dnslookup.h
SOURCES += dnslookup.cpp

View File

@ -1,6 +1,5 @@
QT = core network
CONFIG += console
CONFIG -= app_bundle
CONFIG += cmdline
SOURCES += main.cpp

View File

@ -1,6 +1,5 @@
QT = core network
CONFIG += console
CONFIG -= app_bundle
CONFIG += cmdline
HEADERS += downloadmanager.h textprogressbar.h
SOURCES += downloadmanager.cpp main.cpp textprogressbar.cpp

View File

@ -160,7 +160,7 @@ void GSuggestCompletion::showCompletion(const QVector<QString> &choices)
for (const auto &choice : choices) {
auto item = new QTreeWidgetItem(popup);
item->setText(0, choice);
item->setTextColor(0, color);
item->setForeground(0, color);
}
popup->setCurrentItem(popup->topLevelItem(0));

View File

@ -319,7 +319,7 @@ void HttpWindow::slotAuthenticationRequired(QNetworkReply *, QAuthenticator *aut
void HttpWindow::sslErrors(QNetworkReply *, const QList<QSslError> &errors)
{
QString errorString;
foreach (const QSslError &error, errors) {
for (const QSslError &error : errors) {
if (!errorString.isEmpty())
errorString += '\n';
errorString += error.errorString();

View File

@ -99,7 +99,7 @@ void Dialog::start()
startButton->setEnabled(false);
#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::WaitCursor);
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
#endif
bytesWritten = 0;
@ -162,7 +162,7 @@ void Dialog::updateServerProgress()
tcpServerConnection->close();
startButton->setEnabled(true);
#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
QGuiApplication::restoreOverrideCursor();
#endif
}
}
@ -198,6 +198,6 @@ void Dialog::displayError(QAbstractSocket::SocketError socketError)
serverStatusLabel->setText(tr("Server ready"));
startButton->setEnabled(true);
#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
QGuiApplication::restoreOverrideCursor();
#endif
}

View File

@ -71,8 +71,7 @@ void Client::sendMessage(const QString &message)
if (message.isEmpty())
return;
QList<Connection *> connections = peers.values();
foreach (Connection *connection, connections)
for (Connection *connection : qAsConst(peers))
connection->sendMessage(message);
}
@ -90,8 +89,8 @@ bool Client::hasConnection(const QHostAddress &senderIp, int senderPort) const
if (!peers.contains(senderIp))
return false;
QList<Connection *> connections = peers.values(senderIp);
foreach (Connection *connection, connections) {
const QList<Connection *> connections = peers.values(senderIp);
for (const Connection *connection : connections) {
if (connection->peerPort() == senderPort)
return true;
}

View File

@ -104,9 +104,9 @@ void PeerManager::startBroadcasting()
broadcastTimer.start();
}
bool PeerManager::isLocalHostAddress(const QHostAddress &address)
bool PeerManager::isLocalHostAddress(const QHostAddress &address) const
{
foreach (QHostAddress localAddress, ipAddresses) {
for (const QHostAddress &localAddress : ipAddresses) {
if (address.isEqual(localAddress))
return true;
}
@ -125,7 +125,7 @@ void PeerManager::sendBroadcastDatagram()
}
bool validBroadcastAddresses = true;
foreach (QHostAddress address, broadcastAddresses) {
for (const QHostAddress &address : qAsConst(broadcastAddresses)) {
if (broadcastSocket.writeDatagram(datagram, address,
broadcastPort) == -1)
validBroadcastAddresses = false;
@ -182,8 +182,10 @@ void PeerManager::updateAddresses()
{
broadcastAddresses.clear();
ipAddresses.clear();
foreach (QNetworkInterface interface, QNetworkInterface::allInterfaces()) {
foreach (QNetworkAddressEntry entry, interface.addressEntries()) {
const QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces();
for (const QNetworkInterface &interface : interfaces) {
const QList<QNetworkAddressEntry> entries = interface.addressEntries();
for (const QNetworkAddressEntry &entry : entries) {
QHostAddress broadcastAddress = entry.broadcast();
if (broadcastAddress != QHostAddress::Null && entry.ip() != QHostAddress::LocalHost) {
broadcastAddresses << broadcastAddress;

View File

@ -70,7 +70,7 @@ public:
void setServerPort(int port);
QString userName() const;
void startBroadcasting();
bool isLocalHostAddress(const QHostAddress &address);
bool isLocalHostAddress(const QHostAddress &address) const;
signals:
void newConnection(Connection *connection);

Some files were not shown because too many files have changed in this diff Show More