summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.bat4
-rw-r--r--examples/network/broadcastreceiver/broadcastreceiver.pro1
-rw-r--r--examples/network/broadcastsender/broadcastsender.pro1
-rw-r--r--examples/network/multicastreceiver/multicastreceiver.pro1
-rw-r--r--examples/network/multicastsender/multicastsender.pro1
-rw-r--r--examples/network/network-chat/network-chat.pro1
-rw-r--r--header.LGPL2133
-rw-r--r--mkspecs/features/mac/default_post.prf23
-rw-r--r--mkspecs/features/mac/default_pre.prf4
-rw-r--r--mkspecs/integrity-armv8-rcar/qplatformdefs.h30
-rw-r--r--mkspecs/macx-clang/Info.plist.app10
-rw-r--r--mkspecs/macx-clang/Info.plist.lib10
-rw-r--r--mkspecs/macx-g++/Info.plist.app10
-rw-r--r--mkspecs/macx-g++/Info.plist.lib10
-rw-r--r--mkspecs/macx-icc/Info.plist.app10
-rw-r--r--mkspecs/macx-icc/Info.plist.lib10
-rw-r--r--mkspecs/macx-ios-clang/Info.plist.app14
-rw-r--r--mkspecs/macx-ios-clang/Info.plist.lib10
-rw-r--r--mkspecs/macx-tvos-clang/Info.plist.app12
-rw-r--r--mkspecs/macx-tvos-clang/Info.plist.lib10
-rw-r--r--mkspecs/macx-watchos-clang/Info.plist.app12
-rw-r--r--mkspecs/macx-watchos-clang/Info.plist.lib10
-rw-r--r--qmake/doc/src/qmake-manual.qdoc59
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp2
-rw-r--r--qmake/generators/unix/unixmake2.cpp64
-rw-r--r--qmake/generators/win32/mingw_make.cpp3
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp29
-rw-r--r--qmake/generators/win32/msvc_nmake.h2
-rw-r--r--src/corelib/Qt5CoreMacros.cmake2
-rw-r--r--src/corelib/global/qglobal.h6
-rw-r--r--src/gui/kernel/qevent.cpp1
-rw-r--r--src/gui/kernel/qpalette.cpp32
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp88
-rw-r--r--src/gui/text/qfontdatabase.cpp35
-rw-r--r--src/gui/text/qfontengine.cpp37
-rw-r--r--src/network/access/qftp.cpp12
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm3
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.cpp2
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qbackingstore_x11_p.h34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qcolormap_x11.cpp34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qcolormap_x11_p.h34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qt_x11_p.h34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qtessellator.cpp34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qtessellator_p.h34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp34
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.h34
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp14
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp16
-rw-r--r--src/sql/doc/snippets/code/doc_src_sql-driver.cpp12
-rw-r--r--src/sql/doc/src/sql-driver.qdoc6
-rw-r--r--src/sql/kernel/qsqlrecord.cpp15
-rw-r--r--src/tools/moc/generator.cpp4
-rw-r--r--src/tools/qlalr/qlalr.pro2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp9
-rw-r--r--src/widgets/dialogs/qfilesystemmodel_p.h19
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp3
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp3
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp3
-rw-r--r--src/widgets/styles/qstylehelper.cpp21
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp2
-rw-r--r--src/winmain/qtmain_winrt.cpp10
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/tst_qsortfilterproxymodel_recursive.cpp27
-rw-r--r--tests/auto/corelib/tools/qdatetime/BLACKLIST3
-rw-r--r--tests/auto/corelib/tools/qstringview/tst_qstringview.cpp29
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp31
-rw-r--r--tests/auto/gui/text/qrawfont/tst_qrawfont.cpp37
-rw-r--r--tests/auto/network/access/qftp/tst_qftp.cpp209
-rw-r--r--tests/auto/network/socket/qudpsocket/BLACKLIST3
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp19
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp25
-rw-r--r--tests/auto/tools/qmake/testdata/rawString/object2.h34
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp29
77 files changed, 1141 insertions, 490 deletions
diff --git a/configure.bat b/configure.bat
index 6e9a82f2df..7cadd783ea 100644
--- a/configure.bat
+++ b/configure.bat
@@ -157,10 +157,10 @@ rem Determine host spec
if "%PLATFORM%" == "" (
if not "%icl.exe%" == "" (
set PLATFORM=win32-icc
- ) else if not "%clang-cl.exe%" == "" (
- set PLATFORM=win32-clang-msvc
) else if not "%cl.exe%" == "" (
set PLATFORM=win32-msvc
+ ) else if not "%clang-cl.exe%" == "" (
+ set PLATFORM=win32-clang-msvc
) else if not "%g++.exe%" == "" (
set PLATFORM=win32-g++
) else (
diff --git a/examples/network/broadcastreceiver/broadcastreceiver.pro b/examples/network/broadcastreceiver/broadcastreceiver.pro
index edadf1c28d..5c58962f3a 100644
--- a/examples/network/broadcastreceiver/broadcastreceiver.pro
+++ b/examples/network/broadcastreceiver/broadcastreceiver.pro
@@ -1,4 +1,5 @@
QT += network widgets
+requires(qtConfig(udpsocket))
HEADERS = receiver.h
SOURCES = receiver.cpp \
diff --git a/examples/network/broadcastsender/broadcastsender.pro b/examples/network/broadcastsender/broadcastsender.pro
index 4c5af7f849..9598a2e428 100644
--- a/examples/network/broadcastsender/broadcastsender.pro
+++ b/examples/network/broadcastsender/broadcastsender.pro
@@ -1,4 +1,5 @@
QT += network widgets
+requires(qtConfig(udpsocket))
HEADERS = sender.h
SOURCES = sender.cpp \
diff --git a/examples/network/multicastreceiver/multicastreceiver.pro b/examples/network/multicastreceiver/multicastreceiver.pro
index 6906fc6cb5..e9bcb45a8d 100644
--- a/examples/network/multicastreceiver/multicastreceiver.pro
+++ b/examples/network/multicastreceiver/multicastreceiver.pro
@@ -1,4 +1,5 @@
QT += network widgets
+requires(qtConfig(udpsocket))
HEADERS = receiver.h
SOURCES = receiver.cpp \
diff --git a/examples/network/multicastsender/multicastsender.pro b/examples/network/multicastsender/multicastsender.pro
index 4797b194a9..160f37be6d 100644
--- a/examples/network/multicastsender/multicastsender.pro
+++ b/examples/network/multicastsender/multicastsender.pro
@@ -2,6 +2,7 @@ HEADERS = sender.h
SOURCES = sender.cpp \
main.cpp
QT += network widgets
+requires(qtConfig(udpsocket))
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/multicastsender
diff --git a/examples/network/network-chat/network-chat.pro b/examples/network/network-chat/network-chat.pro
index b20e8b2934..3d525c96cc 100644
--- a/examples/network/network-chat/network-chat.pro
+++ b/examples/network/network-chat/network-chat.pro
@@ -11,6 +11,7 @@ SOURCES = chatdialog.cpp \
server.cpp
FORMS = chatdialog.ui
QT += network widgets
+requires(qtConfig(udpsocket))
# install
target.path = $$[QT_INSTALL_EXAMPLES]/network/network-chat
diff --git a/header.LGPL21 b/header.LGPL21
deleted file mode 100644
index 533390b078..0000000000
--- a/header.LGPL21
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the FOO module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index e645ba5803..50a1ec6764 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -47,6 +47,29 @@ app_extension_api_only {
}
macx-xcode {
+ qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO
+ !isEmpty(QMAKE_PKGINFO_TYPEINFO): \
+ qmake_pkginfo_typeinfo.value = $$QMAKE_PKGINFO_TYPEINFO
+ else: \
+ qmake_pkginfo_typeinfo.value = "????"
+ QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo
+
+ !isEmpty(VERSION) {
+ l = $$split(VERSION, '.') 0 0 # make sure there are at least three
+ VER_MAJ = $$member(l, 0, 0)
+ VER_MIN = $$member(l, 1, 1)
+ VER_PAT = $$member(l, 2, 2)
+ unset(l)
+
+ qmake_full_version.name = QMAKE_FULL_VERSION
+ qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
+ QMAKE_MAC_XCODE_SETTINGS += qmake_full_version
+
+ qmake_short_version.name = QMAKE_SHORT_VERSION
+ qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}
+ QMAKE_MAC_XCODE_SETTINGS += qmake_short_version
+ }
+
!isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
debug_information_format.name = DEBUG_INFORMATION_FORMAT
debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
index 44636f2288..e3534561a5 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -54,3 +54,7 @@ macx-xcode:qtConfig(static): \
# feature, which allows Xcode to choose the Qt libraries to link to
# at build time, depending on the current Xcode SDK and configuration.
QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX
+
+xcode_copy_phase_strip_setting.name = COPY_PHASE_STRIP
+xcode_copy_phase_strip_setting.value = NO
+QMAKE_MAC_XCODE_SETTINGS += xcode_copy_phase_strip_setting
diff --git a/mkspecs/integrity-armv8-rcar/qplatformdefs.h b/mkspecs/integrity-armv8-rcar/qplatformdefs.h
index 55afd0c3c7..a743326346 100644
--- a/mkspecs/integrity-armv8-rcar/qplatformdefs.h
+++ b/mkspecs/integrity-armv8-rcar/qplatformdefs.h
@@ -5,27 +5,33 @@
**
** This file is part of the qmake spec of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/mkspecs/macx-clang/Info.plist.app b/mkspecs/macx-clang/Info.plist.app
index ebd108dadf..4d64a77704 100644
--- a/mkspecs/macx-clang/Info.plist.app
+++ b/mkspecs/macx-clang/Info.plist.app
@@ -3,17 +3,19 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIconFile</key>
- <string>@ICON@</string>
+ <string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>NSPrincipalClass</key>
diff --git a/mkspecs/macx-clang/Info.plist.lib b/mkspecs/macx-clang/Info.plist.lib
index 044cbd3393..ce28365500 100644
--- a/mkspecs/macx-clang/Info.plist.lib
+++ b/mkspecs/macx-clang/Info.plist.lib
@@ -3,19 +3,19 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
- <string>@LIBRARY@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>@SHORT_VERSION@</string>
+ <string>${QMAKE_SHORT_VERSION}</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleVersion</key>
- <string>@FULL_VERSION@</string>
+ <string>${QMAKE_FULL_VERSION}</string>
<key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict>
diff --git a/mkspecs/macx-g++/Info.plist.app b/mkspecs/macx-g++/Info.plist.app
index ebd108dadf..4d64a77704 100644
--- a/mkspecs/macx-g++/Info.plist.app
+++ b/mkspecs/macx-g++/Info.plist.app
@@ -3,17 +3,19 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIconFile</key>
- <string>@ICON@</string>
+ <string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>NSPrincipalClass</key>
diff --git a/mkspecs/macx-g++/Info.plist.lib b/mkspecs/macx-g++/Info.plist.lib
index 044cbd3393..ce28365500 100644
--- a/mkspecs/macx-g++/Info.plist.lib
+++ b/mkspecs/macx-g++/Info.plist.lib
@@ -3,19 +3,19 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
- <string>@LIBRARY@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>@SHORT_VERSION@</string>
+ <string>${QMAKE_SHORT_VERSION}</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleVersion</key>
- <string>@FULL_VERSION@</string>
+ <string>${QMAKE_FULL_VERSION}</string>
<key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict>
diff --git a/mkspecs/macx-icc/Info.plist.app b/mkspecs/macx-icc/Info.plist.app
index ebd108dadf..4d64a77704 100644
--- a/mkspecs/macx-icc/Info.plist.app
+++ b/mkspecs/macx-icc/Info.plist.app
@@ -3,17 +3,19 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIconFile</key>
- <string>@ICON@</string>
+ <string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>NSPrincipalClass</key>
diff --git a/mkspecs/macx-icc/Info.plist.lib b/mkspecs/macx-icc/Info.plist.lib
index 044cbd3393..ce28365500 100644
--- a/mkspecs/macx-icc/Info.plist.lib
+++ b/mkspecs/macx-icc/Info.plist.lib
@@ -3,19 +3,19 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
- <string>@LIBRARY@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>@SHORT_VERSION@</string>
+ <string>${QMAKE_SHORT_VERSION}</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleVersion</key>
- <string>@FULL_VERSION@</string>
+ <string>${QMAKE_FULL_VERSION}</string>
<key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict>
diff --git a/mkspecs/macx-ios-clang/Info.plist.app b/mkspecs/macx-ios-clang/Info.plist.app
index 4a7c527260..1acbf9d768 100644
--- a/mkspecs/macx-ios-clang/Info.plist.app
+++ b/mkspecs/macx-ios-clang/Info.plist.app
@@ -5,25 +5,27 @@
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIconFile</key>
- <string>@ICON@</string>
+ <string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.0</string>
+ <string>${QMAKE_SHORT_VERSION}</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleVersion</key>
- <string>1.0</string>
+ <string>${QMAKE_FULL_VERSION}</string>
<key>LSRequiresIPhoneOS</key>
<true/>
+ <key>MinimumOSVersion</key>
+ <string>${IPHONEOS_DEPLOYMENT_TARGET}</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>UILaunchStoryboardName</key>
diff --git a/mkspecs/macx-ios-clang/Info.plist.lib b/mkspecs/macx-ios-clang/Info.plist.lib
index 044cbd3393..ce28365500 100644
--- a/mkspecs/macx-ios-clang/Info.plist.lib
+++ b/mkspecs/macx-ios-clang/Info.plist.lib
@@ -3,19 +3,19 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
- <string>@LIBRARY@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>@SHORT_VERSION@</string>
+ <string>${QMAKE_SHORT_VERSION}</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleVersion</key>
- <string>@FULL_VERSION@</string>
+ <string>${QMAKE_FULL_VERSION}</string>
<key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict>
diff --git a/mkspecs/macx-tvos-clang/Info.plist.app b/mkspecs/macx-tvos-clang/Info.plist.app
index a034826207..04aef816c2 100644
--- a/mkspecs/macx-tvos-clang/Info.plist.app
+++ b/mkspecs/macx-tvos-clang/Info.plist.app
@@ -7,7 +7,7 @@
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIcons</key>
@@ -16,25 +16,25 @@
<string>App Icon - Small</string>
</dict>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.0</string>
+ <string>${QMAKE_SHORT_VERSION}</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>AppleTVOS</string>
</array>
<key>CFBundleVersion</key>
- <string>1.0</string>
+ <string>${QMAKE_FULL_VERSION}</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
- <string>9.1</string>
+ <string>${TVOS_DEPLOYMENT_TARGET}</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
</dict>
diff --git a/mkspecs/macx-tvos-clang/Info.plist.lib b/mkspecs/macx-tvos-clang/Info.plist.lib
index 044cbd3393..ce28365500 100644
--- a/mkspecs/macx-tvos-clang/Info.plist.lib
+++ b/mkspecs/macx-tvos-clang/Info.plist.lib
@@ -3,19 +3,19 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
- <string>@LIBRARY@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>@SHORT_VERSION@</string>
+ <string>${QMAKE_SHORT_VERSION}</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleVersion</key>
- <string>@FULL_VERSION@</string>
+ <string>${QMAKE_FULL_VERSION}</string>
<key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict>
diff --git a/mkspecs/macx-watchos-clang/Info.plist.app b/mkspecs/macx-watchos-clang/Info.plist.app
index d918704491..47f5a58d5e 100644
--- a/mkspecs/macx-watchos-clang/Info.plist.app
+++ b/mkspecs/macx-watchos-clang/Info.plist.app
@@ -7,21 +7,23 @@
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.0</string>
+ <string>${QMAKE_SHORT_VERSION}</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleVersion</key>
- <string>1.0</string>
+ <string>${QMAKE_FULL_VERSION}</string>
+ <key>MinimumOSVersion</key>
+ <string>${WATCHOS_DEPLOYMENT_TARGET}</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>UISupportedInterfaceOrientations</key>
diff --git a/mkspecs/macx-watchos-clang/Info.plist.lib b/mkspecs/macx-watchos-clang/Info.plist.lib
index 044cbd3393..ce28365500 100644
--- a/mkspecs/macx-watchos-clang/Info.plist.lib
+++ b/mkspecs/macx-watchos-clang/Info.plist.lib
@@ -3,19 +3,19 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
- <string>@LIBRARY@</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>@SHORT_VERSION@</string>
+ <string>${QMAKE_SHORT_VERSION}</string>
<key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
+ <string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleVersion</key>
- <string>@FULL_VERSION@</string>
+ <string>${QMAKE_FULL_VERSION}</string>
<key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict>
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index a4e28b4d0c..16b498d36e 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -939,6 +939,8 @@
order in which they are given.
\row \li precompile_header \li Enables support for the use of
\l{Using Precompiled Headers}{precompiled headers} in projects.
+ \row \li precompile_header_c (MSVC only) \li Enables support for the use of
+ \l{Using Precompiled Headers}{precompiled headers} for C files.
\row \li warn_on \li The compiler should output as many warnings as possible.
If \c warn_off is also specified, the last one takes effect.
\row \li warn_off \li The compiler should output as few warnings as possible.
@@ -1821,9 +1823,55 @@
Specifies the name of the property list file, \c{.plist}, you
would like to include in your \macos, iOS, tvOS, and watchOS application bundle.
- In the \c{.plist} file, you can define some variables, e.g., @EXECUTABLE@,
- which qmake will replace with the actual executable name. Other variables
- include @ICON@, @TYPEINFO@, @LIBRARY@, and @SHORT_VERSION@.
+ In the \c{.plist} file, you can define some variables which
+ qmake will replace with the relevant values:
+
+ \table
+ \header
+ \li Placeholder(s)
+ \li Effect
+ \row
+ \li \c ${PRODUCT_BUNDLE_IDENTIFIER}, \c @BUNDLEIDENTIFIER@
+ \li Expands to the target bundle's bundle identifier string,
+ for example: \c{com.example.myapp}. Determined by concatenating the
+ values of QMAKE_TARGET_BUNDLE_PREFIX and QMAKE_BUNDLE, separated
+ by a full stop (\c{.}).
+ \row
+ \li \c ${EXECUTABLE_NAME}, \c @EXECUTABLE@, \c @LIBRARY@
+ \li Equivalent to the value of QMAKE_APPLICATION_BUNDLE_NAME,
+ QMAKE_PLUGIN_BUNDLE_NAME, or QMAKE_FRAMEWORK_BUNDLE_NAME
+ (depending on the type of target being created),
+ or TARGET if none of the previous values are set.
+ \row
+ \li \c ${ASSETCATALOG_COMPILER_APPICON_NAME}, \c @ICON@
+ \li Expands to the value of ICON.
+ \row
+ \li \c ${QMAKE_PKGINFO_TYPEINFO}, \c @TYPEINFO@
+ \li Expands to the value of QMAKE_PKGINFO_TYPEINFO.
+ \row
+ \li \c ${QMAKE_FULL_VERSION}, \c @FULL_VERSION@
+ \li Expands to the value of VERSION expressed with three version components.
+ \row
+ \li \c ${QMAKE_SHORT_VERSION}, \c @SHORT_VERSION@
+ \li Expands to the value of VERSION expressed with two version components.
+ \row
+ \li \c ${MACOSX_DEPLOYMENT_TARGET}
+ \li Expands to the value of QMAKE_MACOSX_DEPLOYMENT_TARGET.
+ \row
+ \li \c ${IPHONEOS_DEPLOYMENT_TARGET}
+ \li Expands to the value of QMAKE_IPHONEOS_DEPLOYMENT_TARGET.
+ \row
+ \li \c ${TVOS_DEPLOYMENT_TARGET}
+ \li Expands to the value of QMAKE_TVOS_DEPLOYMENT_TARGET.
+ \row
+ \li \c ${WATCHOS_DEPLOYMENT_TARGET}
+ \li Expands to the value of QMAKE_WATCHOS_DEPLOYMENT_TARGET.
+ \endtable
+
+ \note When using the Xcode generator, the above \c{${var}}-style
+ placeholders are replaced directly by the Xcode build system and are not
+ handled by qmake. The \c{@var@} style placeholders work only with the qmake
+ Makefile generators and not with the Xcode generator.
If building for iOS, and the \c{.plist} file contains the key
\c NSPhotoLibraryUsageDescription, qmake will include an additional plugin
@@ -4577,6 +4625,11 @@
\snippet code/doc_src_qmake-manual.pro 106
+ To use the precompiled header also for C files on MSVC nmake target, add
+ \c precompile_header_c to the \l{CONFIG} variable. If the header is
+ used also for C++ and it contains C++ keywords/includes, enclose them
+ with \c{#ifdef __cplusplus}).
+
\section1 Notes on Possible Issues
On some platforms, the file name suffix for precompiled header files is
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 0622ace71b..db7a1b2714 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -279,7 +279,6 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
QString configName = (as_release ? "Release" : "Debug");
QMap<QString, QString> settings;
- settings.insert("COPY_PHASE_STRIP", (as_release ? "YES" : "NO"));
if(project->isActiveConfig("sdk") && !project->isEmpty("QMAKE_MAC_SDK"))
settings.insert("SDKROOT", project->first("QMAKE_MAC_SDK").toQString());
{
@@ -1493,7 +1492,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
settings.insert("PROVISIONING_PROFILE_SPECIFIER", project->first("QMAKE_PROVISIONING_PROFILE").toQString());
}
- settings.insert("COPY_PHASE_STRIP", (as_release ? "YES" : "NO"));
settings.insert("APPLICATION_EXTENSION_API_ONLY", project->isActiveConfig("app_extension_api_only") ? "YES" : "NO");
// required for tvOS (and watchos), optional on iOS (deployment target >= iOS 6.0)
settings.insert("ENABLE_BITCODE", project->isActiveConfig("bitcode") ? "YES" : "NO");
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index f7097e58dc..8ecfa0bf31 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -155,6 +155,20 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::
}
}
+static QString rfc1034Identifier(const QString &str)
+{
+ QString s = str;
+ for (QChar &ch : s) {
+ const char c = ch.toLatin1();
+
+ const bool okChar = (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z')
+ || (c >= 'a' && c <= 'z') || c == '-' || c == '.';
+ if (!okChar)
+ ch = QChar::fromLatin1('-');
+ }
+ return s;
+}
+
void
UnixMakefileGenerator::writeMakeParts(QTextStream &t)
{
@@ -806,14 +820,23 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << mkdir_p_asstring(destdir) << "\n\t";
ProStringList commonSedArgs;
if (!project->values("VERSION").isEmpty()) {
- commonSedArgs << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "."
- << project->first("VER_MIN") << ",g\" ";
- commonSedArgs << "-e \"s,@FULL_VERSION@," << project->first("VER_MAJ") << "."
- << project->first("VER_MIN") << "."
- << project->first("VER_PAT") << ",g\" ";
+ const ProString shortVersion =
+ project->first("VER_MAJ") + "." +
+ project->first("VER_MIN");
+ commonSedArgs << "-e \"s,@SHORT_VERSION@," << shortVersion << ",g\" ";
+ commonSedArgs << "-e \"s,\\$${QMAKE_SHORT_VERSION}," << shortVersion << ",g\" ";
+ const ProString fullVersion =
+ project->first("VER_MAJ") + "." +
+ project->first("VER_MIN") + "." +
+ project->first("VER_PAT");
+ commonSedArgs << "-e \"s,@FULL_VERSION@," << fullVersion << ",g\" ";
+ commonSedArgs << "-e \"s,\\$${QMAKE_FULL_VERSION}," << fullVersion << ",g\" ";
}
- commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
- QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" ";
+ const ProString typeInfo = project->isEmpty("QMAKE_PKGINFO_TYPEINFO")
+ ? QString::fromLatin1("????")
+ : project->first("QMAKE_PKGINFO_TYPEINFO").left(4);
+ commonSedArgs << "-e \"s,@TYPEINFO@," << typeInfo << ",g\" ";
+ commonSedArgs << "-e \"s,\\$${QMAKE_PKGINFO_TYPEINFO}," << typeInfo << ",g\" ";
QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString();
if (bundlePrefix.isEmpty())
@@ -826,8 +849,18 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if (bundleIdentifier.endsWith(".framework"))
bundleIdentifier.chop(10);
// replace invalid bundle id characters
- bundleIdentifier.replace('_', '-');
+ bundleIdentifier = rfc1034Identifier(bundleIdentifier);
commonSedArgs << "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" ";
+ commonSedArgs << "-e \"s,\\$${PRODUCT_BUNDLE_IDENTIFIER}," << bundleIdentifier << ",g\" ";
+
+ commonSedArgs << "-e \"s,\\$${MACOSX_DEPLOYMENT_TARGET},"
+ << project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET").toQString() << ",g\" ";
+ commonSedArgs << "-e \"s,\\$${IPHONEOS_DEPLOYMENT_TARGET},"
+ << project->first("QMAKE_IPHONEOS_DEPLOYMENT_TARGET").toQString() << ",g\" ";
+ commonSedArgs << "-e \"s,\\$${TVOS_DEPLOYMENT_TARGET},"
+ << project->first("QMAKE_TVOS_DEPLOYMENT_TARGET").toQString() << ",g\" ";
+ commonSedArgs << "-e \"s,\\$${WATCHOS_DEPLOYMENT_TARGET},"
+ << project->first("QMAKE_WATCHOS_DEPLOYMENT_TARGET").toQString() << ",g\" ";
if (!isFramework) {
ProString app_bundle_name = var("QMAKE_APPLICATION_BUNDLE_NAME");
@@ -843,11 +876,14 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< "@sed ";
for (const ProString &arg : qAsConst(commonSedArgs))
t << arg;
- t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
+ const QString iconName = icon.section(Option::dir_sep, -1);
+ t << "-e \"s,@ICON@," << iconName << ",g\" "
+ << "-e \"s,\\$${ASSETCATALOG_COMPILER_APPICON_NAME}," << iconName << ",g\" "
<< "-e \"s,@EXECUTABLE@," << app_bundle_name << ",g\" "
<< "-e \"s,@LIBRARY@," << plugin_bundle_name << ",g\" "
- << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
- QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
+ << "-e \"s,\\$${EXECUTABLE_NAME}," << (app_bundle_name.isEmpty() ? app_bundle_name : plugin_bundle_name) << ",g\" "
+ << "-e \"s,@TYPEINFO@,"<< typeInfo << ",g\" "
+ << "-e \"s,\\$${QMAKE_PKGINFO_TYPEINFO},"<< typeInfo << ",g\" "
<< "" << info_plist << " >" << info_plist_out << endl;
//copy the icon
if (!project->isEmpty("ICON")) {
@@ -873,9 +909,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
for (const ProString &arg : qAsConst(commonSedArgs))
t << arg;
t << "-e \"s,@LIBRARY@," << lib_bundle_name << ",g\" "
- << "-e \"s,@TYPEINFO@,"
- << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
- QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
+ << "-e \"s,\\$${EXECUTABLE_NAME}," << lib_bundle_name << ",g\" "
+ << "-e \"s,@TYPEINFO@," << typeInfo << ",g\" "
+ << "-e \"s,\\$${QMAKE_PKGINFO_TYPEINFO}," << typeInfo << ",g\" "
<< "" << info_plist << " >" << info_plist_out << endl;
}
break;
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 792ffb1997..d6d6b04148 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -324,7 +324,8 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
t << "\n\t" <<var("QMAKE_PRE_LINK");
if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
t << "\n\t-$(DEL_FILE) $(DESTDIR_TARGET) 2>" << var("QMAKE_SHELL_NULL_DEVICE");
- if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) {
+ const ProString &objmax = project->first("QMAKE_LINK_OBJECT_MAX");
+ if (objmax.isEmpty() || project->values("OBJECTS").count() < objmax.toInt()) {
t << "\n\t$(LIB) $(DESTDIR_TARGET) " << objectsLinkLine << " " ;
} else {
t << "\n\t" << objectsLinkLine << " " ;
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index b4c2579c5c..ccc2ea6d2b 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -51,7 +51,7 @@ static QString nmakePathList(const QStringList &list)
.replace('#', QLatin1String("^#")).replace('$', QLatin1String("$$"));
}
-NmakeMakefileGenerator::NmakeMakefileGenerator() : Win32MakefileGenerator(), usePCH(false)
+NmakeMakefileGenerator::NmakeMakefileGenerator() : usePCH(false), usePCHC(false)
{
}
@@ -324,6 +324,8 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
<< escapeDependencyPaths(findDependencies(precompH)).join(" \\\n\t\t")
<< "\n\t$(CXX) " + precompRule +" $(CXXFLAGS) $(INCPATH) -TP "
<< escapeFilePath(precompH) << endl << endl;
+ }
+ if (usePCHC) {
QString precompRuleC = QString("-c -Yc -Fp%1 -Fo%2")
.arg(escapeFilePath(precompPchC), escapeFilePath(precompObjC));
t << escapeDependencyPath(precompObjC) << ": " << escapeDependencyPath(precompH) << ' '
@@ -335,14 +337,14 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
QString NmakeMakefileGenerator::var(const ProKey &value) const
{
- if (usePCH) {
+ if (usePCH || usePCHC) {
const bool isRunC = (value == "QMAKE_RUN_CC_IMP_BATCH"
|| value == "QMAKE_RUN_CC_IMP"
|| value == "QMAKE_RUN_CC");
- if (isRunC
- || value == "QMAKE_RUN_CXX_IMP_BATCH"
- || value == "QMAKE_RUN_CXX_IMP"
- || value == "QMAKE_RUN_CXX") {
+ const bool isRunCpp = (value == "QMAKE_RUN_CXX_IMP_BATCH"
+ || value == "QMAKE_RUN_CXX_IMP"
+ || value == "QMAKE_RUN_CXX");
+ if ((isRunCpp && usePCH) || (isRunC && usePCHC)) {
QFileInfo precompHInfo(fileInfo(precompH));
QString precompH_f = escapeFilePath(precompHInfo.fileName());
QString precompRule = QString("-c -FI%1 -Yu%2 -Fp%3")
@@ -410,21 +412,24 @@ void NmakeMakefileGenerator::init()
// Setup PCH variables
precompH = project->first("PRECOMPILED_HEADER").toQString();
usePCH = !precompH.isEmpty() && project->isActiveConfig("precompile_header");
+ usePCHC = !precompH.isEmpty() && project->isActiveConfig("precompile_header_c");
if (usePCH) {
// Created files
precompObj = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch" + Option::obj_ext;
precompPch = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch.pch";
- precompObjC = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch_c" + Option::obj_ext;
- precompPchC = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch_c.pch";
// Add linking of precompObj (required for whole precompiled classes)
- project->values("OBJECTS") += precompObj;
- project->values("OBJECTS") += precompObjC;
+ project->values("OBJECTS") += precompObj;
// Add pch file to cleanup
- project->values("QMAKE_CLEAN") += precompPch;
- project->values("QMAKE_CLEAN") += precompPchC;
+ project->values("QMAKE_CLEAN") += precompPch;
// Return to variable pool
project->values("PRECOMPILED_OBJECT") = ProStringList(precompObj);
project->values("PRECOMPILED_PCH") = ProStringList(precompPch);
+ }
+ if (usePCHC) {
+ precompObjC = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch_c" + Option::obj_ext;
+ precompPchC = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch_c.pch";
+ project->values("OBJECTS") += precompObjC;
+ project->values("QMAKE_CLEAN") += precompPchC;
project->values("PRECOMPILED_OBJECT_C") = ProStringList(precompObjC);
project->values("PRECOMPILED_PCH_C") = ProStringList(precompPchC);
}
diff --git a/qmake/generators/win32/msvc_nmake.h b/qmake/generators/win32/msvc_nmake.h
index 4b0935bb66..67b609d0a6 100644
--- a/qmake/generators/win32/msvc_nmake.h
+++ b/qmake/generators/win32/msvc_nmake.h
@@ -53,7 +53,7 @@ protected:
QString var(const ProKey &value) const;
QString precompH, precompObj, precompPch;
QString precompObjC, precompPchC;
- bool usePCH;
+ bool usePCH, usePCHC;
public:
NmakeMakefileGenerator();
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index 8b65db95cb..8d3dbe3ecf 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -257,7 +257,7 @@ function(QT5_ADD_BINARY_RESOURCES target )
add_custom_command(OUTPUT ${rcc_destination}
COMMAND ${Qt5Core_RCC_EXECUTABLE}
ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles}
- DEPENDS ${rc_depends} ${out_depends} VERBATIM)
+ DEPENDS ${rc_depends} ${out_depends} ${infiles} VERBATIM)
add_custom_target(${target} ALL DEPENDS ${rcc_destination})
endfunction()
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index c7d5c957ea..6a51ea3ab1 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -544,6 +544,12 @@ using qsizetype = QIntegerForSizeof<std::size_t>::Signed;
# define Q_ALWAYS_INLINE inline
#endif
+#ifdef Q_CC_GNU
+# define QT_INIT_METAOBJECT __attribute__((init_priority(101)))
+#else
+# define QT_INIT_METAOBJECT
+#endif
+
//defines the type for the WNDPROC on windows
//the alignment needs to be forced for sse2 to not crash with mingw
#if defined(Q_OS_WIN)
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 158b83e087..e2a7297ca6 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -979,6 +979,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
\li scrolling is about to begin, but the distance did not yet change (Qt::ScrollBegin),
\li or scrolling has ended and the distance did not change anymore (Qt::ScrollEnd).
\endlist
+ \note On X11 this value is driver specific and unreliable, use angleDelta() instead
*/
/*!
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 665cc430cc..4905e51e01 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -751,21 +751,24 @@ const QBrush &QPalette::brush(ColorGroup gr, ColorRole cr) const
void QPalette::setBrush(ColorGroup cg, ColorRole cr, const QBrush &b)
{
Q_ASSERT(cr < NColorRoles);
- detach();
- if(cg >= (int)NColorGroups) {
- if(cg == All) {
- for(int i = 0; i < (int)NColorGroups; i++)
- d->br[i][cr] = b;
- data.resolve_mask |= (1<<cr);
- return;
- } else if(cg == Current) {
- cg = (ColorGroup)data.current_group;
- } else {
- qWarning("QPalette::setBrush: Unknown ColorGroup: %d", (int)cg);
- cg = Active;
- }
+
+ if (cg == All) {
+ for (uint i = 0; i < NColorGroups; i++)
+ setBrush(ColorGroup(i), cr, b);
+ return;
+ }
+
+ if (cg == Current) {
+ cg = ColorGroup(data.current_group);
+ } else if (cg >= NColorGroups) {
+ qWarning("QPalette::setBrush: Unknown ColorGroup: %d", cg);
+ cg = Active;
+ }
+
+ if (d->br[cg][cr] != b) {
+ detach();
+ d->br[cg][cr] = b;
}
- d->br[cg][cr] = b;
data.resolve_mask |= (1<<cr);
}
@@ -1091,7 +1094,6 @@ void QPalette::setColorGroup(ColorGroup cg, const QBrush &foreground, const QBru
const QBrush &link, const QBrush &link_visited,
const QBrush &toolTipBase, const QBrush &toolTipText)
{
- detach();
setBrush(cg, WindowText, foreground);
setBrush(cg, Button, button);
setBrush(cg, Light, light);
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 23342f7935..ff044a91da 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -4478,7 +4478,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendBarrier.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendBarrier.xml}{glBlendBarrier()}.
*/
/*!
@@ -4491,7 +4491,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendEquationSeparatei.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendEquationSeparatei.xml}{glBlendEquationSeparatei()}.
*/
/*!
@@ -4504,7 +4504,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendEquationi.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendEquationi.xml}{glBlendEquationi()}.
*/
/*!
@@ -4517,7 +4517,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendFuncSeparatei.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendFuncSeparatei.xml}{glBlendFuncSeparatei()}.
*/
/*!
@@ -4530,7 +4530,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendFunci.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glBlendFunci.xml}{glBlendFunci()}.
*/
/*!
@@ -4543,7 +4543,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glColorMaski.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glColorMaski.xml}{glColorMaski()}.
*/
/*!
@@ -4556,7 +4556,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glCopyImageSubData.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glCopyImageSubData.xml}{glCopyImageSubData()}.
*/
/*!
@@ -4569,7 +4569,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDebugMessageCallback.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glDebugMessageCallback.xml}{glDebugMessageCallback()}.
*/
/*!
@@ -4582,7 +4582,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDebugMessageControl.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glDebugMessageControl.xml}{glDebugMessageContro()}.
*/
/*!
@@ -4595,7 +4595,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDebugMessageInsert.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glDebugMessageInsert.xml}{glDebugMessageInsert()}.
*/
/*!
@@ -4608,7 +4608,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDisablei.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glDisablei.xml}{glDisablei()}.
*/
/*!
@@ -4621,7 +4621,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDrawElementsBaseVertex.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glDrawElementsBaseVertex.xml}{glDrawElementsBaseVerte()}.
*/
/*!
@@ -4634,7 +4634,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDrawElementsInstancedBaseVertex.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glDrawElementsInstancedBaseVertex.xml}{glDrawElementsInstancedBaseVerte()}.
*/
/*!
@@ -4647,7 +4647,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glDrawRangeElementsBaseVertex.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glDrawRangeElementsBaseVertex.xml}{glDrawRangeElementsBaseVerte()}.
*/
/*!
@@ -4660,7 +4660,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glEnablei.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glEnablei.xml}{glEnablei()}.
*/
/*!
@@ -4673,7 +4673,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glFramebufferTexture.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glFramebufferTexture.xml}{glFramebufferTexture()}.
*/
/*!
@@ -4686,7 +4686,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetDebugMessageLog.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetDebugMessageLog.xml}{glGetDebugMessageLog()}.
*/
/*!
@@ -4699,7 +4699,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetGraphicsResetStatus.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetGraphicsResetStatus.xml}{glGetGraphicsResetStatus()}.
*/
/*!
@@ -4712,7 +4712,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetObjectLabel.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetObjectLabel.xml}{glGetObjectLabe()}.
*/
/*!
@@ -4725,7 +4725,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetObjectPtrLabel.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetObjectPtrLabel.xml}{glGetObjectPtrLabe()}.
*/
/*!
@@ -4738,7 +4738,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetPointerv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetPointerv.xml}{glGetPointerv()}.
*/
/*!
@@ -4751,7 +4751,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetSamplerParameterIiv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetSamplerParameterIiv.xml}{glGetSamplerParameterIiv()}.
*/
/*!
@@ -4764,7 +4764,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetSamplerParameterIuiv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetSamplerParameterIuiv.xml}{glGetSamplerParameterIuiv()}.
*/
/*!
@@ -4777,7 +4777,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetTexParameterIiv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetTexParameterIiv.xml}{glGetTexParameterIiv()}.
*/
/*!
@@ -4790,7 +4790,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetTexParameterIuiv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetTexParameterIuiv.xml}{glGetTexParameterIuiv()}.
*/
/*!
@@ -4803,7 +4803,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetnUniformfv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetnUniformfv.xml}{glGetnUniformfv()}.
*/
/*!
@@ -4816,7 +4816,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetnUniformiv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetnUniformiv.xml}{glGetnUniformiv()}.
*/
/*!
@@ -4829,7 +4829,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetnUniformuiv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glGetnUniformuiv.xml}{glGetnUniformuiv()}.
*/
/*!
@@ -4842,7 +4842,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glIsEnabledi.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glIsEnabledi.xml}{glIsEnabledi()}.
*/
/*!
@@ -4855,7 +4855,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glMinSampleShading.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glMinSampleShading.xml}{glMinSampleShading()}.
*/
/*!
@@ -4868,7 +4868,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glObjectLabel.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glObjectLabel.xml}{glObjectLabe()}.
*/
/*!
@@ -4881,7 +4881,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glObjectPtrLabel.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glObjectPtrLabel.xml}{glObjectPtrLabe()}.
*/
/*!
@@ -4894,7 +4894,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glPatchParameteri.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glPatchParameteri.xml}{glPatchParameteri()}.
*/
/*!
@@ -4907,7 +4907,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glPopDebugGroup.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glPopDebugGroup.xml}{glPopDebugGroup()}.
*/
/*!
@@ -4920,7 +4920,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glPrimitiveBoundingBox.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glPrimitiveBoundingBox.xml}{glPrimitiveBoundingBo()}.
*/
/*!
@@ -4933,7 +4933,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glPushDebugGroup.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glPushDebugGroup.xml}{glPushDebugGroup()}.
*/
/*!
@@ -4946,7 +4946,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glReadnPixels.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glReadnPixels.xml}{glReadnPixels()}.
*/
/*!
@@ -4959,7 +4959,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glSamplerParameterIiv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glSamplerParameterIiv.xml}{glSamplerParameterIiv()}.
*/
/*!
@@ -4972,7 +4972,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glSamplerParameterIuiv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glSamplerParameterIuiv.xml}{glSamplerParameterIuiv()}.
*/
/*!
@@ -4985,7 +4985,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexBuffer.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexBuffer.xml}{glTexBuffer()}.
*/
/*!
@@ -4998,7 +4998,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexBufferRange.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexBufferRange.xml}{glTexBufferRange()}.
*/
/*!
@@ -5011,7 +5011,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexParameterIiv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexParameterIiv.xml}{glTexParameterIiv()}.
*/
/*!
@@ -5024,7 +5024,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexParameterIuiv.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexParameterIuiv.xml}{glTexParameterIuiv()}.
*/
/*!
@@ -5037,7 +5037,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
function either in core or as an extension.
For more information, see the OpenGL ES 3.2 documentation for
- \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexStorage3DMultisample.xml}{${NAME}()}.
+ \l{http://www.khronos.org/opengles/sdk/docs/man32/glTexStorage3DMultisample.xml}{glTexStorage3DMultisample()}.
*/
/*!
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index afbf783c3a..8998516d4d 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -2845,6 +2845,41 @@ QString QFontDatabase::resolveFontFamilyAlias(const QString &family)
return QGuiApplicationPrivate::platformIntegration()->fontDatabase()->resolveFontFamilyAlias(family);
}
+Q_GUI_EXPORT QStringList qt_sort_families_by_writing_system(QChar::Script script, const QStringList &families)
+{
+ size_t writingSystem = std::find(scriptForWritingSystem,
+ scriptForWritingSystem + QFontDatabase::WritingSystemsCount,
+ script) - scriptForWritingSystem;
+ if (writingSystem == QFontDatabase::Any
+ || writingSystem >= QFontDatabase::WritingSystemsCount) {
+ return families;
+ }
+
+ QFontDatabasePrivate *db = privateDb();
+ QMultiMap<uint, QString> supported;
+ for (int i = 0; i < families.size(); ++i) {
+ const QString &family = families.at(i);
+
+ QtFontFamily *testFamily = nullptr;
+ for (int x = 0; x < db->count; ++x) {
+ if (Q_UNLIKELY(matchFamilyName(family, db->families[x]))) {
+ testFamily = db->families[x];
+ testFamily->ensurePopulated();
+ break;
+ }
+ }
+
+ uint order = i;
+ if (testFamily == nullptr
+ || (testFamily->writingSystems[writingSystem] & QtFontFamily::Supported) == 0) {
+ order |= 1 << 31;
+ }
+
+ supported.insert(order, family);
+ }
+
+ return supported.values();
+}
QT_END_NAMESPACE
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 5be8745b15..a9f411da56 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -1845,7 +1845,12 @@ QFontEngine *QFontEngineMulti::loadEngine(int at)
request.styleStrategy |= QFont::NoFontMerging;
request.family = fallbackFamilyAt(at - 1);
- if (QFontEngine *engine = QFontDatabase::findFont(request, m_script)) {
+ // At this point, the main script of the text has already been considered
+ // when fetching the list of fallback families from the database, and the
+ // info about the actual script of the characters may have been discarded,
+ // so we do not check for writing system support, but instead just load
+ // the family indiscriminately.
+ if (QFontEngine *engine = QFontDatabase::findFont(request, QFontDatabase::Any)) {
engine->fontDef.weight = request.weight;
if (request.style > QFont::StyleNormal)
engine->fontDef.style = request.style;
@@ -1898,8 +1903,33 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len,
int glyph_pos = 0;
QStringIterator it(str, str + len);
+
+ int lastFallback = -1;
while (it.hasNext()) {
const uint ucs4 = it.peekNext();
+
+ // If we applied a fallback font to previous glyph, and the current is either
+ // ZWJ or ZWNJ, we should also try applying the same fallback font to that, in order
+ // to get the correct shaping rules applied.
+ if (lastFallback >= 0 && (ucs4 == QChar(0x200d) || ucs4 == QChar(0x200c))) {
+ QFontEngine *engine = m_engines.at(lastFallback);
+ glyph_t glyph = engine->glyphIndex(ucs4);
+ if (glyph != 0) {
+ glyphs->glyphs[glyph_pos] = glyph;
+ if (!(flags & GlyphIndicesOnly)) {
+ QGlyphLayout g = glyphs->mid(glyph_pos, 1);
+ engine->recalcAdvances(&g, flags);
+ }
+
+ // set the high byte to indicate which engine the glyph came from
+ glyphs->glyphs[glyph_pos] |= (lastFallback << 24);
+ } else {
+ lastFallback = -1;
+ }
+ } else {
+ lastFallback = -1;
+ }
+
if (glyphs->glyphs[glyph_pos] == 0
&& ucs4 != QChar::LineSeparator
&& ucs4 != QChar::LineFeed
@@ -1928,6 +1958,9 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len,
QGlyphLayout g = glyphs->mid(glyph_pos, 1);
engine->recalcAdvances(&g, flags);
}
+
+ lastFallback = x;
+
// set the high byte to indicate which engine the glyph came from
glyphs->glyphs[glyph_pos] |= (x << 24);
break;
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index 762ef00225..719e3536b4 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -1702,8 +1702,16 @@ int QFtp::connectToHost(const QString &host, quint16 port)
int QFtp::login(const QString &user, const QString &password)
{
QStringList cmds;
- cmds << (QLatin1String("USER ") + (user.isNull() ? QLatin1String("anonymous") : user) + QLatin1String("\r\n"));
- cmds << (QLatin1String("PASS ") + (password.isNull() ? QLatin1String("anonymous@") : password) + QLatin1String("\r\n"));
+
+ if (user.isNull() || user.compare(QLatin1String("anonymous"), Qt::CaseInsensitive) == 0) {
+ cmds << (QLatin1String("USER ") + (user.isNull() ? QLatin1String("anonymous") : user) + QLatin1String("\r\n"));
+ cmds << (QLatin1String("PASS ") + (password.isNull() ? QLatin1String("anonymous@") : password) + QLatin1String("\r\n"));
+ } else {
+ cmds << (QLatin1String("USER ") + user + QLatin1String("\r\n"));
+ if (!password.isNull())
+ cmds << (QLatin1String("PASS ") + password + QLatin1String("\r\n"));
+ }
+
return d_func()->addCommand(new QFtpCommand(Login, cmds));
}
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index 237e8a89a5..7397312820 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -544,6 +544,9 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
fallbackList.append(QStringLiteral("Arial Unicode MS"));
#endif
+ extern QStringList qt_sort_families_by_writing_system(QChar::Script, const QStringList &);
+ fallbackList = qt_sort_families_by_writing_system(script, fallbackList);
+
return fallbackList;
}
}
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index 1efb01d52e..70ee708b61 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -1203,7 +1203,7 @@ void QWindowsNativeFileDialogBase::onSelectionChange()
{
const QList<QUrl> current = selectedFiles();
m_data.setSelectedFiles(current);
- qDebug() << __FUNCTION__ << current << current.size();
+ qCDebug(lcQpaDialogs) << __FUNCTION__ << current << current.size();
if (current.size() == 1)
emit currentChanged(current.front());
diff --git a/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp
index cb2bbafee1..9b31998620 100644
--- a/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11_p.h
index 5f4c24ec11..f3653a9438 100644
--- a/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11_p.h
+++ b/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11_p.h
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qcolormap_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qcolormap_x11.cpp
index 8554c5445d..fe9d1fcde9 100644
--- a/src/plugins/platforms/xcb/nativepainting/qcolormap_x11.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qcolormap_x11.cpp
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qcolormap_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qcolormap_x11_p.h
index 530e3113e4..573a0f28ea 100644
--- a/src/plugins/platforms/xcb/nativepainting/qcolormap_x11_p.h
+++ b/src/plugins/platforms/xcb/nativepainting/qcolormap_x11_p.h
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
index 3364b07c08..8b63e5431d 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h
index a0dd6cdf74..9b01c0a3fc 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h
+++ b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp
index f791c90346..86c87e5e30 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11.cpp
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h
index 79e607c6f8..7392cbfccf 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h
+++ b/src/plugins/platforms/xcb/nativepainting/qpixmap_x11_p.h
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h
index a0e5131ea7..aa8dfa5af0 100644
--- a/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h
+++ b/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qtessellator.cpp b/src/plugins/platforms/xcb/nativepainting/qtessellator.cpp
index 9acb21f95f..1afa00cfc9 100644
--- a/src/plugins/platforms/xcb/nativepainting/qtessellator.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qtessellator.cpp
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qtessellator_p.h b/src/plugins/platforms/xcb/nativepainting/qtessellator_p.h
index 65ae6bdc41..7181a1ecc9 100644
--- a/src/plugins/platforms/xcb/nativepainting/qtessellator_p.h
+++ b/src/plugins/platforms/xcb/nativepainting/qtessellator_p.h
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp b/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp
index 5ff45ec183..57b1882e4b 100644
--- a/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.h b/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.h
index f3011286c9..b00ccfcdff 100644
--- a/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.h
+++ b/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.h
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index bfb3534879..ba6481082a 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -1011,10 +1011,12 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollin
double delta = scrollingDevice.lastScrollPosition.y() - value;
scrollingDevice.lastScrollPosition.setY(value);
angleDelta.setY((delta / scrollingDevice.verticalIncrement) * 120);
- // We do not set "pixel" delta if it is only measured in ticks.
- if (scrollingDevice.verticalIncrement > 1)
+ // With most drivers the increment is 1 for wheels.
+ // For libinput it is hardcoded to a useless 15.
+ // For a proper touchpad driver it should be in the same order of magnitude as 120
+ if (scrollingDevice.verticalIncrement > 15)
rawDelta.setY(delta);
- else if (scrollingDevice.verticalIncrement < -1)
+ else if (scrollingDevice.verticalIncrement < -15)
rawDelta.setY(-delta);
}
}
@@ -1023,10 +1025,10 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollin
double delta = scrollingDevice.lastScrollPosition.x() - value;
scrollingDevice.lastScrollPosition.setX(value);
angleDelta.setX((delta / scrollingDevice.horizontalIncrement) * 120);
- // We do not set "pixel" delta if it is only measured in ticks.
- if (scrollingDevice.horizontalIncrement > 1)
+ // See comment under vertical
+ if (scrollingDevice.horizontalIncrement > 15)
rawDelta.setX(delta);
- else if (scrollingDevice.horizontalIncrement < -1)
+ else if (scrollingDevice.horizontalIncrement < -15)
rawDelta.setX(-delta);
}
}
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
index 39070c32e8..d1a6582c5a 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
@@ -446,7 +446,7 @@ static QString timespecToString(const QDateTime &dateTime)
bool QSQLiteResult::exec()
{
Q_D(QSQLiteResult);
- const QVector<QVariant> values = boundValues();
+ QVector<QVariant> values = boundValues();
d->skippedStatus = false;
d->skipRow = false;
@@ -478,6 +478,20 @@ bool QSQLiteResult::exec()
countIndexes);
paramCountIsValid = bindParamCount == values.count();
+ // When using named placeholders, it will reuse the index for duplicated
+ // placeholders. So we need to ensure the QVector has only one instance of
+ // each value as SQLite will do the rest for us.
+ QVector<QVariant> prunedValues;
+ QList<int> handledIndexes;
+ for (int i = 0, currentIndex = 0; i < values.size(); ++i) {
+ if (handledIndexes.contains(i))
+ continue;
+ const auto placeHolder = QString::fromUtf8(sqlite3_bind_parameter_name(d->stmt, currentIndex + 1));
+ handledIndexes << d->indexes[placeHolder];
+ prunedValues << values.at(d->indexes[placeHolder].first());
+ ++currentIndex;
+ }
+ values = prunedValues;
}
#endif
diff --git a/src/sql/doc/snippets/code/doc_src_sql-driver.cpp b/src/sql/doc/snippets/code/doc_src_sql-driver.cpp
index e7dfbd90d5..2c0e824db3 100644
--- a/src/sql/doc/snippets/code/doc_src_sql-driver.cpp
+++ b/src/sql/doc/snippets/code/doc_src_sql-driver.cpp
@@ -127,3 +127,15 @@ while (query1.next()) {
} // query1, and cause the loop to quit
}
//! [37]
+
+
+//! [39]
+QSqlDatabase db = QSqlDatabase::addDatabase("QODBC3");
+QString connectString = QStringLiteral(
+ "DRIVER=/path/to/installation/libodbcHDB.so;"
+ "SERVERNODE=hostname:port;"
+ "UID=USER;"
+ "PWD=PASSWORD;"
+ "SCROLLABLERESULT=true");
+db.setDatabaseName(connectString);
+//! [39]
diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc
index 70205d5552..dc8d52b572 100644
--- a/src/sql/doc/src/sql-driver.qdoc
+++ b/src/sql/doc/src/sql-driver.qdoc
@@ -299,6 +299,12 @@
e.g., the SQLSTATEs. Before setting this connect option, consult
your ODBC documentation about behavior differences you can expect.
+ When using the SAP HANA database, the connection has to be
+ established using the option "SCROLLABLERESULT=TRUE", as the
+ HANA ODBC driver does not provide scrollable results by default, e.g.:
+
+ \snippet code/doc_src_sql-driver.cpp 39
+
If you experience very slow access of the ODBC datasource, make sure
that ODBC call tracing is turned off in the ODBC datasource manager.
diff --git a/src/sql/kernel/qsqlrecord.cpp b/src/sql/kernel/qsqlrecord.cpp
index 1c9ad5ec63..ecbe3eacdb 100644
--- a/src/sql/kernel/qsqlrecord.cpp
+++ b/src/sql/kernel/qsqlrecord.cpp
@@ -232,18 +232,19 @@ QString QSqlRecord::fieldName(int index) const
int QSqlRecord::indexOf(const QString& name) const
{
- QString tableName;
- QString fieldName = name;
+ QStringRef tableName;
+ QStringRef fieldName(&name);
const int idx = name.indexOf(QLatin1Char('.'));
if (idx != -1) {
- tableName = name.left(idx);
- fieldName = name.mid(idx + 1);
+ tableName = name.leftRef(idx);
+ fieldName = name.midRef(idx + 1);
}
- for (int i = 0; i < count(); ++i) {
+ const int cnt = count();
+ for (int i = 0; i < cnt; ++i) {
// Check the passed in name first in case it is an alias using a dot.
// Then check if both the table and field match when there is a table name specified.
- const auto currentField = d->fields.at(i);
- const auto currentFieldName = currentField.name();
+ const auto &currentField = d->fields.at(i);
+ const auto &currentFieldName = currentField.name();
if (currentFieldName.compare(name, Qt::CaseInsensitive) == 0
|| (idx != -1 && currentFieldName.compare(fieldName, Qt::CaseInsensitive) == 0
&& currentField.tableName().compare(tableName, Qt::CaseInsensitive) == 0)) {
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 587a91139d..d299cdad51 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -523,9 +523,9 @@ void Generator::generateCode()
// Finally create and initialize the static meta object
//
if (isQt)
- fprintf(out, "const QMetaObject QObject::staticQtMetaObject = {\n");
+ fprintf(out, "QT_INIT_METAOBJECT const QMetaObject QObject::staticQtMetaObject = {\n");
else
- fprintf(out, "const QMetaObject %s::staticMetaObject = {\n", cdef->qualified.constData());
+ fprintf(out, "QT_INIT_METAOBJECT const QMetaObject %s::staticMetaObject = {\n", cdef->qualified.constData());
if (isQObject)
fprintf(out, " { nullptr, ");
diff --git a/src/tools/qlalr/qlalr.pro b/src/tools/qlalr/qlalr.pro
index ce0f4a4f59..5cfeade1ee 100644
--- a/src/tools/qlalr/qlalr.pro
+++ b/src/tools/qlalr/qlalr.pro
@@ -25,5 +25,5 @@ OTHER_FILES += \
DEFINES += \
QT_NO_FOREACH
-QMAKE_TARGET_DESCRIPTION = "Qt Look Ahead LR Parser"
+QMAKE_TARGET_DESCRIPTION = "Qt Look Ahead LR Parser Generator"
load(qt_tool)
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 2b79831a74..14ac6ad31b 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -1086,8 +1086,8 @@ void QFileSystemModelPrivate::sortChildren(int column, const QModelIndex &parent
return;
QVector<QFileSystemModelPrivate::QFileSystemNode*> values;
- QHash<QString, QFileSystemNode *>::const_iterator iterator;
- for(iterator = indexNode->children.constBegin() ; iterator != indexNode->children.constEnd() ; ++iterator) {
+
+ for (auto iterator = indexNode->children.constBegin(), cend = indexNode->children.constEnd(); iterator != cend; ++iterator) {
if (filtersAcceptsNode(iterator.value())) {
values.append(iterator.value());
} else {
@@ -1647,13 +1647,10 @@ void QFileSystemModelPrivate::_q_directoryChanged(const QString &directory, cons
QStringList toRemove;
QStringList newFiles = files;
std::sort(newFiles.begin(), newFiles.end());
- QHash<QString, QFileSystemNode*>::const_iterator i = parentNode->children.constBegin();
- while (i != parentNode->children.constEnd()) {
+ for (auto i = parentNode->children.constBegin(), cend = parentNode->children.constEnd(); i != cend; ++i) {
QStringList::iterator iterator = std::lower_bound(newFiles.begin(), newFiles.end(), i.value()->fileName);
if ((iterator == newFiles.end()) || (i.value()->fileName < *iterator))
toRemove.append(i.value()->fileName);
-
- ++i;
}
for (int i = 0 ; i < toRemove.count() ; ++i )
removeNode(parentNode, toRemove[i]);
diff --git a/src/widgets/dialogs/qfilesystemmodel_p.h b/src/widgets/dialogs/qfilesystemmodel_p.h
index 640225529b..e8bae4f659 100644
--- a/src/widgets/dialogs/qfilesystemmodel_p.h
+++ b/src/widgets/dialogs/qfilesystemmodel_p.h
@@ -72,6 +72,23 @@ class ExtendedInformation;
class QFileSystemModelPrivate;
class QFileIconProvider;
+#if defined(Q_OS_WIN)
+class QFileSystemModelNodePathKey : public QString
+{
+public:
+ QFileSystemModelNodePathKey() {}
+ QFileSystemModelNodePathKey(const QString &other) : QString(other) {}
+ QFileSystemModelNodePathKey(const QFileSystemModelNodePathKey &other) : QString(other) {}
+ bool operator==(const QFileSystemModelNodePathKey &other) const { return !compare(other, Qt::CaseInsensitive); }
+};
+
+Q_DECLARE_TYPEINFO(QFileSystemModelNodePathKey, Q_MOVABLE_TYPE);
+
+inline uint qHash(const QFileSystemModelNodePathKey &key) { return qHash(key.toCaseFolded()); }
+#else // Q_OS_WIN
+typedef QString QFileSystemModelNodePathKey;
+#endif
+
class Q_AUTOTEST_EXPORT QFileSystemModelPrivate : public QAbstractItemModelPrivate
{
Q_DECLARE_PUBLIC(QFileSystemModel)
@@ -189,7 +206,7 @@ public:
bool populatedChildren;
bool isVisible;
- QHash<QString,QFileSystemNode *> children;
+ QHash<QFileSystemModelNodePathKey, QFileSystemNode *> children;
QList<QString> visibleChildren;
int dirtyChildrenIndex;
QFileSystemNode *parent;
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp
index c14dcec744..2cca3cbb3a 100644
--- a/src/widgets/itemviews/qlistwidget.cpp
+++ b/src/widgets/itemviews/qlistwidget.cpp
@@ -691,6 +691,9 @@ QListWidgetItem *QListWidgetItem::clone() const
Sets the data for a given \a role to the given \a value. Reimplement this
function if you need extra roles or special behavior for certain roles.
+ \note The default implementation treats Qt::EditRole and Qt::DisplayRole as
+ referring to the same data.
+
\sa Qt::ItemDataRole, data()
*/
void QListWidgetItem::setData(int role, const QVariant &value)
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index a0c01e2f25..1cb88cbeeb 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -1365,6 +1365,9 @@ QTableWidgetItem *QTableWidgetItem::clone() const
/*!
Sets the item's data for the given \a role to the specified \a value.
+ \note The default implementation treats Qt::EditRole and Qt::DisplayRole as
+ referring to the same data.
+
\sa Qt::ItemDataRole, data()
*/
void QTableWidgetItem::setData(int role, const QVariant &value)
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index d06128d012..de7f7c0b77 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -1699,6 +1699,9 @@ Qt::ItemFlags QTreeWidgetItem::flags() const
The \a role describes the type of data specified by \a value, and is defined by
the Qt::ItemDataRole enum.
+
+ \note The default implementation treats Qt::EditRole and Qt::DisplayRole as
+ referring to the same data.
*/
void QTreeWidgetItem::setData(int column, int role, const QVariant &value)
{
diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp
index 4f498efac0..373699a7aa 100644
--- a/src/widgets/styles/qstylehelper.cpp
+++ b/src/widgets/styles/qstylehelper.cpp
@@ -51,8 +51,6 @@
#include "qstylehelper_p.h"
#include <qstringbuilder.h>
-#include <qdatastream.h>
-#include <qcryptographichash.h>
QT_BEGIN_NAMESPACE
@@ -66,6 +64,7 @@ QString uniqueName(const QString &key, const QStyleOption *option, const QSize &
QString tmp = key % HexString<uint>(option->state)
% HexString<uint>(option->direction)
% HexString<uint>(complexOption ? uint(complexOption->activeSubControls) : 0u)
+ % HexString<quint64>(option->palette.cacheKey())
% HexString<uint>(size.width())
% HexString<uint>(size.height());
@@ -77,24 +76,6 @@ QString uniqueName(const QString &key, const QStyleOption *option, const QSize &
}
#endif // QT_CONFIG(spinbox)
- // QTBUG-56743, try to create a palette cache key reflecting the value,
- // as leaks may occur in conjunction with QStyleSheetStyle/QRenderRule modifying
- // palettes when using QPalette::cacheKey()
- if (option->palette != QGuiApplication::palette()) {
- tmp.append(QLatin1Char('P'));
-#ifndef QT_NO_DATASTREAM
- QByteArray key;
- key.reserve(5120); // Observed 5040B for a serialized palette on 64bit
- {
- QDataStream str(&key, QIODevice::WriteOnly);
- str << option->palette;
- }
- const QByteArray sha1 = QCryptographicHash::hash(key, QCryptographicHash::Sha1).toHex();
- tmp.append(QString::fromLatin1(sha1));
-#else // QT_NO_DATASTREAM
- tmp.append(QString::number(option->palette.cacheKey(), 16));
-#endif // !QT_NO_DATASTREAM
- }
return tmp;
}
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index 31fe33ef28..623ca5b0a1 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -44,7 +44,9 @@
#endif
#include "qclipboard.h"
#include <private/qguiapplication_p.h>
+#if QT_CONFIG(completer)
#include <private/qcompleter_p.h>
+#endif
#include <qpa/qplatformtheme.h>
#include <qstylehints.h>
#ifndef QT_NO_ACCESSIBILITY
diff --git a/src/winmain/qtmain_winrt.cpp b/src/winmain/qtmain_winrt.cpp
index 1f5b98794d..79ecf30b70 100644
--- a/src/winmain/qtmain_winrt.cpp
+++ b/src/winmain/qtmain_winrt.cpp
@@ -295,11 +295,15 @@ private:
bool develMode = false;
bool debugWait = false;
- for (const char *arg : args) {
- if (strcmp(arg, "-qdevel") == 0)
+ for (int i = args.count() - 1; i >= 0; --i) {
+ const char *arg = args.at(i);
+ if (strcmp(arg, "-qdevel") == 0) {
develMode = true;
- if (strcmp(arg, "-qdebug") == 0)
+ args.remove(i);
+ } else if (strcmp(arg, "-qdebug") == 0) {
debugWait = true;
+ args.remove(i);
+ }
}
if (develMode) {
// Write a PID file to help runner
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/tst_qsortfilterproxymodel_recursive.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/tst_qsortfilterproxymodel_recursive.cpp
index 9cf005af01..852d9adb46 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/tst_qsortfilterproxymodel_recursive.cpp
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/tst_qsortfilterproxymodel_recursive.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, authors Filipe Azevedo <filipe.azevedo@kdab.com> and David Faure <david.faure@kdab.com>
+** Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, authors Filipe Azevedo <filipe.azevedo@kdab.com> and David Faure <david.faure@kdab.com>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** 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-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/corelib/tools/qdatetime/BLACKLIST b/tests/auto/corelib/tools/qdatetime/BLACKLIST
deleted file mode 100644
index e78f5cfd87..0000000000
--- a/tests/auto/corelib/tools/qdatetime/BLACKLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-[operator_eqeq]
-ubuntu-16.04
-b2qt
diff --git a/tests/auto/corelib/tools/qstringview/tst_qstringview.cpp b/tests/auto/corelib/tools/qstringview/tst_qstringview.cpp
index 8a8aa8c6e1..4ae96005d0 100644
--- a/tests/auto/corelib/tools/qstringview/tst_qstringview.cpp
+++ b/tests/auto/corelib/tools/qstringview/tst_qstringview.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** 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-3.0.html.
**
** $QT_END_LICENSE$
**
diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
index f43e8d8ee6..ca6f677ba6 100644
--- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
+++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
@@ -39,6 +39,7 @@ private Q_SLOTS:
void roleValues();
void copySemantics();
void moveSemantics();
+ void setBrush();
};
void tst_QPalette::roleValues_data()
@@ -128,5 +129,35 @@ void tst_QPalette::moveSemantics()
#endif
}
+void tst_QPalette::setBrush()
+{
+ QPalette p(Qt::red);
+ const QPalette q = p;
+ QVERIFY(q.isCopyOf(p));
+
+ // Setting a different brush will detach
+ p.setBrush(QPalette::Disabled, QPalette::Button, Qt::green);
+ QVERIFY(!q.isCopyOf(p));
+ QVERIFY(q != p);
+
+ // Check we only changed what we said we would
+ for (int i = 0; i < QPalette::NColorGroups; i++)
+ for (int j = 0; j < QPalette::NColorRoles; j++) {
+ const auto g = QPalette::ColorGroup(i);
+ const auto r = QPalette::ColorRole(j);
+ const auto b = p.brush(g, r);
+ if (g == QPalette::Disabled && r == QPalette::Button)
+ QCOMPARE(b, QBrush(Qt::green));
+ else
+ QCOMPARE(b, q.brush(g, r));
+ }
+
+ const QPalette pp = p;
+ QVERIFY(pp.isCopyOf(p));
+ // Setting the same brush won't detach
+ p.setBrush(QPalette::Disabled, QPalette::Button, Qt::green);
+ QVERIFY(pp.isCopyOf(p));
+}
+
QTEST_MAIN(tst_QPalette)
#include "tst_qpalette.moc"
diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
index 3cf108ed62..37f94d0278 100644
--- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
@@ -90,6 +90,9 @@ private slots:
void rawFontFromInvalidData();
void kernedAdvances();
+
+ void fallbackFontsOrder();
+
private:
QString testFont;
QString testFontBoldItalic;
@@ -887,7 +890,7 @@ void tst_QRawFont::unsupportedWritingSystem()
QCOMPARE(rawFont.familyName(), QString::fromLatin1("QtBidiTestFont"));
QCOMPARE(rawFont.pixelSize(), 12.0);
- QString arabicText = QFontDatabase::writingSystemSample(QFontDatabase::Arabic);
+ QString arabicText = QFontDatabase::writingSystemSample(QFontDatabase::Arabic).simplified().remove(QLatin1Char(' '));
QTextLayout layout;
layout.setFont(font);
@@ -1009,6 +1012,38 @@ void tst_QRawFont::kernedAdvances()
QVERIFY(FUZZY_LTEQ(qAbs(advances.at(0).x() - expectedAdvanceWidth), errorMargin));
}
+void tst_QRawFont::fallbackFontsOrder()
+{
+ QFontDatabase fontDatabase;
+ int id = fontDatabase.addApplicationFont(testFont);
+
+ QFont font("QtBidiTestFont");
+ font.setPixelSize(12.0);
+
+ QString arabicText = QFontDatabase::writingSystemSample(QFontDatabase::Arabic);
+
+ // If this fails, then the writing system sample has changed and we need to create
+ // a new text containing both a space and Arabic characters.
+ QVERIFY(arabicText.contains(QLatin1Char(' ')));
+
+ QTextLayout layout;
+ layout.setFont(font);
+ layout.setText(arabicText);
+ layout.setCacheEnabled(true);
+ layout.beginLayout();
+ layout.createLine();
+ layout.endLayout();
+
+ QList<QGlyphRun> glyphRuns = layout.glyphRuns();
+
+ // Since QtBidiTestFont does not support Arabic nor the space, both should map to
+ // the same font. If this fails, it is an indication that the list of fallbacks fonts
+ // is not sorted by writing system support.
+ QCOMPARE(glyphRuns.size(), 1);
+
+ fontDatabase.removeApplicationFont(id);
+}
+
#endif // QT_NO_RAWFONT
QTEST_MAIN(tst_QRawFont)
diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp
index e00459557a..d42702e1de 100644
--- a/tests/auto/network/access/qftp/tst_qftp.cpp
+++ b/tests/auto/network/access/qftp/tst_qftp.cpp
@@ -41,6 +41,8 @@
#include <qnetworkconfigmanager.h>
#include <QNetworkSession>
#include <QtNetwork/private/qnetworksession_p.h>
+#include <QTcpServer>
+#include <QHostInfo>
#include "../../../network-settings.h"
@@ -108,6 +110,9 @@ private slots:
void qtbug7359Crash();
+ void loginURL_data();
+ void loginURL();
+
protected slots:
void stateChanged( int );
void listInfo( const QUrlInfo & );
@@ -397,11 +402,11 @@ void tst_QFtp::login_data()
QTest::addColumn<int>("success");
QTest::newRow( "ok01" ) << QtNetworkSettings::serverName() << (uint)21 << QString() << QString() << 1;
- QTest::newRow( "ok02" ) << QtNetworkSettings::serverName() << (uint)21 << QString("ftp") << QString() << 1;
+ QTest::newRow( "ok02" ) << QtNetworkSettings::serverName() << (uint)21 << QString("ftp") << QString("") << 1;
QTest::newRow( "ok03" ) << QtNetworkSettings::serverName() << (uint)21 << QString("ftp") << QString("foo") << 1;
QTest::newRow( "ok04" ) << QtNetworkSettings::serverName() << (uint)21 << QString("ftptest") << QString("password") << 1;
- QTest::newRow( "error01" ) << QtNetworkSettings::serverName() << (uint)21 << QString("foo") << QString() << 0;
+ QTest::newRow( "error01" ) << QtNetworkSettings::serverName() << (uint)21 << QString("foo") << QString("") << 0;
QTest::newRow( "error02" ) << QtNetworkSettings::serverName() << (uint)21 << QString("foo") << QString("bar") << 0;
}
@@ -2152,6 +2157,206 @@ void tst_QFtp::qtbug7359Crash()
QCoreApplication::processEvents(QEventLoop::AllEvents, 2000 - elapsed);
}
+class FtpLocalServer : public QTcpServer
+{
+ Q_OBJECT
+
+public:
+ explicit FtpLocalServer(QObject *parent = 0) : QTcpServer(parent) {}
+ virtual ~FtpLocalServer() { delete mSocket; }
+ void startServer(qint16 port = 0);
+ void stopServer();
+
+ enum class ReplyCodes {
+ ServiceReady = 220,
+ ServiceClose = 221,
+ NeedPassword = 331,
+ LoginFailed = 530,
+ RequestDeny = 550
+ };
+
+ void sendResponse(ReplyCodes code);
+
+ inline QString getRawUser() { return rawUser; }
+ inline QString getRawPassword() { return rawPass; }
+
+signals:
+ void onStarted();
+ void onStopped();
+
+public slots:
+ void socketReadyRead();
+ void socketDisconnected();
+
+protected:
+ virtual void incomingConnection(qintptr handle);
+
+private:
+ QTcpSocket *mSocket = nullptr;
+ QString rawUser;
+ QString rawPass;
+};
+
+void FtpLocalServer::startServer(qint16 port)
+{
+ if (listen(QHostAddress::Any, port))
+ emit onStarted(); // Notify connected objects
+ else
+ qDebug("Could not start FTP server");
+}
+
+void FtpLocalServer::stopServer()
+{
+ close();
+ emit onStopped(); // Notify connected objects
+}
+
+void FtpLocalServer::sendResponse(ReplyCodes code)
+{
+ if (mSocket)
+ {
+ QString response;
+ switch (code) {
+ case ReplyCodes::ServiceReady:
+ response = QString("220 Service ready for new user.\r\n");
+ break;
+ case ReplyCodes::ServiceClose:
+ response = QString("221 Service closing control connection.\r\n");
+ break;
+ case ReplyCodes::NeedPassword:
+ response = QString("331 User name okay, need password.\r\n");
+ break;
+ case ReplyCodes::LoginFailed:
+ response = QString("530 Not logged in.\r\n");
+ break;
+ case ReplyCodes::RequestDeny:
+ response = QString("550 Requested action not taken.\r\n");
+ break;
+ default:
+ qDebug("Unimplemented response code: %u", static_cast<uint>(code));
+ break;
+ }
+
+ if (!response.isEmpty())
+ mSocket->write(response.toLatin1());
+ }
+}
+
+void FtpLocalServer::incomingConnection(qintptr handle)
+{
+ mSocket = new QTcpSocket(this);
+ if (mSocket == nullptr || !mSocket->setSocketDescriptor(handle))
+ {
+ delete mSocket;
+ mSocket = nullptr;
+ qDebug() << handle << " Error binding socket";
+ return;
+ }
+
+ connect(mSocket, SIGNAL(readyRead()), this, SLOT(socketReadyRead()));
+ connect(mSocket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()));
+
+ // Accept client connection
+ sendResponse(ReplyCodes::ServiceReady);
+}
+
+void FtpLocalServer::socketReadyRead()
+{
+ QString data;
+ if (mSocket)
+ data.append(mSocket->readAll());
+
+ // RFC959 Upper and lower case alphabetic characters are to be treated identically.
+ if (data.startsWith("USER", Qt::CaseInsensitive)) {
+ rawUser = data;
+ sendResponse(ReplyCodes::NeedPassword);
+ } else if (data.startsWith("PASS", Qt::CaseInsensitive)) {
+ rawPass = data;
+ sendResponse(ReplyCodes::LoginFailed);
+ } else {
+ sendResponse(ReplyCodes::RequestDeny);
+ }
+}
+
+void FtpLocalServer::socketDisconnected()
+{
+ // Cleanup
+ if (mSocket)
+ mSocket->deleteLater();
+ deleteLater();
+}
+
+void tst_QFtp::loginURL_data()
+{
+ QTest::addColumn<QString>("user");
+ QTest::addColumn<QString>("password");
+ QTest::addColumn<QString>("rawUser");
+ QTest::addColumn<QString>("rawPass");
+
+ QTest::newRow("no username, no password")
+ << QString() << QString()
+ << QString("USER anonymous\r\n") << QString("PASS anonymous@\r\n");
+
+ QTest::newRow("username, no password")
+ << QString("someone") << QString()
+ << QString("USER someone\r\n") << QString();
+
+ QTest::newRow("username, empty password")
+ << QString("someone") << QString("")
+ << QString("USER someone\r\n") << QString("PASS \r\n");
+
+ QTest::newRow("username, password")
+ << QString("someone") << QString("nonsense")
+ << QString("USER someone\r\n") << QString("PASS nonsense\r\n");
+
+ QTest::newRow("anonymous, no password")
+ << QString("anonymous") << QString()
+ << QString("USER anonymous\r\n") << QString("PASS anonymous@\r\n");
+
+ QTest::newRow("Anonymous, no password")
+ << QString("Anonymous") << QString()
+ << QString("USER Anonymous\r\n") << QString("PASS anonymous@\r\n");
+
+ QTest::newRow("anonymous, empty password")
+ << QString("anonymous") << QString("")
+ << QString("USER anonymous\r\n") << QString("PASS \r\n");
+
+ QTest::newRow("ANONYMOUS, password")
+ << QString("ANONYMOUS") << QString("nonsense")
+ << QString("USER ANONYMOUS\r\n") << QString("PASS nonsense\r\n");
+}
+
+void tst_QFtp::loginURL()
+{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ QSKIP("This test should be verified on the local machine without proxies");
+
+ QFETCH(QString, user);
+ QFETCH(QString, password);
+ QFETCH(QString, rawUser);
+ QFETCH(QString, rawPass);
+
+ FtpLocalServer server;
+ server.startServer();
+ uint port = server.serverPort();
+
+ ftp = newFtp();
+ addCommand(QFtp::ConnectToHost,
+ ftp->connectToHost(QHostInfo::localHostName(), port));
+ addCommand(QFtp::Login, ftp->login(user, password));
+
+ QTestEventLoop::instance().enterLoop(5);
+ delete ftp;
+ ftp = nullptr;
+ server.stopServer();
+ if (QTestEventLoop::instance().timeout())
+ QFAIL(msgTimedOut(QHostInfo::localHostName(), port));
+
+ QCOMPARE(server.getRawUser(), rawUser);
+ QCOMPARE(server.getRawPassword(), rawPass);
+}
+
QTEST_MAIN(tst_QFtp)
#include "tst_qftp.moc"
diff --git a/tests/auto/network/socket/qudpsocket/BLACKLIST b/tests/auto/network/socket/qudpsocket/BLACKLIST
index d58a850a1f..a98c4d5c6b 100644
--- a/tests/auto/network/socket/qudpsocket/BLACKLIST
+++ b/tests/auto/network/socket/qudpsocket/BLACKLIST
@@ -18,12 +18,9 @@ osx
osx
[broadcasting]
osx
-ubuntu-16.04
[zeroLengthDatagram]
osx
[linkLocalIPv6]
redhatenterpriselinuxworkstation-6.6
-[pendingDatagramSize]
-ubuntu-16.04
[readyReadForEmptyDatagram]
ubuntu-16.04
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
index bbac03b708..8165ccbc58 100644
--- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
@@ -126,12 +126,14 @@ protected slots:
private:
bool shouldSkipIpv6TestsForBrokenSetsockopt();
+ bool shouldWorkaroundLinuxKernelBug();
#ifdef SHOULD_CHECK_SYSCALL_SUPPORT
bool ipv6SetsockoptionMissing(int level, int optname);
#endif
QNetworkInterface interfaceForGroup(const QHostAddress &multicastGroup);
bool m_skipUnsupportedIPv6Tests;
+ bool m_workaroundLinuxKernelBug;
QList<QHostAddress> allAddresses;
QHostAddress multicastGroup4, multicastGroup6;
QVector<QHostAddress> linklocalMulticastGroups;
@@ -207,6 +209,16 @@ QNetworkInterface tst_QUdpSocket::interfaceForGroup(const QHostAddress &multicas
return ipv6if;
}
+bool tst_QUdpSocket::shouldWorkaroundLinuxKernelBug()
+{
+#ifdef Q_OS_LINUX
+ const QVersionNumber version = QVersionNumber::fromString(QSysInfo::kernelVersion());
+ return version.majorVersion() == 4 && version.minorVersion() >= 6 && version.minorVersion() < 13;
+#else
+ return false;
+#endif
+}
+
static QHostAddress makeNonAny(const QHostAddress &address, QHostAddress::SpecialAddress preferForAny = QHostAddress::LocalHost)
{
if (address == QHostAddress::Any)
@@ -276,6 +288,7 @@ void tst_QUdpSocket::initTestCase()
qDebug() << "Will use multicast groups" << multicastGroup4 << multicastGroup6 << linklocalMulticastGroups;
+ m_workaroundLinuxKernelBug = shouldWorkaroundLinuxKernelBug();
if (EmulationDetector::isRunningArmOnX86())
QSKIP("This test is unreliable due to QEMU emulation shortcomings.");
}
@@ -360,6 +373,9 @@ void tst_QUdpSocket::unconnectedServerAndClientTest()
void tst_QUdpSocket::broadcasting()
{
+ if (m_workaroundLinuxKernelBug)
+ QSKIP("This test can fail due to linux kernel bug");
+
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
#ifndef QT_NO_NETWORKPROXY
@@ -805,6 +821,9 @@ void tst_QUdpSocket::bindAndConnectToHost()
void tst_QUdpSocket::pendingDatagramSize()
{
+ if (m_workaroundLinuxKernelBug)
+ QSKIP("This test can fail due to linux kernel bug");
+
QUdpSocket server;
QVERIFY2(server.bind(), server.errorString().toLatin1().constData());
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
index a4a8a647a3..baf2551dfb 100644
--- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
@@ -2253,6 +2253,31 @@ void tst_QSqlQuery::prepare_bind_exec()
QCOMPARE( q.value(1).toString(), QString("name") );
QCOMPARE( q.value(2).toString(), QString("name") );
+ // Test that duplicated named placeholders before the next unique one works correctly - QTBUG-65150
+ QVERIFY(q.prepare("insert into " + qtest_prepare + " (id, name, name2) values (:id, :id, :name)"));
+ for (i = 104; i < 106; ++i) {
+ q.bindValue(":id", i);
+ q.bindValue(":name", "name");
+ QVERIFY(q.exec());
+ }
+ QVERIFY(q.exec("select * from " + qtest_prepare + " where id > 103 order by id"));
+ QVERIFY(q.next());
+ QCOMPARE(q.value(0).toInt(), 104);
+ QCOMPARE(q.value(1).toString(), QString("104"));
+ QCOMPARE(q.value(2).toString(), QString("name"));
+
+ // Test that duplicated named placeholders in any order
+ QVERIFY(q.prepare("insert into " + qtest_prepare + " (id, name, name2) values (:id, :name, :id)"));
+ for (i = 107; i < 109; ++i) {
+ q.bindValue(":id", i);
+ q.bindValue(":name", "name");
+ QVERIFY(q.exec());
+ }
+ QVERIFY(q.exec("select * from " + qtest_prepare + " where id > 106 order by id"));
+ QVERIFY(q.next());
+ QCOMPARE(q.value(0).toInt(), 107);
+ QCOMPARE(q.value(1).toString(), QString("name"));
+ QCOMPARE(q.value(2).toString(), QString("107"));
} // end of SQLite scope
}
diff --git a/tests/auto/tools/qmake/testdata/rawString/object2.h b/tests/auto/tools/qmake/testdata/rawString/object2.h
index 2ab77cd3bd..d29f0c72ec 100644
--- a/tests/auto/tools/qmake/testdata/rawString/object2.h
+++ b/tests/auto/tools/qmake/testdata/rawString/object2.h
@@ -1,31 +1,37 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** 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 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** 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.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 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$
**
diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 979d5c632e..71efe1d59a 100644
--- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -43,6 +43,7 @@
#if defined(Q_OS_WIN)
# include <qt_windows.h> // for SetFileAttributes
#endif
+#include <private/qfilesystemengine_p.h>
#include <algorithm>
@@ -883,6 +884,18 @@ void tst_QFileSystemModel::deleteFile()
QVERIFY(!newFile.exists());
}
+static QString flipCase(QString s)
+{
+ for (int i = 0, size = s.size(); i < size; ++i) {
+ const QChar c = s.at(i);
+ if (c.isUpper())
+ s[i] = c.toLower();
+ else if (c.isLower())
+ s[i] = c.toUpper();
+ }
+ return s;
+}
+
void tst_QFileSystemModel::caseSensitivity()
{
QString tmp = flatDirTestPath;
@@ -890,9 +903,23 @@ void tst_QFileSystemModel::caseSensitivity()
files << "a" << "c" << "C";
QVERIFY(createFiles(tmp, files));
QModelIndex root = model->index(tmp);
+ QStringList paths;
+ QModelIndexList indexes;
QCOMPARE(model->rowCount(root), 0);
for (int i = 0; i < files.count(); ++i) {
- QVERIFY(model->index(tmp + '/' + files.at(i)).isValid());
+ const QString path = tmp + '/' + files.at(i);
+ const QModelIndex index = model->index(path);
+ QVERIFY(index.isValid());
+ paths.append(path);
+ indexes.append(index);
+ }
+
+ if (!QFileSystemEngine::isCaseSensitive()) {
+ // QTBUG-31103, QTBUG-64147: Verify that files can be accessed by paths with fLipPeD case.
+ for (int i = 0; i < paths.count(); ++i) {
+ const QModelIndex flippedCaseIndex = model->index(flipCase(paths.at(i)));
+ QCOMPARE(indexes.at(i), flippedCaseIndex);
+ }
}
}