Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev

This commit is contained in:
Liang Qi 2017-03-28 11:20:40 +00:00 committed by The Qt Project
commit 71a2d4fa3d
150 changed files with 2719 additions and 765 deletions

View File

@ -3,19 +3,19 @@ CONFIG += no_docs_target
SUBDIRS = \
corelib \
dbus \
embedded \
gui \
network \
qpa \
qtconcurrent \
qtestlib \
sql \
touch \
widgets \
xml
touch
qtHaveModule(dbus): SUBDIRS += dbus
qtHaveModule(network): SUBDIRS += network
qtHaveModule(testlib): SUBDIRS += qtestlib
qtHaveModule(concurrent): SUBDIRS += qtconcurrent
qtHaveModule(sql): SUBDIRS += sql
qtHaveModule(widgets): SUBDIRS += widgets
qtHaveModule(xml): SUBDIRS += xml
qtHaveModule(gui) {
SUBDIRS += gui
qtConfig(opengl): SUBDIRS += opengl
qtConfig(vulkan): SUBDIRS += vulkan
}

View File

@ -8,7 +8,7 @@ SUBDIRS = books \
relationaltablemodel \
sqlwidgetmapper
!wince: SUBDIRS += masterdetail
!wince:qtHaveModule(xml): SUBDIRS += masterdetail
!wince: SUBDIRS += \
querymodel \

View File

@ -20,3 +20,4 @@ SUBDIRS = addressbook \
stardelegate \
storageview
contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= puzzle
!qtHaveModule(xml): SUBDIRS -= simpledommodel

View File

@ -1,5 +1,7 @@
defineTest(qtConfSanitizeMkspec) {
deviceSanityCheckCompiler()
}
QMAKE_CFLAGS += $$COMPILER_FLAGS
QMAKE_CXXFLAGS += $$COMPILER_FLAGS
QMAKE_LFLAGS += $$LINKER_FLAGS
deviceSanityCheckCompiler()

View File

@ -90,7 +90,7 @@ warnings_are_errors:warning_clean {
# (NULL in C++ is usually a literal 0)
QMAKE_CXXFLAGS_WARN_ON += -Werror -ww177,1224,1478,1881 $$WERROR
}
} else:gcc:!clang:!intel_icc {
} else:gcc:!clang:!intel_icc:!rim_qcc {
# GCC 4.6-4.9, 5.x, ...
ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
contains(ver, "(4\\.[6789]|[5-9]\\..)") {

View File

@ -41,8 +41,12 @@ host_build {
}
}
CONFIG(shared, static|shared):qtConfig(framework): \
CONFIG += lib_bundle
qtConfig(framework) {
minimal_syncqt: \
CONFIG += module_frameworks
else: CONFIG(shared, static|shared): \
CONFIG += module_frameworks lib_bundle
}
CONFIG += relative_qt_rpath # Qt libraries should be relocatable

View File

@ -59,7 +59,9 @@ load(qt_build_paths)
# even beyond the module's own build. The implication of this is that
# qmake might never use a framework's headers in a non-prefix build,
# as there is no separate set of .pri files for users outside Qt.
prefix_build:lib_bundle: \
# Borrowing is assumed to happen from modules which, in a framework build,
# actually are frameworks.
prefix_build:module_frameworks: \
fwd = _FWD
# When using a split include path during the build, the installed module's
# include path is also structurally different from that in the build dir.
@ -82,7 +84,7 @@ for(mod, MODULE_INCNAME) {
generated_privates: \
MODULE$${sfwd}$${prv}_INCLUDES += $$mbibase/$$VERSION $$mbibase/$$VERSION/$$mod
}
prefix_build:lib_bundle {
prefix_build:module_frameworks {
mfbase = \$\$QT_MODULE_LIB_BASE/$${mod}.framework/Headers
MODULE_INCLUDES += $$mfbase
MODULE$${prv}_INCLUDES += $$mfbase/$$VERSION $$mfbase/$$VERSION/$$mod
@ -179,7 +181,7 @@ headersclean:!internal_module {
-Dforeach=public: \
-Dforever=public:
gcc {
gcc:!rim_qcc {
# Turn on some extra warnings not found in -Wall -Wextra.
# Common to GCC, Clang and ICC (and other compilers that masquerade as GCC):
hcleanFLAGS = -Wall -Wextra -Werror \

View File

@ -83,10 +83,10 @@ defineReplace(qtExportLibsForModule) {
module_build_type = v2
static: \
module_build_type += staticlib
lib_bundle {
lib_bundle: \
module_build_type += lib_bundle
module_frameworks: \
MODULE_FRAMEWORKS = " \$\$QT_MODULE_LIB_BASE"
}
internal_module: \
module_build_type += internal_module
ltcg: \

View File

@ -1,7 +1,16 @@
#
# Extra-compilers for handling files specified in
# the WAYLANDSERVERSOURCES and WAYLANDCLIENTSOURCES variables
# the WAYLANDSERVERSOURCES and WAYLANDCLIENTSOURCES variables.
#
# WAYLANDSERVERSOURCES_SYSTEM and WAYLANDCLIENTSOURCES_SYSTEM
# are for protocols where the wayland-scanner output is already
# included in the system libraries. In that case, .c files must
# not be generated, to avoid the Qt version replacing driver-specific
# functions. These files are therefore omitted from wayland_code.input.
# Header files are still generated because they are used to build QtWayland.
#
# qtwaylandscanner must be used even in the _SYSTEM case, since the system
# Wayland libraries do not contain Qt code.
isEmpty(QMAKE_WAYLAND_SCANNER):error("QMAKE_WAYLAND_SCANNER not defined for this mkspec")
@ -9,9 +18,9 @@ defineReplace(waylandScannerHeaderFiles) {
side = $$1
path = $$2
isEqual(side, "server"): \
sources_list = $$WAYLANDSERVERSOURCES
sources_list = $$WAYLANDSERVERSOURCES $$WAYLANDSERVERSOURCES_SYSTEM
else: \
sources_list = $$WAYLANDCLIENTSOURCES
sources_list = $$WAYLANDCLIENTSOURCES $$WAYLANDCLIENTSOURCES_SYSTEM
wayland_header_files_for_side =
for(file, sources_list) {
basenameFile = $$basename(file)
@ -50,7 +59,7 @@ qt_install_headers {
}
wayland_server_header.name = wayland ${QMAKE_FILE_BASE}
wayland_server_header.input = WAYLANDSERVERSOURCES
wayland_server_header.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
wayland_server_header.variable_out = HEADERS
wayland_server_header.output = $${WAYLAND_SERVER_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
wayland_server_header.commands = $$QMAKE_WAYLAND_SCANNER server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
@ -58,7 +67,7 @@ silent:wayland_server_header.commands = @echo Wayland server header ${QMAKE_FILE
QMAKE_EXTRA_COMPILERS += wayland_server_header
wayland_client_header.name = wayland ${QMAKE_FILE_BASE}
wayland_client_header.input = WAYLANDCLIENTSOURCES
wayland_client_header.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
wayland_client_header.variable_out = HEADERS
wayland_client_header.output = $${WAYLAND_CLIENT_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
wayland_client_header.commands = $$QMAKE_WAYLAND_SCANNER client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
@ -76,7 +85,7 @@ QMAKE_EXTRA_COMPILERS += wayland_code
qtPrepareTool(QMAKE_QTWAYLANDSCANNER, qtwaylandscanner)
qtwayland_client_header.name = qtwayland ${QMAKE_FILE_BASE}
qtwayland_client_header.input = WAYLANDCLIENTSOURCES
qtwayland_client_header.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
qtwayland_client_header.variable_out = HEADERS
qtwayland_client_header.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_CLIENT_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
qtwayland_client_header.output = $${WAYLAND_CLIENT_HEADER_DEST}qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
@ -85,7 +94,7 @@ silent:qtwayland_client_header.commands = @echo QtWayland client header ${QMAKE_
QMAKE_EXTRA_COMPILERS += qtwayland_client_header
qtwayland_client_code.name = qtwayland ${QMAKE_FILE_BASE}
qtwayland_client_code.input = WAYLANDCLIENTSOURCES
qtwayland_client_code.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
qtwayland_client_code.variable_out = SOURCES
qtwayland_client_code.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_CLIENT_HEADER_DEST}qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
qtwayland_client_code.output = qwayland-${QMAKE_FILE_BASE}.cpp
@ -94,7 +103,7 @@ silent:qtwayland_client_code.commands = @echo QtWayland client code ${QMAKE_FILE
QMAKE_EXTRA_COMPILERS += qtwayland_client_code
qtwayland_server_header.name = qtwayland ${QMAKE_FILE_BASE}
qtwayland_server_header.input = WAYLANDSERVERSOURCES
qtwayland_server_header.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
qtwayland_server_header.variable_out = HEADERS
qtwayland_server_header.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_SERVER_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
qtwayland_server_header.output = $${WAYLAND_SERVER_HEADER_DEST}qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
@ -103,7 +112,7 @@ silent:qtwayland_server_header.commands = @echo QtWayland server header ${QMAKE_
QMAKE_EXTRA_COMPILERS += qtwayland_server_header
qtwayland_server_code.name = qtwayland ${QMAKE_FILE_BASE}
qtwayland_server_code.input = WAYLANDSERVERSOURCES
qtwayland_server_code.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
qtwayland_server_code.variable_out = SOURCES
qtwayland_server_code.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_SERVER_HEADER_DEST}qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
qtwayland_server_code.output = qwayland-server-${QMAKE_FILE_BASE}.cpp

View File

@ -21,8 +21,7 @@ CFLAGS_EXTRA = -fms-compatibility-version=19.00.23506 -Wno-microsoft-enum-v
!else
CXX = cl
LINKER = link
CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS \
/wd4577 $(CFLAGS_CRT)
CFLAGS_EXTRA = /MP /wd4577 $(CFLAGS_CRT)
!endif # !win32-icc
!if "$(QMAKESPEC)" != "win32-clang-msvc"
@ -37,6 +36,7 @@ CFLAGS_BARE = -c -Fo./ -Fdqmake.pdb \
-I$(INC_PATH) -I$(INC_PATH)\QtCore -I$(INC_PATH)\QtCore\$(QT_VERSION) -I$(INC_PATH)\QtCore\$(QT_VERSION)\QtCore \
-I$(BUILD_PATH)\src\corelib\global \
-I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \
-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS \
-DQT_VERSION_STR=\"$(QT_VERSION)\" -DQT_VERSION_MAJOR=$(QT_MAJOR_VERSION) -DQT_VERSION_MINOR=$(QT_MINOR_VERSION) -DQT_VERSION_PATCH=$(QT_PATCH_VERSION) \
-DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \
-DQT_NO_FOREACH -DUNICODE

View File

@ -1216,6 +1216,7 @@ VCLinkerTool::VCLinkerTool()
: DataExecutionPrevention(unset),
EnableCOMDATFolding(optFoldingDefault),
GenerateDebugInformation(unset),
DebugInfoOption(linkerDebugOptionNone),
GenerateMapFile(unset),
HeapCommitSize(-1),
HeapReserveSize(-1),

965
src/3rdparty/gradle/LICENSE-GRADLEW.txt vendored Normal file
View File

@ -0,0 +1,965 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================
Gradle Subcomponents:
------------------------------------------------------------------------------
License for the slf4j package
------------------------------------------------------------------------------
SLF4J License
Copyright (c) 2004-2007 QOS.ch
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
These terms are identical to those of the MIT License, also called the X License or the X11 License,
which is a simple, permissive non-copyleft free software license. It is deemed compatible with virtually
all types of licenses, commercial or otherwise. In particular, the Free Software Foundation has declared it
compatible with GNU GPL. It is also known to be approved by the Apache Software Foundation as compatible
with Apache Software License.
------------------------------------------------------------------------------
License for the JUnit package
------------------------------------------------------------------------------
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates' from a
Contributor if it was added to the Program by such Contributor itself or anyone
acting on such Contributor's behalf. Contributions do not include additions to
the Program which: (i) are separate modules of software distributed in
conjunction with the Program under their own license agreement, and (ii) are not
derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents " mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform,
distribute and sublicense the Contribution of such Contributor, if any, and such
derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
Patents to make, use, sell, offer to sell, import and otherwise transfer the
Contribution of such Contributor, if any, in source code and object code form.
This patent license shall apply to the combination of the Contribution and the
Program if, at the time the Contribution is added by the Contributor, such
addition of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other combinations
which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other intellectual
property rights of any other entity. Each Contributor disclaims any liability to
Recipient for claims brought by any other entity based on infringement of
intellectual property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby assumes sole
responsibility to secure any other intellectual property rights needed, if any.
For example, if a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright license set
forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its
own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title and
non-infringement, and implied warranties or conditions of merchantability and
fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and consequential
damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered
by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable manner on or
through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the
Program.
Each Contributor must identify itself as the originator of its Contribution, if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore, if
a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses, damages
and costs (collectively "Losses") arising from claims, lawsuits and other legal
actions brought by a third party against the Indemnified Contributor to the
extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not apply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor to
control, and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may participate in
any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If that
Commercial Contributor then makes performance claims, or offers warranties
related to Product X, those performance claims and warranties are such
Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a court
requires any other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with its exercise of
rights under this Agreement, including but not limited to the risks and costs of
program errors, compliance with applicable laws, damage to or loss of data,
programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable
law, it shall not affect the validity or enforceability of the remainder of the
terms of this Agreement, and without further action by the parties hereto, such
provision shall be reformed to the minimum extent necessary to make such
provision valid and enforceable.
If Recipient institutes patent litigation against a Contributor with respect to
a patent applicable to software (including a cross-claim or counterclaim in a
lawsuit), then any patent licenses granted by that Contributor to such Recipient
under this Agreement shall terminate as of the date such litigation is filed. In
addition, if Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
itself (excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted under
Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue and
survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to time.
No one other than the Agreement Steward has the right to modify this Agreement.
IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
as the Agreement Steward to a suitable separate entity. Each new version of the
Agreement will be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the Agreement
under which it was received. In addition, after a new version of the Agreement
is published, Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated in Sections
2(a) and 2(b) above, Recipient receives no rights or licenses to the
intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
------------------------------------------------------------------------------
License for the JCIFS package
------------------------------------------------------------------------------
JCIFS License
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

23
src/3rdparty/gradle/gradle.pro vendored Normal file
View File

@ -0,0 +1,23 @@
CONFIG -= qt android_install
gradle.files = \
$$PWD/gradlew \
$$PWD/gradlew.bat \
$$PWD/gradle
gradle.path = $$[QT_INSTALL_PREFIX]/src/3rdparty/gradle
INSTALLS += gradle
!prefix_build:!equals(OUT_PWD, $$PWD) {
RETURN = $$escape_expand(\\n\\t)
equals(QMAKE_HOST.os, Windows) {
RETURN = $$escape_expand(\\r\\n\\t)
}
OUT_PATH = $$shell_path($$OUT_PWD)
QMAKE_POST_LINK += \
$${QMAKE_COPY} $$shell_path($$PWD/gradlew) $$OUT_PATH $$RETURN \
$${QMAKE_COPY} $$shell_path($$PWD/gradlew.bat) $$OUT_PATH $$RETURN \
$${QMAKE_COPY_DIR} $$shell_path($$PWD/gradle) $$OUT_PATH
}

Binary file not shown.

View File

@ -0,0 +1,6 @@
#Mon Feb 20 10:43:22 EST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-bin.zip

172
src/3rdparty/gradle/gradlew vendored Executable file
View File

@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS="-Xmx1024m -Dfile.encoding=UTF-8"
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

84
src/3rdparty/gradle/gradlew.bat vendored Normal file
View File

@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=-Xmx1024m -Dfile.encoding=UTF-8
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

13
src/3rdparty/gradle/qt_attribution.json vendored Normal file
View File

@ -0,0 +1,13 @@
{
"Id": "android-gradle-wrapper",
"Name": "Gradle wrapper",
"Homepage": "https://gradle.org",
"Version": "3.4.1",
"DownloadLocation": "https://github.com/gradle/gradle/releases/tag/v3.4.1",
"QtUsage": "Needed to create Android packages",
"License": "Apache License 2.0",
"LicenseId": "Apache-2.0",
"LicenseFile": "LICENSE-GRADLEW.txt",
"Copyright": "Copyright (C) 2017 Gradle Inc."
}

View File

@ -4,7 +4,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.android.tools.build:gradle:2.2.0'
}
}

View File

@ -278,7 +278,7 @@ template <typename X> struct QAtomicOps
template <typename T>
static bool testAndSetRelaxed(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
{
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_relaxed);
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_relaxed, std::memory_order_relaxed);
if (currentValue)
*currentValue = expectedValue;
return tmp;
@ -287,7 +287,7 @@ template <typename X> struct QAtomicOps
template <typename T>
static bool testAndSetAcquire(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
{
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acquire);
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acquire, std::memory_order_acquire);
if (currentValue)
*currentValue = expectedValue;
return tmp;
@ -296,7 +296,7 @@ template <typename X> struct QAtomicOps
template <typename T>
static bool testAndSetRelease(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
{
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_release);
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_release, std::memory_order_relaxed);
if (currentValue)
*currentValue = expectedValue;
return tmp;
@ -305,7 +305,7 @@ template <typename X> struct QAtomicOps
template <typename T>
static bool testAndSetOrdered(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
{
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acq_rel);
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acq_rel, std::memory_order_acquire);
if (currentValue)
*currentValue = expectedValue;
return tmp;

View File

@ -1168,8 +1168,8 @@
and Windows) the window will take a modified appearance. This flag is set
or cleared by QWidget::setWindowModified().
\value WA_WindowPropagation Makes a toplevel window inherit font and
palette from its parent.
\value WA_WindowPropagation Makes a toplevel window inherit font, palette
and locale from its parent.
\value WA_MacAlwaysShowToolWindow On \macos, show the tool window even
when the application is not active. By default, all tool windows are

View File

@ -2105,11 +2105,11 @@ Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, bool all
return name;
int i = len - 1;
QVarLengthArray<QChar> outVector(len);
QVarLengthArray<ushort> outVector(len);
int used = len;
QChar *out = outVector.data();
const QChar *p = name.unicode();
const QChar *prefix = p;
ushort *out = outVector.data();
const ushort *p = name.utf16();
const ushort *prefix = p;
int up = 0;
const int prefixLength = rootLength(name, allowUncPaths);
@ -2117,39 +2117,39 @@ Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, bool all
i -= prefixLength;
// replicate trailing slash (i > 0 checks for emptiness of input string p)
if (i > 0 && p[i].unicode() == '/') {
out[--used].unicode() = '/';
if (i > 0 && p[i] == '/') {
out[--used] = '/';
--i;
}
while (i >= 0) {
// remove trailing slashes
if (p[i].unicode() == '/') {
if (p[i] == '/') {
--i;
continue;
}
// remove current directory
if (p[i].unicode() == '.' && (i == 0 || p[i-1].unicode() == '/')) {
if (p[i] == '.' && (i == 0 || p[i-1] == '/')) {
--i;
continue;
}
// detect up dir
if (i >= 1 && p[i].unicode() == '.' && p[i-1].unicode() == '.'
&& (i == 1 || (i >= 2 && p[i-2].unicode() == '/'))) {
if (i >= 1 && p[i] == '.' && p[i-1] == '.'
&& (i == 1 || (i >= 2 && p[i-2] == '/'))) {
++up;
i -= 2;
continue;
}
// prepend a slash before copying when not empty
if (!up && used != len && out[used].unicode() != '/')
out[--used] = QLatin1Char('/');
if (!up && used != len && out[used] != '/')
out[--used] = '/';
// skip or copy
while (i >= 0) {
if (p[i].unicode() == '/') { // do not copy slashes
if (p[i] == '/') { // do not copy slashes
--i;
break;
}
@ -2171,17 +2171,17 @@ Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, bool all
// add remaining '..'
while (up) {
if (used != len && out[used].unicode() != '/') // is not empty and there isn't already a '/'
out[--used] = QLatin1Char('/');
out[--used] = QLatin1Char('.');
out[--used] = QLatin1Char('.');
if (used != len && out[used] != '/') // is not empty and there isn't already a '/'
out[--used] = '/';
out[--used] = '.';
out[--used] = '.';
--up;
}
bool isEmpty = used == len;
if (prefixLength) {
if (!isEmpty && out[used].unicode() == '/') {
if (!isEmpty && out[used] == '/') {
// Eventhough there is a prefix the out string is a slash. This happens, if the input
// string only consists of a prefix followed by one or more slashes. Just skip the slash.
++used;
@ -2192,18 +2192,19 @@ Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, bool all
if (isEmpty) {
// After resolving the input path, the resulting string is empty (e.g. "foo/.."). Return
// a dot in that case.
out[--used] = QLatin1Char('.');
} else if (out[used].unicode() == '/') {
out[--used] = '.';
} else if (out[used] == '/') {
// After parsing the input string, out only contains a slash. That happens whenever all
// parts are resolved and there is a trailing slash ("./" or "foo/../" for example).
// Prepend a dot to have the correct return value.
out[--used] = QLatin1Char('.');
out[--used] = '.';
}
}
// If path was not modified return the original value
QString ret = (used == 0 ? name : QString(out + used, len - used));
return ret;
if (used == 0)
return name;
return QString::fromUtf16(out + used, len - used);
}
static QString qt_cleanPath(const QString &path, bool *ok)

View File

@ -688,6 +688,19 @@ QDateTime QFSFileEngine::fileTime(FileTime time) const
uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags)
{
#if (defined(Q_OS_LINUX) || defined(Q_OS_ANDROID)) && Q_PROCESSOR_WORDSIZE == 4
// The Linux mmap2 system call on 32-bit takes a page-shifted 32-bit
// integer so the maximum offset is 1 << (32+12) (the shift is always 12,
// regardless of the actual page size). Unfortunately, the mmap64()
// function is known to be broken in all Linux libcs (glibc, uclibc, musl
// and Bionic): all of them do the right shift, but don't confirm that the
// result fits into the 32-bit parameter to the kernel.
static qint64 MaxFileOffset = (Q_INT64_C(1) << (32+12)) - 1;
#else
static qint64 MaxFileOffset = std::numeric_limits<QT_OFF_T>::max();
#endif
Q_Q(QFSFileEngine);
Q_UNUSED(flags);
if (openMode == QIODevice::NotOpen) {
@ -695,7 +708,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla
return 0;
}
if (offset < 0 || offset != qint64(QT_OFF_T(offset))
if (offset < 0 || offset > MaxFileOffset
|| size < 0 || quint64(size) > quint64(size_t(-1))) {
q->setError(QFile::UnspecifiedError, qt_error_string(int(EINVAL)));
return 0;

View File

@ -44,6 +44,7 @@
#include <QtCore/qthread.h>
#include <QtCore/qdeadlinetimer.h>
#include <QtCore/qdatetime.h>
#include <QtCore/qfileinfo.h>
QT_BEGIN_NAMESPACE
@ -226,6 +227,8 @@ bool QLockFile::tryLock(int timeout)
return false;
case LockFailedError:
if (!d->isLocked && d->isApparentlyStale()) {
if (Q_UNLIKELY(QFileInfo(d->fileName).lastModified() > QDateTime::currentDateTime()))
qInfo("QLockFile: Lock file '%ls' has a modification time in the future", qUtf16Printable(d->fileName));
// Stale lock from another thread/process
// Ensure two processes don't remove it at the same time
QLockFile rmlock(d->fileName + QLatin1String(".rmlock"));

View File

@ -247,7 +247,7 @@ bool QLockFilePrivate::isApparentlyStale() const
}
}
const qint64 age = QFileInfo(fileName).lastModified().msecsTo(QDateTime::currentDateTime());
return staleLockTime > 0 && age > staleLockTime;
return staleLockTime > 0 && qAbs(age) > staleLockTime;
}
QString QLockFilePrivate::processNameByPid(qint64 pid)

View File

@ -160,7 +160,7 @@ bool QLockFilePrivate::isApparentlyStale() const
Q_UNUSED(appname);
#endif // Q_OS_WINRT
const qint64 age = QFileInfo(fileName).lastModified().msecsTo(QDateTime::currentDateTime());
return staleLockTime > 0 && age > staleLockTime;
return staleLockTime > 0 && qAbs(age) > staleLockTime;
}
QString QLockFilePrivate::processNameByPid(qint64 pid)

View File

@ -204,13 +204,14 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
CFBundleRef mainBundle = CFBundleGetMainBundle();
if (mainBundle) {
CFURLRef bundleUrl = CFBundleCopyBundleURL(mainBundle);
CFStringRef cfBundlePath = CFURLCopyPath(bundleUrl);
CFStringRef cfBundlePath = CFURLCopyFileSystemPath(bundleUrl, kCFURLPOSIXPathStyle);
QString bundlePath = QString::fromCFString(cfBundlePath);
CFRelease(cfBundlePath);
CFRelease(bundleUrl);
CFURLRef resourcesUrl = CFBundleCopyResourcesDirectoryURL(mainBundle);
CFStringRef cfResourcesPath = CFURLCopyPath(resourcesUrl);
CFStringRef cfResourcesPath = CFURLCopyFileSystemPath(resourcesUrl,
kCFURLPOSIXPathStyle);
QString resourcesPath = QString::fromCFString(cfResourcesPath);
CFRelease(cfResourcesPath);
CFRelease(resourcesUrl);

View File

@ -117,7 +117,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
}
case RuntimeLocation:
{
const uid_t myUid = geteuid();
const uint myUid = uint(geteuid());
// http://standards.freedesktop.org/basedir-spec/latest/
QFileInfo fileInfo;
QString xdgRuntimeDir = QFile::decodeName(qgetenv("XDG_RUNTIME_DIR"));

View File

@ -503,6 +503,8 @@ static QByteArray extractSubvolume(const QStorageIterator &it)
// if we didn't find the subvolume name, return the subvolume ID
return id;
}
#else
Q_UNUSED(it);
#endif
return QByteArray();
}

View File

@ -4169,12 +4169,15 @@ QUrl QUrl::fromUserInput(const QString &userInput, const QString &workingDirecto
return url;
}
const QFileInfo fileInfo(QDir(workingDirectory), userInput);
if (fileInfo.exists()) {
return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
}
QUrl url = QUrl(userInput, QUrl::TolerantMode);
// Check both QUrl::isRelative (to detect full URLs) and QDir::isAbsolutePath (since on Windows drive letters can be interpreted as schemes)
if (url.isRelative() && !QDir::isAbsolutePath(userInput)) {
QFileInfo fileInfo(QDir(workingDirectory), userInput);
if ((options & AssumeLocalFile) || fileInfo.exists())
return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
if ((options & AssumeLocalFile) && url.isRelative() && !QDir::isAbsolutePath(userInput)) {
return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
}
return fromUserInput(trimmedString);

View File

@ -38,6 +38,7 @@
**
****************************************************************************/
#include <cmath>
#include <qlocale.h>
#include "qjsonwriter_p.h"
#include "qjson_p.h"
@ -129,10 +130,12 @@ static void valueToJson(const QJsonPrivate::Base *b, const QJsonPrivate::Value &
break;
case QJsonValue::Double: {
const double d = v.toDouble(b);
if (qIsFinite(d)) // +2 to format to ensure the expected precision
json += QByteArray::number(d, 'g', QLocale::FloatingPointShortest);
else
if (qIsFinite(d)) { // +2 to format to ensure the expected precision
const double abs = std::abs(d);
json += QByteArray::number(d, abs == static_cast<quint64>(abs) ? 'f' : 'g', QLocale::FloatingPointShortest);
} else {
json += "null"; // +INF || -INF || NaN (see RFC4627#section2.4)
}
break;
}
case QJsonValue::String:

View File

@ -175,6 +175,9 @@ unix|integrity {
SOURCES += kernel/qsharedmemory_android.cpp \
kernel/qsystemsemaphore_android.cpp
}
# This is needed by QMetaType::typeName array implementation
integrity: QMAKE_CXXFLAGS += --pending_instantiations=128
}
vxworks {

View File

@ -216,6 +216,7 @@ QT_BEGIN_NAMESPACE
\omitvalue OkRequest
\value TabletEnterProximity Wacom tablet enter proximity event (QTabletEvent), sent to QApplication.
\value TabletLeaveProximity Wacom tablet leave proximity event (QTabletEvent), sent to QApplication.
\value TabletTrackingChange The Wacom tablet tracking state has changed (since Qt 5.9).
\omitvalue ThemeChange
\value ThreadChange The object is moved to another thread. This is the last event sent to this object in the previous thread. See QObject::moveToThread().
\value Timer Regular timer events (QTimerEvent).

View File

@ -407,7 +407,9 @@ void QEventDispatcherWin32Private::unregisterTimer(WinTimerInfo *t)
} else if (internalHwnd) {
KillTimer(internalHwnd, t->timerId);
}
delete t;
t->timerId = -1;
if (!t->inTimerEvent)
delete t;
}
void QEventDispatcherWin32Private::sendTimerEvent(int timerId)
@ -424,8 +426,9 @@ void QEventDispatcherWin32Private::sendTimerEvent(int timerId)
QCoreApplication::sendEvent(t->obj, &e);
// timer could have been removed
t = timerDict.value(timerId);
if (t) {
if (t->timerId == -1) {
delete t;
} else {
t->inTimerEvent = false;
}
}
@ -1013,8 +1016,10 @@ bool QEventDispatcherWin32::event(QEvent *e)
QTimerEvent te(zte->timerId());
QCoreApplication::sendEvent(t->obj, &te);
t = d->timerDict.value(zte->timerId());
if (t) {
// timer could have been removed
if (t->timerId == -1) {
delete t;
} else {
if (t->interval == 0 && t->inTimerEvent) {
// post the next zero timer event as long as the timer was not restarted
QCoreApplication::postEvent(this, new QZeroTimerEvent(zte->timerId()));

View File

@ -1341,7 +1341,6 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data)
case QMetaType::UnknownType:
case QMetaType::Void:
case QMetaType::VoidStar:
case QMetaType::Nullptr:
case QMetaType::QObjectStar:
case QMetaType::QModelIndex:
case QMetaType::QPersistentModelIndex:
@ -1350,6 +1349,8 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data)
case QMetaType::QJsonArray:
case QMetaType::QJsonDocument:
return false;
case QMetaType::Nullptr:
return true;
case QMetaType::Long:
stream << qlonglong(*static_cast<const long *>(data));
break;
@ -1563,7 +1564,6 @@ bool QMetaType::load(QDataStream &stream, int type, void *data)
case QMetaType::UnknownType:
case QMetaType::Void:
case QMetaType::VoidStar:
case QMetaType::Nullptr:
case QMetaType::QObjectStar:
case QMetaType::QModelIndex:
case QMetaType::QPersistentModelIndex:
@ -1572,6 +1572,8 @@ bool QMetaType::load(QDataStream &stream, int type, void *data)
case QMetaType::QJsonArray:
case QMetaType::QJsonDocument:
return false;
case QMetaType::Nullptr:
return true;
case QMetaType::Long: {
qlonglong l;
stream >> l;

View File

@ -642,9 +642,9 @@ QT_BEGIN_NAMESPACE
Constructs a QChar corresponding to ASCII/Latin-1 character \a ch.
\note This constructor is not available when \c QT_NO_CAST_FROM_ASCII
is defined.
or QT_RESTRICTED_CAST_FROM_ASCII is defined.
\sa QT_NO_CAST_FROM_ASCII
\sa QT_NO_CAST_FROM_ASCII, QT_RESTRICTED_CAST_FROM_ASCII
*/
/*!

View File

@ -585,17 +585,21 @@ Q_DECL_CONSTEXPR inline bool operator>=(QChar c1, QChar c2) Q_DECL_NOTHROW { ret
Q_DECL_CONSTEXPR inline bool operator> (QChar c1, QChar c2) Q_DECL_NOTHROW { return operator< (c2, c1); }
Q_DECL_CONSTEXPR inline bool operator<=(QChar c1, QChar c2) Q_DECL_NOTHROW { return !operator< (c2, c1); }
// disambiguate QChar == int (but only that, so constrain template to exactly 'int'):
template <typename T>
Q_DECL_DEPRECATED_X("don't compare ints to QChars, compare them to QChar::unicode() instead")
Q_DECL_CONSTEXPR inline
typename std::enable_if<std::is_same<typename std::remove_cv<T>::type, int>::value, bool>::type
operator==(QChar lhs, T rhs) Q_DECL_NOEXCEPT { return lhs == QChar(rhs); }
template <typename T>
Q_DECL_DEPRECATED_X("don't compare ints to QChars, compare them to QChar::unicode() instead")
Q_DECL_CONSTEXPR inline
typename std::enable_if<std::is_same<typename std::remove_cv<T>::type, int>::value, bool>::type
operator!=(QChar lhs, T rhs) Q_DECL_NOEXCEPT { return lhs != QChar(rhs); }
Q_DECL_CONSTEXPR inline bool operator==(QChar lhs, std::nullptr_t) Q_DECL_NOTHROW { return lhs.isNull(); }
Q_DECL_CONSTEXPR inline bool operator< (QChar, std::nullptr_t) Q_DECL_NOTHROW { return false; }
Q_DECL_CONSTEXPR inline bool operator==(std::nullptr_t, QChar rhs) Q_DECL_NOTHROW { return rhs.isNull(); }
Q_DECL_CONSTEXPR inline bool operator< (std::nullptr_t, QChar rhs) Q_DECL_NOTHROW { return !rhs.isNull(); }
Q_DECL_CONSTEXPR inline bool operator!=(QChar lhs, std::nullptr_t) Q_DECL_NOTHROW { return !operator==(lhs, nullptr); }
Q_DECL_CONSTEXPR inline bool operator>=(QChar lhs, std::nullptr_t) Q_DECL_NOTHROW { return !operator< (lhs, nullptr); }
Q_DECL_CONSTEXPR inline bool operator> (QChar lhs, std::nullptr_t) Q_DECL_NOTHROW { return operator< (nullptr, lhs); }
Q_DECL_CONSTEXPR inline bool operator<=(QChar lhs, std::nullptr_t) Q_DECL_NOTHROW { return !operator< (nullptr, lhs); }
Q_DECL_CONSTEXPR inline bool operator!=(std::nullptr_t, QChar rhs) Q_DECL_NOTHROW { return !operator==(nullptr, rhs); }
Q_DECL_CONSTEXPR inline bool operator>=(std::nullptr_t, QChar rhs) Q_DECL_NOTHROW { return !operator< (nullptr, rhs); }
Q_DECL_CONSTEXPR inline bool operator> (std::nullptr_t, QChar rhs) Q_DECL_NOTHROW { return operator< (rhs, nullptr); }
Q_DECL_CONSTEXPR inline bool operator<=(std::nullptr_t, QChar rhs) Q_DECL_NOTHROW { return !operator< (rhs, nullptr); }
#ifndef QT_NO_DATASTREAM
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, QChar);

View File

@ -1243,6 +1243,49 @@ end:
#endif // QT_NO_DATESTRING
#ifndef QT_NO_TEXTDATE
/*
\internal
\brief Returns the index in \a entries with the best prefix match to \a text
Scans \a entries looking for an entry overlapping \a text as much as possible
(an exact match beats any prefix match; a match of the full entry as prefix of
text beats any entry but one matching a longer prefix; otherwise, the match of
longest prefix wins, earlier entries beating later on a draw). Records the
length of overlap in *used (if \a used is non-NULL) and the first entry that
overlapped this much in *usedText (if \a usedText is non-NULL).
*/
static int findTextEntry(const QString &text, const QVector<QString> &entries, QString *usedText, int *used)
{
if (text.isEmpty())
return -1;
int bestMatch = -1;
int bestCount = 0;
for (int n = 0; n < entries.size(); ++n)
{
const QString &name = entries.at(n);
const int limit = qMin(text.size(), name.size());
int i = 0;
while (i < limit && text.at(i) == name.at(i).toLower())
++i;
// Full match beats an equal prefix match:
if (i > bestCount || (i == bestCount && i == name.size())) {
bestCount = i;
bestMatch = n;
if (i == name.size() && i == text.size())
break; // Exact match, name == text, wins.
}
}
if (usedText && bestMatch != -1)
*usedText = entries.at(bestMatch);
if (used)
*used = bestCount;
return bestMatch;
}
/*!
\internal
finds the first possible monthname that \a str1 can
@ -1252,99 +1295,40 @@ end:
int QDateTimeParser::findMonth(const QString &str1, int startMonth, int sectionIndex,
QString *usedMonth, int *used) const
{
int bestMatch = -1;
int bestCount = 0;
if (!str1.isEmpty()) {
const SectionNode &sn = sectionNode(sectionIndex);
if (sn.type != MonthSection) {
qWarning("QDateTimeParser::findMonth Internal error");
return -1;
}
QLocale::FormatType type = sn.count == 3 ? QLocale::ShortFormat : QLocale::LongFormat;
QLocale l = locale();
for (int month=startMonth; month<=12; ++month) {
const QString monthName = l.monthName(month, type);
QString str2 = monthName.toLower();
if (str1.startsWith(str2)) {
if (used) {
QDTPDEBUG << "used is set to" << str2.size();
*used = str2.size();
}
if (usedMonth)
*usedMonth = monthName;
return month;
}
if (context == FromString)
continue;
const int limit = qMin(str1.size(), str2.size());
QDTPDEBUG << "limit is" << limit << str1 << str2;
bool equal = true;
for (int i=0; i<limit; ++i) {
if (str1.at(i) != str2.at(i)) {
equal = false;
if (i > bestCount) {
bestCount = i;
bestMatch = month;
}
break;
}
}
if (equal) {
if (used)
*used = limit;
if (usedMonth)
*usedMonth = monthName;
return month;
}
}
if (usedMonth && bestMatch != -1)
*usedMonth = l.monthName(bestMatch, type);
const SectionNode &sn = sectionNode(sectionIndex);
if (sn.type != MonthSection) {
qWarning("QDateTimeParser::findMonth Internal error");
return -1;
}
if (used) {
QDTPDEBUG << "used is set to" << bestCount;
*used = bestCount;
}
return bestMatch;
QLocale::FormatType type = sn.count == 3 ? QLocale::ShortFormat : QLocale::LongFormat;
QLocale l = locale();
QVector<QString> monthNames;
monthNames.reserve(13 - startMonth);
for (int month = startMonth; month <= 12; ++month)
monthNames.append(l.monthName(month, type));
const int index = findTextEntry(str1, monthNames, usedMonth, used);
return index < 0 ? index : index + startMonth;
}
int QDateTimeParser::findDay(const QString &str1, int startDay, int sectionIndex, QString *usedDay, int *used) const
{
int bestMatch = -1;
int bestCount = 0;
if (!str1.isEmpty()) {
const SectionNode &sn = sectionNode(sectionIndex);
if (!(sn.type & DaySectionMask)) {
qWarning("QDateTimeParser::findDay Internal error");
return -1;
}
const QLocale l = locale();
for (int day=startDay; day<=7; ++day) {
const QString dayName = l.dayName(day, sn.count == 4 ? QLocale::LongFormat : QLocale::ShortFormat);
const QString str2 = dayName.toLower();
const int limit = qMin(str1.size(), str2.size());
int i = 0;
while (i < limit && str1.at(i) == str2.at(i))
++i;
if (i > bestCount) {
bestCount = i;
bestMatch = day;
}
}
if (usedDay && bestMatch != -1) {
*usedDay = l.dayName(bestMatch, sn.count == 4 ? QLocale::LongFormat : QLocale::ShortFormat);
}
const SectionNode &sn = sectionNode(sectionIndex);
if (!(sn.type & DaySectionMask)) {
qWarning("QDateTimeParser::findDay Internal error");
return -1;
}
if (used)
*used = bestCount;
return bestMatch;
QLocale::FormatType type = sn.count == 4 ? QLocale::LongFormat : QLocale::ShortFormat;
QLocale l = locale();
QVector<QString> daysOfWeek;
daysOfWeek.reserve(8 - startDay);
for (int day = startDay; day <= 7; ++day)
daysOfWeek.append(l.dayName(day, type));
const int index = findTextEntry(str1, daysOfWeek, usedDay, used);
return index < 0 ? index : index + startDay;
}
#endif // QT_NO_TEXTDATE

View File

@ -325,7 +325,7 @@ static uint qt_create_qhash_seed()
/*
The QHash seed itself.
*/
Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed = Q_BASIC_ATOMIC_INITIALIZER(-1);
static QBasicAtomicInt qt_qhash_seed = Q_BASIC_ATOMIC_INITIALIZER(-1);
/*!
\internal

View File

@ -432,6 +432,7 @@ public:
typedef const Key *pointer;
typedef const Key &reference;
key_iterator() = default;
explicit key_iterator(const_iterator o) : i(o) { }
const Key &operator*() const { return i.key(); }

View File

@ -531,6 +531,7 @@ public:
typedef const Key *pointer;
typedef const Key &reference;
key_iterator() = default;
explicit key_iterator(const_iterator o) : i(o) { }
const Key &operator*() const { return i.key(); }

View File

@ -357,6 +357,7 @@ Q_OUTOFLINE_TEMPLATE void QVarLengthArray<T, Prealloc>::realloc(int asize, int a
int osize = s;
const int copySize = qMin(asize, osize);
Q_ASSUME(copySize >= 0);
if (aalloc != a) {
if (aalloc > Prealloc) {
T* newPtr = reinterpret_cast<T *>(malloc(aalloc * sizeof(T)));

View File

@ -164,7 +164,9 @@
{ "libs": "-llibpng", "condition": "config.msvc" },
{ "libs": "-lpng", "condition": "!config.msvc" }
],
"use": "zlib"
"use": [
{ "lib": "zlib", "condition": "features.system-zlib" }
]
},
"mirclient": {
"label": "Mir client libraries",
@ -703,6 +705,7 @@
"label": " Using system libpng",
"disable": "input.libpng == 'qt'",
"enable": "input.libpng == 'system'",
"autoDetect": "features.system-zlib",
"condition": "features.png && libs.libpng",
"output": [ "privateFeature" ]
},

View File

@ -143,6 +143,8 @@ static bool read_xbm_body(QIODevice *device, int w, int h, QImage *outImage)
return false;
}
outImage->fill(Qt::color0); // in case the image data does not cover the full image
outImage->setColorCount(2);
outImage->setColor(0, qRgb(255,255,255)); // white
outImage->setColor(1, qRgb(0,0,0)); // black

View File

@ -291,6 +291,7 @@ static bool convert(const QVariant::Private *d, int t,
default:
break;
}
break;
}
#endif
#ifndef QT_NO_ICON

View File

@ -2735,26 +2735,29 @@ void QWindowPrivate::setCursor(const QCursor *newCursor)
cursor = QCursor(Qt::ArrowCursor);
hasCursor = false;
}
// Only attempt to set cursor and emit signal if there is an actual platform cursor
QScreen* screen = q->screen();
if (screen && screen->handle()->cursor()) {
applyCursor();
// Only attempt to emit signal if there is an actual platform cursor
if (applyCursor()) {
QEvent event(QEvent::CursorChange);
QGuiApplication::sendEvent(q, &event);
}
}
void QWindowPrivate::applyCursor()
// Apply the cursor and returns true iff the platform cursor exists
bool QWindowPrivate::applyCursor()
{
Q_Q(QWindow);
if (platformWindow) {
if (QPlatformCursor *platformCursor = q->screen()->handle()->cursor()) {
if (QScreen *screen = q->screen()) {
if (QPlatformCursor *platformCursor = screen->handle()->cursor()) {
if (!platformWindow)
return true;
QCursor *c = QGuiApplication::overrideCursor();
if (!c && hasCursor)
c = &cursor;
platformCursor->changeCursor(c, q);
return true;
}
}
return false;
}
#endif // QT_NO_CURSOR

View File

@ -121,7 +121,7 @@ public:
void maybeQuitOnLastWindowClosed();
#ifndef QT_NO_CURSOR
void setCursor(const QCursor *c = 0);
void applyCursor();
bool applyCursor();
#endif
void deliverUpdateRequest();

View File

@ -82,27 +82,31 @@ QHttpNetworkConnectionPrivate::QHttpNetworkConnectionPrivate(const QString &host
: state(RunningState),
networkLayerState(Unknown),
hostName(hostName), port(port), encrypt(encrypt), delayIpv4(true)
, activeChannelCount(type == QHttpNetworkConnection::ConnectionTypeHTTP2
#ifndef QT_NO_SSL
, channelCount((type == QHttpNetworkConnection::ConnectionTypeSPDY || type == QHttpNetworkConnection::ConnectionTypeHTTP2)
? 1 : defaultHttpChannelCount)
#else
, channelCount(type == QHttpNetworkConnection::ConnectionTypeHTTP2 ? 1 : defaultHttpChannelCount)
#endif // QT_NO_SSL
|| type == QHttpNetworkConnection::ConnectionTypeSPDY
#endif
? 1 : defaultHttpChannelCount)
, channelCount(defaultHttpChannelCount)
#ifndef QT_NO_NETWORKPROXY
, networkProxy(QNetworkProxy::NoProxy)
#endif
, preConnectRequests(0)
, connectionType(type)
{
// We allocate all 6 channels even if it's SPDY or HTTP/2 enabled
// connection: in case the protocol negotiation via NPN/ALPN fails,
// we will have normally working HTTP/1.1.
Q_ASSERT(channelCount >= activeChannelCount);
channels = new QHttpNetworkConnectionChannel[channelCount];
}
QHttpNetworkConnectionPrivate::QHttpNetworkConnectionPrivate(quint16 channelCount, const QString &hostName,
QHttpNetworkConnectionPrivate::QHttpNetworkConnectionPrivate(quint16 connectionCount, const QString &hostName,
quint16 port, bool encrypt,
QHttpNetworkConnection::ConnectionType type)
: state(RunningState), networkLayerState(Unknown),
hostName(hostName), port(port), encrypt(encrypt), delayIpv4(true),
channelCount(channelCount)
activeChannelCount(connectionCount), channelCount(connectionCount)
#ifndef QT_NO_NETWORKPROXY
, networkProxy(QNetworkProxy::NoProxy)
#endif
@ -147,7 +151,7 @@ void QHttpNetworkConnectionPrivate::pauseConnection()
state = PausedState;
// Disable all socket notifiers
for (int i = 0; i < channelCount; i++) {
for (int i = 0; i < activeChannelCount; i++) {
if (channels[i].socket) {
#ifndef QT_NO_SSL
if (encrypt)
@ -163,7 +167,7 @@ void QHttpNetworkConnectionPrivate::resumeConnection()
{
state = RunningState;
// Enable all socket notifiers
for (int i = 0; i < channelCount; i++) {
for (int i = 0; i < activeChannelCount; i++) {
if (channels[i].socket) {
#ifndef QT_NO_SSL
if (encrypt)
@ -184,7 +188,7 @@ void QHttpNetworkConnectionPrivate::resumeConnection()
int QHttpNetworkConnectionPrivate::indexOf(QAbstractSocket *socket) const
{
for (int i = 0; i < channelCount; ++i)
for (int i = 0; i < activeChannelCount; ++i)
if (channels[i].socket == socket)
return i;
@ -210,7 +214,7 @@ bool QHttpNetworkConnectionPrivate::shouldEmitChannelError(QAbstractSocket *sock
channels[otherSocket].ensureConnection();
}
if (channelCount == 1) {
if (activeChannelCount < channelCount) {
if (networkLayerState == HostLookupPending || networkLayerState == IPv4or6)
networkLayerState = QHttpNetworkConnectionPrivate::Unknown;
channels[0].close();
@ -405,7 +409,7 @@ void QHttpNetworkConnectionPrivate::copyCredentials(int fromChannel, QAuthentica
// select another channel
QAuthenticator* otherAuth = 0;
for (int i = 0; i < channelCount; ++i) {
for (int i = 0; i < activeChannelCount; ++i) {
if (i == fromChannel)
continue;
if (isProxy)
@ -900,7 +904,7 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply)
Q_Q(QHttpNetworkConnection);
// check if the reply is currently being processed or it is pipelined in
for (int i = 0; i < channelCount; ++i) {
for (int i = 0; i < activeChannelCount; ++i) {
// is the reply associated the currently processing of this channel?
if (channels[i].reply == reply) {
channels[i].reply = 0;
@ -1003,7 +1007,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest()
return;
//resend the necessary ones.
for (int i = 0; i < channelCount; ++i) {
for (int i = 0; i < activeChannelCount; ++i) {
if (channels[i].resendCurrent && (channels[i].state != QHttpNetworkConnectionChannel::ClosingState)) {
channels[i].resendCurrent = false;
@ -1023,7 +1027,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest()
return;
// try to get a free AND connected socket
for (int i = 0; i < channelCount; ++i) {
for (int i = 0; i < activeChannelCount; ++i) {
if (channels[i].socket) {
if (!channels[i].reply && !channels[i].isSocketBusy() && channels[i].socket->state() == QAbstractSocket::ConnectedState) {
if (dequeueRequest(channels[i].socket))
@ -1061,7 +1065,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest()
// return fast if there is nothing to pipeline
if (highPriorityQueue.isEmpty() && lowPriorityQueue.isEmpty())
return;
for (int i = 0; i < channelCount; i++)
for (int i = 0; i < activeChannelCount; i++)
if (channels[i].socket && channels[i].socket->state() == QAbstractSocket::ConnectedState)
fillPipeline(channels[i].socket);
@ -1077,7 +1081,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest()
int normalRequests = queuedRequests - preConnectRequests;
neededOpenChannels = qMax(normalRequests, preConnectRequests);
}
for (int i = 0; i < channelCount && neededOpenChannels > 0; ++i) {
for (int i = 0; i < activeChannelCount && neededOpenChannels > 0; ++i) {
bool connectChannel = false;
if (channels[i].socket) {
if ((channels[i].socket->state() == QAbstractSocket::ConnectingState)
@ -1107,7 +1111,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest()
void QHttpNetworkConnectionPrivate::readMoreLater(QHttpNetworkReply *reply)
{
for (int i = 0 ; i < channelCount; ++i) {
for (int i = 0 ; i < activeChannelCount; ++i) {
if (channels[i].reply == reply) {
// emulate a readyRead() from the socket
QMetaObject::invokeMethod(&channels[i], "_q_readyRead", Qt::QueuedConnection);
@ -1226,7 +1230,7 @@ void QHttpNetworkConnectionPrivate::_q_hostLookupFinished(const QHostInfo &info)
// connection will then be disconnected.
void QHttpNetworkConnectionPrivate::startNetworkLayerStateLookup()
{
if (channelCount > 1) {
if (activeChannelCount > 1) {
// At this time all channels should be unconnected.
Q_ASSERT(!channels[0].isSocketBusy());
Q_ASSERT(!channels[1].isSocketBusy());
@ -1264,7 +1268,7 @@ void QHttpNetworkConnectionPrivate::startNetworkLayerStateLookup()
void QHttpNetworkConnectionPrivate::networkLayerDetected(QAbstractSocket::NetworkLayerProtocol protocol)
{
for (int i = 0 ; i < channelCount; ++i) {
for (int i = 0 ; i < activeChannelCount; ++i) {
if ((channels[i].networkLayerPreference != protocol) && (channels[i].state == QHttpNetworkConnectionChannel::ConnectingState)) {
channels[i].close();
}
@ -1361,7 +1365,7 @@ void QHttpNetworkConnection::setCacheProxy(const QNetworkProxy &networkProxy)
d->networkProxy = networkProxy;
// update the authenticator
if (!d->networkProxy.user().isEmpty()) {
for (int i = 0; i < d->channelCount; ++i) {
for (int i = 0; i < d->activeChannelCount; ++i) {
d->channels[i].proxyAuthenticator.setUser(d->networkProxy.user());
d->channels[i].proxyAuthenticator.setPassword(d->networkProxy.password());
}
@ -1377,7 +1381,7 @@ QNetworkProxy QHttpNetworkConnection::cacheProxy() const
void QHttpNetworkConnection::setTransparentProxy(const QNetworkProxy &networkProxy)
{
Q_D(QHttpNetworkConnection);
for (int i = 0; i < d->channelCount; ++i)
for (int i = 0; i < d->activeChannelCount; ++i)
d->channels[i].setProxy(networkProxy);
}
@ -1409,7 +1413,7 @@ void QHttpNetworkConnection::setSslConfiguration(const QSslConfiguration &config
return;
// set the config on all channels
for (int i = 0; i < d->channelCount; ++i)
for (int i = 0; i < d->activeChannelCount; ++i)
d->channels[i].setSslConfiguration(config);
}
@ -1432,7 +1436,7 @@ void QHttpNetworkConnection::ignoreSslErrors(int channel)
return;
if (channel == -1) { // ignore for all channels
for (int i = 0; i < d->channelCount; ++i) {
for (int i = 0; i < d->activeChannelCount; ++i) {
d->channels[i].ignoreSslErrors();
}
@ -1448,7 +1452,7 @@ void QHttpNetworkConnection::ignoreSslErrors(const QList<QSslError> &errors, int
return;
if (channel == -1) { // ignore for all channels
for (int i = 0; i < d->channelCount; ++i) {
for (int i = 0; i < d->activeChannelCount; ++i) {
d->channels[i].ignoreSslErrors(errors);
}

View File

@ -243,6 +243,9 @@ public:
bool encrypt;
bool delayIpv4;
// Number of channels we are trying to use at the moment:
int activeChannelCount;
// The total number of channels we reserved:
const int channelCount;
QTimer delayedConnectionTimer;
QHttpNetworkConnectionChannel *channels; // parallel connections to the server

View File

@ -1083,12 +1083,36 @@ void QHttpNetworkConnectionChannel::_q_encrypted()
}
}
Q_FALLTHROUGH();
case QSslConfiguration::NextProtocolNegotiationNone:
case QSslConfiguration::NextProtocolNegotiationNone: {
protocolHandler.reset(new QHttpProtocolHandler(this));
QList<QByteArray> protocols = sslConfiguration.allowedNextProtocols();
const int nProtocols = protocols.size();
// Clear the protocol that we failed to negotiate, so we do not try
// it again on other channels that our connection can create/open.
if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP2)
protocols.removeAll(QSslConfiguration::ALPNProtocolHTTP2);
else if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeSPDY)
protocols.removeAll(QSslConfiguration::NextProtocolSpdy3_0);
if (nProtocols > protocols.size()) {
sslConfiguration.setAllowedNextProtocols(protocols);
const int channelCount = connection->d_func()->channelCount;
for (int i = 0; i < channelCount; ++i)
connection->d_func()->channels[i].setSslConfiguration(sslConfiguration);
}
connection->setConnectionType(QHttpNetworkConnection::ConnectionTypeHTTP);
// re-queue requests from SPDY queue to HTTP queue, if any
requeueSpdyRequests();
// We use only one channel for SPDY or HTTP/2, but normally six for
// HTTP/1.1 - let's restore this number to the reserved number of
// channels:
if (connection->d_func()->activeChannelCount < connection->d_func()->channelCount) {
connection->d_func()->activeChannelCount = connection->d_func()->channelCount;
// re-queue requests from SPDY queue to HTTP queue, if any
requeueSpdyRequests();
}
break;
}
default:
emitFinishedWithError(QNetworkReply::SslHandshakeFailedError,
"detected unknown Next Protocol Negotiation protocol");

View File

@ -22,16 +22,18 @@ include(ssl/ssl.pri)
QMAKE_LIBS += $$QMAKE_LIBS_NETWORK
ANDROID_BUNDLED_JAR_DEPENDENCIES = \
jar/QtAndroidBearer-bundled.jar
ANDROID_JAR_DEPENDENCIES = \
jar/QtAndroidBearer.jar
ANDROID_LIB_DEPENDENCIES = \
plugins/bearer/libqandroidbearer.so
MODULE_PLUGIN_TYPES = \
bearer
ANDROID_PERMISSIONS += \
android.permission.ACCESS_NETWORK_STATE
qtConfig(bearermanagement) {
ANDROID_BUNDLED_JAR_DEPENDENCIES = \
jar/QtAndroidBearer-bundled.jar
ANDROID_JAR_DEPENDENCIES = \
jar/QtAndroidBearer.jar
ANDROID_LIB_DEPENDENCIES = \
plugins/bearer/libqandroidbearer.so
MODULE_PLUGIN_TYPES = \
bearer
ANDROID_PERMISSIONS += \
android.permission.ACCESS_NETWORK_STATE
}
MODULE_WINRT_CAPABILITIES = \
internetClient \

View File

@ -326,6 +326,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qdir.h>
#include <QtCore/qmutex.h>
#include <QtCore/qurl.h>
#include <QtCore/qelapsedtimer.h>
#include <QtNetwork/qhostaddress.h>
#include <QtNetwork/qhostinfo.h>
@ -2679,31 +2680,35 @@ QSharedPointer<QSslContext> QSslSocketPrivate::sslContext(QSslSocket *socket)
bool QSslSocketPrivate::isMatchingHostname(const QSslCertificate &cert, const QString &peerName)
{
const QString lowerPeerName = peerName.toLower();
const QString lowerPeerName = QString::fromLatin1(QUrl::toAce(peerName));
const QStringList commonNames = cert.subjectInfo(QSslCertificate::CommonName);
for (const QString &commonName : commonNames) {
if (isMatchingHostname(commonName.toLower(), lowerPeerName))
if (isMatchingHostname(commonName, lowerPeerName))
return true;
}
const auto subjectAlternativeNames = cert.subjectAlternativeNames();
const auto altNames = subjectAlternativeNames.equal_range(QSsl::DnsEntry);
for (auto it = altNames.first; it != altNames.second; ++it) {
if (isMatchingHostname(it->toLower(), lowerPeerName))
if (isMatchingHostname(*it, lowerPeerName))
return true;
}
return false;
}
/*! \internal
Checks if the certificate's name \a cn matches the \a hostname.
\a hostname must be normalized in ASCII-Compatible Encoding, but \a cn is not normalized
*/
bool QSslSocketPrivate::isMatchingHostname(const QString &cn, const QString &hostname)
{
int wildcard = cn.indexOf(QLatin1Char('*'));
// Check this is a wildcard cert, if not then just compare the strings
if (wildcard < 0)
return cn == hostname;
return QLatin1String(QUrl::toAce(cn)) == hostname;
int firstCnDot = cn.indexOf(QLatin1Char('.'));
int secondCnDot = cn.indexOf(QLatin1Char('.'), firstCnDot+1);
@ -2720,13 +2725,21 @@ bool QSslSocketPrivate::isMatchingHostname(const QString &cn, const QString &hos
if (cn.lastIndexOf(QLatin1Char('*')) != wildcard)
return false;
// Reject wildcard character embedded within the A-labels or U-labels of an internationalized
// domain name (RFC6125 section 7.2)
if (cn.startsWith(QLatin1String("xn--"), Qt::CaseInsensitive))
return false;
// Check characters preceding * (if any) match
if (wildcard && (hostname.leftRef(wildcard) != cn.leftRef(wildcard)))
if (wildcard && hostname.leftRef(wildcard).compare(cn.leftRef(wildcard), Qt::CaseInsensitive) != 0)
return false;
// Check characters following first . match
if (hostname.midRef(hostname.indexOf(QLatin1Char('.'))) != cn.midRef(firstCnDot))
int hnDot = hostname.indexOf(QLatin1Char('.'));
if (hostname.midRef(hnDot + 1) != cn.midRef(firstCnDot + 1)
&& hostname.midRef(hnDot + 1) != QLatin1String(QUrl::toAce(cn.mid(firstCnDot + 1)))) {
return false;
}
// Check if the hostname is an IP address, if so then wildcards are not allowed
QHostAddress addr(hostname);

View File

@ -151,7 +151,8 @@ public:
QRegExp::PatternSyntax syntax);
static void addDefaultCaCertificate(const QSslCertificate &cert);
static void addDefaultCaCertificates(const QList<QSslCertificate> &certs);
static bool isMatchingHostname(const QSslCertificate &cert, const QString &peerName);
Q_AUTOTEST_EXPORT static bool isMatchingHostname(const QSslCertificate &cert,
const QString &peerName);
Q_AUTOTEST_EXPORT static bool isMatchingHostname(const QString &cn, const QString &hostname);
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)

View File

@ -12,7 +12,7 @@ SOURCES += qgenericengine.cpp \
OTHER_FILES += generic.json
win32:!winrt:LIBS += -lIphlpapi
win32:!winrt:LIBS += -liphlpapi
PLUGIN_TYPE = bearer
PLUGIN_CLASS_NAME = QGenericEnginePlugin

View File

@ -49,6 +49,7 @@
#include <QtCore/qmath.h>
#include <QtCore/private/qjnihelpers_p.h>
#include <QtCore/private/qjni_p.h>
#include <QtGui/private/qhighdpiscaling_p.h>
#include "qdebug.h"
@ -137,7 +138,7 @@ namespace QtAndroidAccessibility
QRect rect;
QAccessibleInterface *iface = interfaceFromId(objectId);
if (iface && iface->isValid()) {
rect = iface->rect();
rect = QHighDpi::toNativePixels(iface->rect(), iface->window());
}
jclass rectClass = env->FindClass("android/graphics/Rect");
@ -150,11 +151,13 @@ namespace QtAndroidAccessibility
{
QAccessibleInterface *root = interfaceFromId(-1);
if (root) {
QAccessibleInterface *child = root->childAt((int)x, (int)y);
QPoint pos = QHighDpi::fromNativePixels(QPoint(int(x), int(y)), root->window());
QAccessibleInterface *child = root->childAt(pos.x(), pos.y());
QAccessibleInterface *lastChild = 0;
while (child && (child != lastChild)) {
lastChild = child;
child = child->childAt((int)x, (int)y);
child = child->childAt(pos.x(), pos.y());
}
if (lastChild)
return QAccessible::uniqueId(lastChild);

View File

@ -402,11 +402,6 @@ namespace QtAndroid
if (surfaceId == -1)
return;
QMutexLocker lock(&m_surfacesMutex);
const auto &it = m_surfaces.find(surfaceId);
if (it != m_surfaces.end())
m_surfaces.remove(surfaceId);
QJNIEnvironmentPrivate env;
if (!env)
return;
@ -583,14 +578,18 @@ static void setSurface(JNIEnv *env, jobject /*thiz*/, jint id, jobject jSurface,
{
QMutexLocker lock(&m_surfacesMutex);
const auto &it = m_surfaces.find(id);
if (it.value() == nullptr) // This should never happen...
return;
if (it == m_surfaces.end()) {
qWarning()<<"Can't find surface" << id;
return;
}
it.value()->surfaceChanged(env, jSurface, w, h);
auto surfaceClient = it.value();
if (!surfaceClient) // This should never happen...
return;
surfaceClient->surfaceChanged(env, jSurface, w, h);
if (!jSurface)
m_surfaces.erase(it);
}
static void setDisplayMetrics(JNIEnv */*env*/, jclass /*clazz*/,

View File

@ -286,7 +286,7 @@ QT_END_NAMESPACE
if (qEnvironmentVariableIsEmpty("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM")) {
if (QSysInfo::macVersion() >= QSysInfo::MV_10_12) {
// Move the application window to front to avoid launching behind the terminal.
// Ignoring other apps is neccessary (we must ignore the terminal), but makes
// Ignoring other apps is necessary (we must ignore the terminal), but makes
// Qt apps play slightly less nice with other apps when lanching from Finder
// (See the activateIgnoringOtherApps docs.)
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];

View File

@ -429,7 +429,7 @@ static QString strippedText(QString s)
{
// Call this functions if mFileMode, mFileOptions,
// mNameFilterDropDownList or mQDirFilter changes.
// The savepanel does not contain the neccessary functions for this.
// The savepanel does not contain the necessary functions for this.
const QFileDialogOptions::FileMode fileMode = mOptions->fileMode();
bool chooseFilesOnly = fileMode == QFileDialogOptions::ExistingFile
|| fileMode == QFileDialogOptions::ExistingFiles;

View File

@ -340,7 +340,7 @@ QCocoaIntegration::QCocoaIntegration(const QStringList &paramList)
// from the terminal. On 10.12+ this call has been moved to applicationDidFinishLauching
// to work around issues with loss of focus at startup.
if (QSysInfo::macVersion() < QSysInfo::MV_10_12) {
// Ignoring other apps is neccessary (we must ignore the terminal), but makes
// Ignoring other apps is necessary (we must ignore the terminal), but makes
// Qt apps play slightly less nice with other apps when lanching from Finder
// (See the activateIgnoringOtherApps docs.)
[cocoaApplication activateIgnoringOtherApps : YES];

View File

@ -139,10 +139,22 @@ OSStatus QMacPasteboard::promiseKeeper(PasteboardRef paste, PasteboardItemID id,
const long promise_id = (long)id;
// Find the kept promise
QList<QMacInternalPasteboardMime*> availableConverters
= QMacInternalPasteboardMime::all(QMacInternalPasteboardMime::MIME_ALL);
const QString flavorAsQString = QString::fromCFString(flavor);
QMacPasteboard::Promise promise;
for (int i = 0; i < qpaste->promises.size(); i++){
QMacPasteboard::Promise tmp = qpaste->promises[i];
if (!availableConverters.contains(tmp.convertor)) {
// promise.converter is a pointer initialized by the value found
// in QMacInternalPasteboardMime's global list of QMacInternalPasteboardMimes.
// We add pointers to this list in QMacInternalPasteboardMime's ctor;
// we remove these pointers in QMacInternalPasteboardMime's dtor.
// If tmp.converter was not found in this list, we probably have a
// dangling pointer so let's skip it.
continue;
}
if (tmp.itemId == promise_id && tmp.convertor->canConvert(tmp.mime, flavorAsQString)){
promise = tmp;
break;

View File

@ -4,6 +4,9 @@ QT += eglfsdeviceintegration-private
CONFIG += egl
# Avoid X11 header collision, use generic EGL native types
DEFINES += QT_EGL_NO_X11
SOURCES += $$PWD/qeglfsmain.cpp
OTHER_FILES += $$PWD/eglfs.json

View File

@ -116,6 +116,11 @@ static void executeBlockWithoutAnimation(Block block)
dispatch_async(dispatch_get_main_queue (), ^{ self.visible = YES; });
}
}];
[center addObserverForName:UIKeyboardDidHideNotification object:nil queue:nil
usingBlock:^(NSNotification *) {
self.visible = NO;
}];
}
return self;

View File

@ -120,6 +120,7 @@ enum WindowsEventType // Simplify event types
QueryEndSessionApplicationEvent = ApplicationEventFlag + 4,
EndSessionApplicationEvent = ApplicationEventFlag + 5,
AppCommandEvent = ApplicationEventFlag + 6,
DeviceChangeEvent = ApplicationEventFlag + 7,
InputMethodStartCompositionEvent = InputMethodEventFlag + 1,
InputMethodCompositionEvent = InputMethodEventFlag + 2,
InputMethodEndCompositionEvent = InputMethodEventFlag + 3,
@ -271,6 +272,8 @@ inline QtWindows::WindowsEventType windowsEventType(UINT message, WPARAM wParamI
#endif
case WM_GESTURE:
return QtWindows::GestureEvent;
case WM_DEVICECHANGE:
return QtWindows::DeviceChangeEvent;
case WM_DPICHANGED:
return QtWindows::DpiChangedEvent;
default:

View File

@ -79,6 +79,7 @@
#include <stdio.h>
#include <windowsx.h>
#include <comdef.h>
#include <dbt.h>
QT_BEGIN_NAMESPACE
@ -322,6 +323,13 @@ bool QWindowsContext::initTouch(unsigned integrationOptions)
QWindowSystemInterface::registerTouchDevice(touchDevice);
d->m_systemInfo |= QWindowsContext::SI_SupportsTouch;
// A touch device was plugged while the app is running. Register all windows for touch.
if (QGuiApplicationPrivate::is_app_running) {
for (QWindowsWindow *w : qAsConst(d->m_windows))
w->registerTouchWindow();
}
return true;
}
@ -965,6 +973,13 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
}
switch (et) {
case QtWindows::DeviceChangeEvent:
if (d->m_systemInfo & QWindowsContext::SI_SupportsTouch)
break;
// See if there are any touch devices added
if (wParam == DBT_DEVNODES_CHANGED)
initTouch();
break;
case QtWindows::KeyboardLayoutChangeEvent:
if (QWindowsInputContext *wic = windowsInputContext())
wic->handleInputLanguageChanged(wParam, lParam);

View File

@ -98,7 +98,11 @@ static inline QString mailCommand()
RegQueryValueEx(handle, L"", 0, 0, reinterpret_cast<unsigned char*>(command), &bufferSize);
RegCloseKey(handle);
}
if (!command[0])
// QTBUG-57816: As of Windows 10, if there is no mail client installed, an entry like
// "rundll32.exe .. url.dll,MailToProtocolHandler %l" is returned. Launching it
// silently fails or brings up a broken dialog after a long time, so exclude it and
// fall back to ShellExecute() which brings up the URL assocation dialog.
if (!command[0] || wcsstr(command, L",MailToProtocolHandler") != nullptr)
return QString();
wchar_t expandedCommand[MAX_PATH] = {0};
return ExpandEnvironmentStrings(command, expandedCommand, MAX_PATH) ?

View File

@ -2532,7 +2532,8 @@ void QWindowsWindow::setTouchWindowTouchTypeStatic(QWindow *window, QWindowsWind
void QWindowsWindow::registerTouchWindow(QWindowsWindowFunctions::TouchWindowTouchTypes touchTypes)
{
if ((QWindowsContext::instance()->systemInfo() & QWindowsContext::SI_SupportsTouch)) {
if ((QWindowsContext::instance()->systemInfo() & QWindowsContext::SI_SupportsTouch)
&& !testFlag(TouchRegistered)) {
ULONG touchFlags = 0;
const bool ret = QWindowsContext::user32dll.isTouchWindow(m_data.hwnd, &touchFlags);
// Return if it is not a touch window or the flags are already set by a hook

View File

@ -893,19 +893,17 @@ void QXcbWindow::hide()
}
}
static QWindow *tlWindow(QWindow *window)
{
if (window && window->parent())
return tlWindow(window->parent());
return window;
}
bool QXcbWindow::relayFocusToModalWindow() const
{
QWindow *w = tlWindow(static_cast<QWindowPrivate *>(QObjectPrivate::get(window()))->eventReceiver());
QWindow *modal_window = 0;
if (QGuiApplicationPrivate::instance()->isWindowBlocked(w,&modal_window) && modal_window != w) {
modal_window->requestActivate();
QWindow *w = static_cast<QWindowPrivate *>(QObjectPrivate::get(window()))->eventReceiver();
// get top-level window
while (w && w->parent())
w = w->parent();
QWindow *modalWindow = 0;
const bool blocked = QGuiApplicationPrivate::instance()->isWindowBlocked(w, &modalWindow);
if (blocked && modalWindow != w) {
modalWindow->requestActivate();
connection()->flush();
return true;
}

View File

@ -57,7 +57,7 @@
QT_BEGIN_NAMESPACE
static const char *standardButtonText(int button)
static QByteArray standardButtonText(int button)
{
return QGtk3Theme::defaultStandardButtonText(button).toUtf8();
}

View File

@ -50,7 +50,7 @@
#include <qsqlquery.h>
#include <qsocketnotifier.h>
#include <qstringlist.h>
#include <qmutex.h>
#include <qlocale.h>
#include <QtSql/private/qsqlresult_p.h>
#include <QtSql/private/qsqldriver_p.h>
@ -618,13 +618,10 @@ static QString qCreateParamString(const QVector<QVariant> &boundValues, const QS
return params;
}
Q_GLOBAL_STATIC(QMutex, qMutex)
QString qMakePreparedStmtId()
{
qMutex()->lock();
static unsigned int qPreparedStmtCount = 0;
QString id = QLatin1String("qpsqlpstmt_") + QString::number(++qPreparedStmtCount, 16);
qMutex()->unlock();
static QBasicAtomicInt qPreparedStmtCount = Q_BASIC_ATOMIC_INITIALIZER(0);
QString id = QLatin1String("qpsqlpstmt_") + QString::number(qPreparedStmtCount.fetchAndAddRelaxed(1) + 1, 16);
return id;
}
@ -1311,7 +1308,9 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const
// we force the value to be considered with a timezone information, and we force it to be UTC
// this is safe since postgresql stores only the UTC value and not the timezone offset (only used
// while parsing), so we have correct behavior in both case of with timezone and without tz
r = QLatin1String("TIMESTAMP WITH TIME ZONE ") + QLatin1Char('\'') + field.value().toDateTime().toUTC().toString(QLatin1String("yyyy-MM-ddThh:mm:ss.zzz")) + QLatin1Char('Z') + QLatin1Char('\'');
r = QLatin1String("TIMESTAMP WITH TIME ZONE ") + QLatin1Char('\'') +
QLocale::c().toString(field.value().toDateTime().toUTC(), QLatin1String("yyyy-MM-ddThh:mm:ss.zzz")) +
QLatin1Char('Z') + QLatin1Char('\'');
} else {
r = QLatin1String("NULL");
}

View File

@ -48,7 +48,7 @@
"label": "QPrinter",
"purpose": "Provides a printer backend of QPainter.",
"section": "Painting",
"condition": "!config.android && !config.uikit && !config.winrt && features.picture && features.temporaryfile && features.pdf",
"condition": "!config.uikit && !config.winrt && features.picture && features.temporaryfile && features.pdf",
"output": [ "publicFeature", "feature" ]
},
"printpreviewwidget": {
@ -66,6 +66,7 @@
"features.buttongroup",
"features.checkbox",
"features.combobox",
"features.dialog",
"features.datetimeedit",
"features.dialogbuttonbox",
"features.printer",

View File

@ -41,13 +41,14 @@
#define QABSTRACTPRINTDIALOG_H
#include <QtPrintSupport/qtprintsupportglobal.h>
#if QT_CONFIG(printdialog)
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_PRINTER
class QAbstractPrintDialogPrivate;
class QPrinter;
@ -81,7 +82,6 @@ public:
Q_DECLARE_FLAGS(PrintDialogOptions, PrintDialogOption)
Q_FLAG(PrintDialogOptions)
#ifndef QT_NO_PRINTDIALOG
explicit QAbstractPrintDialog(QPrinter *printer, QWidget *parent = Q_NULLPTR);
~QAbstractPrintDialog();
@ -114,13 +114,12 @@ protected:
private:
Q_DISABLE_COPY(QAbstractPrintDialog)
#endif // QT_NO_PRINTDIALOG
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractPrintDialog::PrintDialogOptions)
#endif // QT_NO_PRINTER
QT_END_NAMESPACE
#endif // QT_NO_PRINTDIALOG
#endif // QABSTRACTPRINTDIALOG_H

View File

@ -52,10 +52,10 @@
//
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
#include "private/qdialog_p.h"
#ifndef QT_NO_PRINTDIALOG
#include "private/qdialog_p.h"
#include "QtPrintSupport/qabstractprintdialog.h"
QT_BEGIN_NAMESPACE

View File

@ -41,13 +41,14 @@
#define QPAGESETUPDIALOG_H
#include <QtPrintSupport/qtprintsupportglobal.h>
#ifndef QT_NO_PRINTDIALOG
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_PRINTDIALOG
class QPrinter;
class QPageSetupDialogPrivate;
@ -74,8 +75,8 @@ public:
QPrinter *printer();
};
#endif // QT_NO_PRINTDIALOG
QT_END_NAMESPACE
#endif // QT_NO_PRINTDIALOG
#endif // QPAGESETUPDIALOG_H

View File

@ -53,10 +53,11 @@
//
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
#include "private/qdialog_p.h"
#ifndef QT_NO_PRINTDIALOG
#include "private/qdialog_p.h"
#include "qbytearray.h"
#include "qpagesetupdialog.h"
#include "qpointer.h"

View File

@ -41,13 +41,14 @@
#define QPRINTDIALOG_H
#include <QtPrintSupport/qtprintsupportglobal.h>
#ifndef QT_NO_PRINTDIALOG
#include <QtPrintSupport/qabstractprintdialog.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_PRINTDIALOG
class QPrintDialogPrivate;
class QPushButton;
class QPrinter;
@ -101,8 +102,8 @@ private:
# endif // Q_OS_UNIX
};
#endif // QT_NO_PRINTDIALOG
QT_END_NAMESPACE
#endif // QT_NO_PRINTDIALOG
#endif // QPRINTDIALOG_H

View File

@ -40,7 +40,6 @@
#include "qprintpreviewdialog.h"
#include "qprintpreviewwidget.h"
#include <private/qprinter_p.h>
#include "private/qdialog_p.h"
#include "qprintdialog.h"
#include <QtWidgets/qaction.h>
@ -59,6 +58,8 @@
#ifndef QT_NO_PRINTPREVIEWDIALOG
#include "private/qdialog_p.h"
#include <QtWidgets/qformlayout.h>
#include <QtWidgets/qlabel.h>

View File

@ -41,10 +41,11 @@
#define QPRINTPREVIEWDIALOG_H
#include <QtPrintSupport/qtprintsupportglobal.h>
#include <QtWidgets/qdialog.h>
#ifndef QT_NO_PRINTPREVIEWDIALOG
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE

View File

@ -117,7 +117,7 @@
"-lsqlite3"
],
"use": [
{ "lib": "zlib", "condition": "!config.win32" }
{ "lib": "zlib", "condition": "!config.win32 && features.system-zlib" }
]
}
},

View File

@ -100,6 +100,9 @@ src_3rdparty_libpng.target = sub-3rdparty-libpng
src_3rdparty_freetype.subdir = $$PWD/3rdparty/freetype
src_3rdparty_freetype.target = sub-3rdparty-freetype
src_3rdparty_gradle.subdir = $$PWD/3rdparty/gradle
src_3rdparty_gradle.target = sub-3rdparty-gradle
src_angle.subdir = $$PWD/angle
src_angle.target = sub-angle
@ -212,7 +215,7 @@ SUBDIRS += src_plugins
nacl: SUBDIRS -= src_network src_testlib
android: SUBDIRS += src_android
android: SUBDIRS += src_android src_3rdparty_gradle
TR_EXCLUDE = \
src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic src_tools_qlalr \

View File

@ -82,7 +82,9 @@ QT_BEGIN_NAMESPACE
msvc-2010
Keys are lower-case. Distribution name and version are supported if
QSysInfo's productType() and productVersion() return them.
QSysInfo's productType() and productVersion() return them. Keys can be
added via the space-separated QTEST_ENVIRONMENT environment variable.
The other known keys are listed below:
*/
@ -184,6 +186,11 @@ static QSet<QByteArray> activeConditions()
}
}
if (qEnvironmentVariableIsSet("QTEST_ENVIRONMENT")) {
for (const QByteArray &k : qgetenv("QTEST_ENVIRONMENT").split(' '))
result.insert(k);
}
return result;
}

View File

@ -2327,7 +2327,7 @@ void QTest::qSleep(int ms)
#elif defined(Q_OS_WIN)
Sleep(uint(ms));
#else
struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 };
struct timespec ts = { time_t(ms / 1000), (ms % 1000) * 1000 * 1000 };
nanosleep(&ts, NULL);
#endif
}

View File

@ -114,14 +114,14 @@ namespace QTest
#endif
#ifdef QT_WIDGETS_LIB
inline static bool qWaitForWindowActive(QWidget *widget, int timeout = 1000)
inline static bool qWaitForWindowActive(QWidget *widget, int timeout = 5000)
{
if (QWindow *window = widget->window()->windowHandle())
return qWaitForWindowActive(window, timeout);
return false;
}
inline static bool qWaitForWindowExposed(QWidget *widget, int timeout = 1000)
inline static bool qWaitForWindowExposed(QWidget *widget, int timeout = 5000)
{
if (QWindow *window = widget->window()->windowHandle())
return qWaitForWindowExposed(window, timeout);
@ -131,7 +131,7 @@ namespace QTest
#if QT_DEPRECATED_SINCE(5, 0)
# ifdef QT_WIDGETS_LIB
QT_DEPRECATED inline static bool qWaitForWindowShown(QWidget *widget, int timeout = 1000)
QT_DEPRECATED inline static bool qWaitForWindowShown(QWidget *widget, int timeout = 5000)
{
return qWaitForWindowExposed(widget, timeout);
}

View File

@ -36,6 +36,29 @@
#include <QtCore/qfile.h>
#include <QtCore/qmap.h>
namespace {
void generateSeparator(int i, QTextStream &out)
{
if (!(i % 10)) {
if (i)
out << ",";
out << endl << " ";
} else {
out << ", ";
}
}
void generateList(const QVector<int> &list, QTextStream &out)
{
for (int i = 0; i < list.size(); ++i) {
generateSeparator(i, out);
out << list[i];
}
}
}
QString CppGenerator::copyrightHeader() const
{
@ -47,7 +70,7 @@ QString CppGenerator::copyrightHeader() const
"**\n"
"** This file is part of the Qt Toolkit.\n"
"**\n"
"** $QT_BEGIN_LICENSE:LGPL$\n"
"** $QT_BEGIN_LICENSE:GPL-EXCEPT$\n"
"** Commercial License Usage\n"
"** Licensees holding valid commercial Qt licenses may use this file in\n"
"** accordance with the commercial license agreement provided with the\n"
@ -56,24 +79,13 @@ QString CppGenerator::copyrightHeader() const
"** and conditions see https://www.qt.io/terms-conditions. For further\n"
"** information use the contact form at https://www.qt.io/contact-us.\n"
"**\n"
"** GNU Lesser General Public License Usage\n"
"** Alternatively, this file may be used under the terms of the GNU Lesser\n"
"** General Public License version 3 as published by the Free Software\n"
"** Foundation and appearing in the file LICENSE.LGPL3 included in the\n"
"** packaging of this file. Please review the following information to\n"
"** ensure the GNU Lesser General Public License version 3 requirements\n"
"** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.\n"
"**\n"
"** GNU General Public License Usage\n"
"** Alternatively, this file may be used under the terms of the GNU\n"
"** General Public License version 2.0 or (at your option) the GNU General\n"
"** Public license version 3 or any later version approved by the KDE Free\n"
"** Qt Foundation. The licenses are as published by the Free Software\n"
"** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3\n"
"** General Public License version 3 as published by the Free Software\n"
"** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT\n"
"** included in the packaging of this file. Please review the following\n"
"** information to ensure the GNU General Public License requirements will\n"
"** be met: https://www.gnu.org/licenses/gpl-2.0.html and\n"
"** https://www.gnu.org/licenses/gpl-3.0.html.\n"
"** be met: https://www.gnu.org/licenses/gpl-3.0.html.\n"
"**\n"
"** $QT_END_LICENSE$\n"
"**\n"
@ -446,7 +458,7 @@ void CppGenerator::generateDecl (QTextStream &out)
out << "class " << grammar.table_name << endl
<< "{" << endl
<< "public:" << endl
<< " enum VariousConstants {" << endl;
<< " enum VariousConstants {" << endl;
for (Name t : qAsConst(grammar.terminals))
{
@ -462,59 +474,59 @@ void CppGenerator::generateDecl (QTextStream &out)
else
name.prepend (grammar.token_prefix);
out << " " << name << " = " << value << "," << endl;
out << " " << name << " = " << value << "," << endl;
}
out << endl
<< " ACCEPT_STATE = " << accept_state << "," << endl
<< " RULE_COUNT = " << grammar.rules.size () << "," << endl
<< " STATE_COUNT = " << state_count << "," << endl
<< " TERMINAL_COUNT = " << terminal_count << "," << endl
<< " NON_TERMINAL_COUNT = " << non_terminal_count << "," << endl
<< " ACCEPT_STATE = " << accept_state << "," << endl
<< " RULE_COUNT = " << grammar.rules.size () << "," << endl
<< " STATE_COUNT = " << state_count << "," << endl
<< " TERMINAL_COUNT = " << terminal_count << "," << endl
<< " NON_TERMINAL_COUNT = " << non_terminal_count << "," << endl
<< endl
<< " GOTO_INDEX_OFFSET = " << compressed_action.index.size () << "," << endl
<< " GOTO_INFO_OFFSET = " << compressed_action.info.size () << "," << endl
<< " GOTO_CHECK_OFFSET = " << compressed_action.check.size () << endl
<< " };" << endl
<< " GOTO_INDEX_OFFSET = " << compressed_action.index.size () << "," << endl
<< " GOTO_INFO_OFFSET = " << compressed_action.info.size () << "," << endl
<< " GOTO_CHECK_OFFSET = " << compressed_action.check.size () << endl
<< " };" << endl
<< endl
<< " static const char *const spell [];" << endl
<< " static const short lhs [];" << endl
<< " static const short rhs [];" << endl;
<< " static const char *const spell[];" << endl
<< " static const short lhs[];" << endl
<< " static const short rhs[];" << endl;
if (debug_info)
{
QString prot = debugInfoProt();
out << endl << "#ifndef " << prot << endl
<< " static const int rule_index [];" << endl
<< " static const int rule_info [];" << endl
<< " static const int rule_index[];" << endl
<< " static const int rule_info[];" << endl
<< "#endif // " << prot << endl << endl;
}
out << " static const short goto_default [];" << endl
<< " static const short action_default [];" << endl
<< " static const short action_index [];" << endl
<< " static const short action_info [];" << endl
<< " static const short action_check [];" << endl
out << " static const short goto_default[];" << endl
<< " static const short action_default[];" << endl
<< " static const short action_index[];" << endl
<< " static const short action_info[];" << endl
<< " static const short action_check[];" << endl
<< endl
<< " static inline int nt_action (int state, int nt)" << endl
<< " {" << endl
<< " const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;" << endl
<< " if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)" << endl
<< " return goto_default [nt];" << endl
<< " static inline int nt_action (int state, int nt)" << endl
<< " {" << endl
<< " const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;" << endl
<< " if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)" << endl
<< " return goto_default [nt];" << endl
<< endl
<< " return action_info [GOTO_INFO_OFFSET + yyn];" << endl
<< " }" << endl
<< " return action_info [GOTO_INFO_OFFSET + yyn];" << endl
<< " }" << endl
<< endl
<< " static inline int t_action (int state, int token)" << endl
<< " {" << endl
<< " const int yyn = action_index [state] + token;" << endl
<< " static inline int t_action (int state, int token)" << endl
<< " {" << endl
<< " const int yyn = action_index [state] + token;" << endl
<< endl
<< " if (yyn < 0 || action_check [yyn] != token)" << endl
<< " return - action_default [state];" << endl
<< " if (yyn < 0 || action_check [yyn] != token)" << endl
<< " return - action_default [state];" << endl
<< endl
<< " return action_info [yyn];" << endl
<< " }" << endl
<< " return action_info [yyn];" << endl
<< " }" << endl
<< "};" << endl
<< endl
<< endl;
@ -539,11 +551,7 @@ void CppGenerator::generateImpl (QTextStream &out)
name_ids.insert (t, idx);
if (idx)
out << ", ";
if (! (idx % 10))
out << endl << " ";
generateSeparator(idx, out);
if (terminal)
{
@ -569,35 +577,27 @@ void CppGenerator::generateImpl (QTextStream &out)
if (debug_info)
out << endl << "#endif // " << debugInfoProt() << endl;
out << "};" << endl << endl;
out << endl << "};" << endl << endl;
out << "const short " << grammar.table_name << "::lhs [] = {";
idx = 0;
for (RulePointer rule = grammar.rules.begin (); rule != grammar.rules.end (); ++rule, ++idx)
{
if (idx)
out << ", ";
if (! (idx % 10))
out << endl << " ";
generateSeparator(idx, out);
out << aut.id (rule->lhs);
}
out << "};" << endl << endl;
out << endl << "};" << endl << endl;
out << "const short " << grammar.table_name << "::rhs [] = {";
idx = 0;
for (RulePointer rule = grammar.rules.begin (); rule != grammar.rules.end (); ++rule, ++idx)
{
if (idx)
out << ", ";
if (! (idx % 10))
out << endl << " ";
generateSeparator(idx, out);
out << rule->rhs.size ();
}
out << "};" << endl << endl;
out << endl << "};" << endl << endl;
if (debug_info)
{
@ -608,35 +608,26 @@ void CppGenerator::generateImpl (QTextStream &out)
idx = 0;
for (auto rule = grammar.rules.cbegin (); rule != grammar.rules.cend (); ++rule, ++idx)
{
out << endl << " ";
if (idx)
out << ", ";
else
out << " ";
generateSeparator(idx, out);
out << name_ids.value(rule->lhs);
for (const Name &n : rule->rhs)
out << ", " << name_ids.value (n);
}
out << "};" << endl << endl;
out << endl << "};" << endl << endl;
out << "const int " << grammar.table_name << "::rule_index [] = {";
idx = 0;
int offset = 0;
for (RulePointer rule = grammar.rules.begin (); rule != grammar.rules.end (); ++rule, ++idx)
{
if (idx)
out << ", ";
if (! (idx % 10))
out << endl << " ";
generateSeparator(idx, out);
out << offset;
offset += rule->rhs.size () + 1;
}
out << "};" << endl
out << endl << "};" << endl
<< "#endif // " << prot << endl << endl;
}
@ -644,92 +635,34 @@ void CppGenerator::generateImpl (QTextStream &out)
idx = 0;
for (StatePointer state = aut.states.begin (); state != aut.states.end (); ++state, ++idx)
{
if (state != aut.states.begin ())
out << ", ";
if (! (idx % 10))
out << endl << " ";
generateSeparator(idx, out);
if (state->defaultReduce != grammar.rules.end ())
out << aut.id (state->defaultReduce);
else
out << "0";
}
out << "};" << endl << endl;
out << endl << "};" << endl << endl;
out << "const short " << grammar.table_name << "::goto_default [] = {";
for (int i = 0; i < defgoto.size (); ++i)
{
if (i)
out << ", ";
if (! (i % 10))
out << endl << " ";
out << defgoto [i];
}
out << "};" << endl << endl;
generateList(defgoto, out);
out << endl << "};" << endl << endl;
out << "const short " << grammar.table_name << "::action_index [] = {";
for (int i = 0; i < compressed_action.index.size (); ++i)
{
if (! (i % 10))
out << endl << " ";
out << compressed_action.index [i] << ", ";
}
out << endl;
for (int i = 0; i < compressed_goto.index.size (); ++i)
{
if (i)
out << ", ";
if (! (i % 10))
out << endl << " ";
out << compressed_goto.index [i];
}
out << "};" << endl << endl;
generateList(compressed_action.index, out);
out << "," << endl;
generateList(compressed_goto.index, out);
out << endl << "};" << endl << endl;
out << "const short " << grammar.table_name << "::action_info [] = {";
for (int i = 0; i < compressed_action.info.size (); ++i)
{
if (! (i % 10))
out << endl << " ";
out << compressed_action.info [i] << ", ";
}
out << endl;
for (int i = 0; i < compressed_goto.info.size (); ++i)
{
if (i)
out << ", ";
if (! (i % 10))
out << endl << " ";
out << compressed_goto.info [i];
}
out << "};" << endl << endl;
generateList(compressed_action.info, out);
out << "," << endl;
generateList(compressed_goto.info, out);
out << endl << "};" << endl << endl;
out << "const short " << grammar.table_name << "::action_check [] = {";
for (int i = 0; i < compressed_action.check.size (); ++i)
{
if (! (i % 10))
out << endl << " ";
out << compressed_action.check [i] << ", ";
}
out << endl;
for (int i = 0; i < compressed_goto.check.size (); ++i)
{
if (i)
out << ", ";
if (! (i % 10))
out << endl << " ";
out << compressed_goto.check [i];
}
out << "};" << endl << endl;
generateList(compressed_action.check, out);
out << "," << endl;
generateList(compressed_goto.check, out);
out << endl << "};" << endl << endl;
}

View File

@ -32,83 +32,89 @@
QT_BEGIN_NAMESPACE
const char *const grammar::spell [] = {
"end of file", "identifier", "string literal", "%decl", "%expect", "%expect-lr", "%impl", "%left", "%merged_output", "%nonassoc",
"%parser", "%prec", "%right", "%start", "%token", "%token_prefix", ":", "|", ";", 0,
0, 0};
"end of file", "identifier", "string literal", "%decl", "%expect", "%expect-lr", "%impl", "%left", "%merged_output", "%nonassoc",
"%parser", "%prec", "%right", "%start", "%token", "%token_prefix", ":", "|", ";", 0,
0, 0
};
const short grammar::lhs [] = {
22, 23, 23, 29, 25, 28, 28, 28, 28, 28,
28, 28, 24, 24, 31, 32, 32, 33, 33, 34,
34, 34, 31, 35, 35, 36, 37, 37, 38, 38,
30, 30, 26, 26, 40, 39, 41, 41, 44, 43,
43, 42, 42, 27, 45};
22, 23, 23, 29, 25, 28, 28, 28, 28, 28,
28, 28, 24, 24, 31, 32, 32, 33, 33, 34,
34, 34, 31, 35, 35, 36, 37, 37, 38, 38,
30, 30, 26, 26, 40, 39, 41, 41, 44, 43,
43, 42, 42, 27, 45
};
const short grammar::rhs [] = {
4, 1, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 1, 2, 2, 1, 2, 2, 2, 1,
1, 1, 2, 1, 2, 1, 1, 1, 1, 2,
0, 1, 1, 2, 2, 4, 3, 6, 0, 0,
2, 1, 2, 0, 2};
4, 1, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 1, 2, 2, 1, 2, 2, 2, 1,
1, 1, 2, 1, 2, 1, 1, 1, 1, 2,
0, 1, 1, 2, 2, 4, 3, 6, 0, 0,
2, 1, 2, 0, 2
};
const short grammar::action_default [] = {
44, 2, 44, 0, 0, 0, 0, 13, 0, 0,
3, 0, 0, 0, 8, 10, 11, 9, 7, 6,
12, 20, 22, 0, 21, 0, 44, 31, 0, 14,
26, 24, 23, 25, 4, 33, 1, 0, 34, 44,
35, 42, 39, 40, 0, 31, 44, 40, 43, 0,
31, 41, 29, 27, 28, 32, 38, 30, 36, 31,
37, 5, 44, 16, 15, 18, 19, 17, 45};
44, 2, 44, 0, 0, 0, 0, 13, 0, 0,
3, 0, 0, 0, 8, 10, 11, 9, 7, 6,
12, 20, 22, 0, 21, 0, 44, 31, 0, 14,
26, 24, 23, 25, 4, 33, 1, 0, 34, 44,
35, 42, 39, 40, 0, 31, 44, 40, 43, 0,
31, 41, 29, 27, 28, 32, 38, 30, 36, 31,
37, 5, 44, 16, 15, 18, 19, 17, 45
};
const short grammar::goto_default [] = {
3, 2, 13, 26, 36, 41, 10, 27, 61, 29,
64, 63, 23, 32, 31, 52, 55, 38, 39, 42,
43, 59, 44, 0};
3, 2, 13, 26, 36, 41, 10, 27, 61, 29,
64, 63, 23, 32, 31, 52, 55, 38, 39, 42,
43, 59, 44, 0
};
const short grammar::action_index [] = {
-22, -22, 54, 1, 5, 15, 20, -22, -1, 6,
-22, 3, 2, 35, -22, -22, -22, -22, -22, -22,
-22, -22, -22, 10, -22, 7, -22, 14, 9, -22,
-22, -22, 8, -22, -22, -22, 11, -2, -22, -22,
-22, -22, -3, 16, 13, 14, -22, 17, -22, 4,
14, -22, -22, -22, -22, 14, -22, -22, -22, 14,
-22, -22, 0, -22, 12, -22, -22, -22, -22,
-22, -22, 30, 1, 2, 3, 4, -22, 5, 6,
-22, 8, -1, 35, -22, -22, -22, -22, -22, -22,
-22, -22, -22, 13, -22, 7, -22, -2, 20, -22,
-22, -22, 11, -22, -22, -22, 15, -6, -22, -22,
-22, -22, -3, 19, -4, 12, -22, 18, -22, 10,
-2, -22, -22, -22, -22, -2, -22, -22, -22, -2,
-22, -22, 0, -22, 20, -22, -22, -22, -22,
2, -24, -2, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -4, -24, -24, -24,
-24, -24, -14, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, 0, -16, -15, -24, -24,
15, -24, -24, -24, -24, -10, -24, -24, -24, 1,
-24, -24, -3, -24, -1, -24, -24, -24, -24};
0, -24, 3, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, -24, -2, -24, -24, -24,
-24, -24, -7, -24, -24, -24, -24, -24, -24, -24,
-24, -24, -24, -24, -24, 17, -19, -11, -24, -24,
1, -24, -24, -24, -24, -15, -24, -24, -24, -6,
-24, -24, -1, -24, -5, -24, -24, -24, -24
};
const short grammar::action_info [] = {
17, 68, 66, 20, 19, 51, 14, 18, 34, 30,
62, 30, 37, 62, 40, 45, 15, 48, 48, 0,
0, 16, 0, 0, 0, 0, 0, 49, 49, 0,
46, 0, 0, 53, 54, 0, 0, 0, 0, 0,
0, 0, 21, 0, 22, 0, 0, 24, 25, 28,
0, 0, 0, 0, 0, 0, 0, 4, 5, 6,
8, 0, 9, 0, 11, 0, 0, 0, 0, 12,
0, 0, 0, 0, 0, 0,
20, 68, 66, 14, 15, 16, 17, 18, 34, 19,
40, 51, 30, 46, 30, 45, 37, 53, 54, 48,
48, 62, 0, 0, 0, 0, 0, 0, 0, 49,
49, 53, 54, 4, 5, 6, 8, 0, 9, 0,
11, 0, 21, 0, 22, 12, 0, 24, 25, 28,
0, 0, 0, 0, 0, 0, 0,
33, 35, 65, 7, 47, 57, 50, 1, 58, 60,
67, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 56, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0};
57, 47, 60, 35, 65, 1, 67, 33, 7, 56,
50, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 58, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0
};
const short grammar::action_check [] = {
1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 16, 18, 1, 1, 1, -1,
-1, 1, -1, -1, -1, -1, -1, 11, 11, -1,
17, -1, -1, 19, 20, -1, -1, -1, -1, -1,
-1, -1, 7, -1, 9, -1, -1, 12, 13, 14,
-1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
6, -1, 8, -1, 10, -1, -1, -1, -1, 15,
-1, -1, -1, -1, -1, -1,
1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
16, 1, 1, 17, 1, 18, 1, 19, 20, 1,
1, 1, -1, -1, -1, -1, -1, -1, -1, 11,
11, 19, 20, 3, 4, 5, 6, -1, 8, -1,
10, -1, 7, -1, 9, 15, -1, 12, 13, 14,
-1, -1, -1, -1, -1, -1, -1,
14, 5, 5, 5, 20, 15, 21, 5, 8, 8,
11, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 8, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1};
15, 20, 8, 5, 5, 5, 11, 14, 5, 8,
21, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 8, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1
};
QT_END_NAMESPACE

View File

@ -48,68 +48,68 @@ QT_BEGIN_NAMESPACE
class grammar
{
public:
enum VariousConstants {
EOF_SYMBOL = 0,
COLON = 16,
DECL = 19,
DECL_FILE = 3,
ERROR = 21,
EXPECT = 4,
EXPECT_RR = 5,
ID = 1,
IMPL = 20,
IMPL_FILE = 6,
LEFT = 7,
MERGED_OUTPUT = 8,
NONASSOC = 9,
OR = 17,
PARSER = 10,
PREC = 11,
RIGHT = 12,
SEMICOLON = 18,
START = 13,
STRING_LITERAL = 2,
TOKEN = 14,
TOKEN_PREFIX = 15,
enum VariousConstants {
EOF_SYMBOL = 0,
COLON = 16,
DECL = 19,
DECL_FILE = 3,
ERROR = 21,
EXPECT = 4,
EXPECT_RR = 5,
ID = 1,
IMPL = 20,
IMPL_FILE = 6,
LEFT = 7,
MERGED_OUTPUT = 8,
NONASSOC = 9,
OR = 17,
PARSER = 10,
PREC = 11,
RIGHT = 12,
SEMICOLON = 18,
START = 13,
STRING_LITERAL = 2,
TOKEN = 14,
TOKEN_PREFIX = 15,
ACCEPT_STATE = 68,
RULE_COUNT = 45,
STATE_COUNT = 69,
TERMINAL_COUNT = 22,
NON_TERMINAL_COUNT = 24,
ACCEPT_STATE = 68,
RULE_COUNT = 45,
STATE_COUNT = 69,
TERMINAL_COUNT = 22,
NON_TERMINAL_COUNT = 24,
GOTO_INDEX_OFFSET = 69,
GOTO_INFO_OFFSET = 76,
GOTO_CHECK_OFFSET = 76
};
GOTO_INDEX_OFFSET = 69,
GOTO_INFO_OFFSET = 57,
GOTO_CHECK_OFFSET = 57
};
static const char *const spell [];
static const short lhs [];
static const short rhs [];
static const short goto_default [];
static const short action_default [];
static const short action_index [];
static const short action_info [];
static const short action_check [];
static const char *const spell[];
static const short lhs[];
static const short rhs[];
static const short goto_default[];
static const short action_default[];
static const short action_index[];
static const short action_info[];
static const short action_check[];
static inline int nt_action (int state, int nt)
{
const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;
if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)
return goto_default [nt];
static inline int nt_action (int state, int nt)
{
const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;
if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)
return goto_default [nt];
return action_info [GOTO_INFO_OFFSET + yyn];
}
return action_info [GOTO_INFO_OFFSET + yyn];
}
static inline int t_action (int state, int token)
{
const int yyn = action_index [state] + token;
static inline int t_action (int state, int token)
{
const int yyn = action_index [state] + token;
if (yyn < 0 || action_check [yyn] != token)
return - action_default [state];
if (yyn < 0 || action_check [yyn] != token)
return - action_default [state];
return action_info [yyn];
}
return action_info [yyn];
}
};

View File

@ -61,8 +61,7 @@
%start Specification
/:
/****************************************************************************
/:/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
@ -163,8 +162,7 @@ protected:
};
:/
/.
/****************************************************************************
/./****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
@ -194,6 +192,8 @@ protected:
#include "recognizer.h"
#include <QtCore/qdir.h>
#include <cstdlib>
#include <cstring>
#include <cctype>
@ -344,7 +344,8 @@ int Recognizer::nextToken()
text.clear ();
if (! _M_no_lines)
text += QLatin1String ("\n#line ") + QString::number (_M_action_line) + " \"" + _M_input_file + "\"\n";
text += QLatin1String("\n#line ") + QString::number(_M_action_line) +
QLatin1String(" \"") + QDir::fromNativeSeparators(_M_input_file) + QLatin1String("\"\n");
inp (); // skip ':'
forever
@ -381,7 +382,8 @@ int Recognizer::nextToken()
text.clear ();
if (! _M_no_lines)
text += QLatin1String ("\n#line ") + QString::number (_M_action_line) + " \"" + _M_input_file + "\"\n";
text += QLatin1String("\n#line ") + QString::number(_M_action_line) +
QLatin1String(" \"") + QDir::fromNativeSeparators(_M_input_file) + QLatin1String("\"\n");
inp (); // skip ':'

View File

@ -28,6 +28,8 @@
#include "recognizer.h"
#include <QtCore/qdir.h>
#include <cstdlib>
#include <cstring>
#include <cctype>
@ -178,8 +180,8 @@ int Recognizer::nextToken()
text.clear ();
if (! _M_no_lines)
text += QLatin1String("\n#line ") + QString::number (_M_action_line)
+ QLatin1String(" \"") + _M_input_file + QLatin1String("\"\n");
text += QLatin1String("\n#line ") + QString::number(_M_action_line) +
QLatin1String(" \"") + QDir::fromNativeSeparators(_M_input_file) + QLatin1String("\"\n");
inp (); // skip ':'
forever
@ -216,8 +218,8 @@ int Recognizer::nextToken()
text.clear ();
if (! _M_no_lines)
text += QLatin1String ("\n#line ") + QString::number (_M_action_line) +
QLatin1String(" \"") + _M_input_file + QLatin1String("\"\n");
text += QLatin1String("\n#line ") + QString::number(_M_action_line) +
QLatin1String(" \"") + QDir::fromNativeSeparators(_M_input_file) + QLatin1String("\"\n");
inp (); // skip ':'

View File

@ -163,10 +163,17 @@
"condition": "features.rubberband",
"output": [ "publicFeature", "feature" ]
},
"widgettextcontrol": {
"label": "QWidgetTextControl",
"purpose": "Provides text control functionality to other widgets.",
"section": "Widgets",
"output": [ "privateFeature" ]
},
"label": {
"label": "QLabel",
"purpose": "Provides a text or image display.",
"section": "Widgets",
"condition": "features.widgettextcontrol",
"output": [ "publicFeature" ]
},
"formlayout": {
@ -193,6 +200,7 @@
"label": "QLineEdit",
"purpose": "Provides single-line edits.",
"section": "Widgets",
"condition": "features.widgettextcontrol",
"output": [ "publicFeature", "feature" ]
},
"radiobutton": {
@ -382,7 +390,7 @@
"label": "QGraphicsView",
"purpose": "Provides a canvas/sprite framework.",
"section": "Widgets",
"condition": "features.scrollarea",
"condition": "features.scrollarea && features.widgettextcontrol",
"output": [ "publicFeature", "feature" ]
},
"graphicseffect": {
@ -396,7 +404,7 @@
"label": "QTextEdit",
"purpose": "Supports rich text editing.",
"section": "Widgets",
"condition": "features.scrollarea && features.properties",
"condition": "features.scrollarea && features.properties && features.widgettextcontrol",
"output": [ "publicFeature", "feature" ]
},
"syntaxhighlighter": {
@ -460,11 +468,17 @@
"condition": "features.lineedit && features.shortcut",
"output": [ "publicFeature", "feature" ]
},
"dialog" : {
"label": "QDialog",
"purpose": "Base class of dialog windows.",
"section": "Dialogs",
"output": [ "publicFeature" ]
},
"dialogbuttonbox": {
"label": "QDialogButtonBox",
"purpose": "Presents buttons in a layout that is appropriate for the current widget style.",
"section": "Dialogs",
"condition": "features.pushbutton",
"condition": "features.dialog && features.pushbutton",
"output": [ "publicFeature" ]
},
"messagebox": {
@ -473,6 +487,7 @@
"section": "Dialogs",
"condition" : [
"features.checkbox",
"features.dialog",
"features.dialogbuttonbox",
"features.label",
"features.pushbutton"
@ -484,6 +499,7 @@
"purpose": "Provides a dialog widget for specifying colors.",
"section": "Dialogs",
"condition": [
"features.dialog",
"features.dialogbuttonbox",
"features.label",
"features.pushbutton",
@ -498,6 +514,7 @@
"condition": [
"features.buttongroup",
"features.combobox",
"features.dialog",
"features.dialogbuttonbox",
"features.dirmodel",
"features.label",
@ -516,6 +533,7 @@
"condition": [
"features.checkbox",
"features.combobox",
"features.dialog",
"features.dialogbuttonbox",
"features.groupbox",
"features.label",
@ -530,6 +548,7 @@
"purpose": "Provides feedback on the progress of a slow operation.",
"section": "Dialogs",
"condition": [
"features.dialog",
"features.label",
"features.pushbutton",
"features.progressbar"
@ -542,6 +561,7 @@
"section": "Dialogs",
"condition": [
"features.combobox",
"features.dialog",
"features.dialogbuttonbox",
"features.label",
"features.pushbutton",
@ -557,6 +577,7 @@
"section": "Dialogs",
"condition": [
"features.checkbox",
"features.dialog",
"features.textedit",
"features.label",
"features.pushbutton",
@ -569,6 +590,7 @@
"purpose": "Provides a framework for multi-page click-through dialogs.",
"section": "Dialogs",
"condition": [
"features.dialog",
"features.pushbutton",
"features.properties",
"features.label"

View File

@ -3,8 +3,6 @@
HEADERS += \
dialogs/qcolordialog.h \
dialogs/qfscompleter_p.h \
dialogs/qdialog.h \
dialogs/qdialog_p.h \
dialogs/qerrormessage.h \
dialogs/qfiledialog.h \
dialogs/qfiledialog_p.h \
@ -30,7 +28,6 @@ else: FORMS += dialogs/qfiledialog.ui
INCLUDEPATH += $$PWD
SOURCES += \
dialogs/qcolordialog.cpp \
dialogs/qdialog.cpp \
dialogs/qerrormessage.cpp \
dialogs/qfiledialog.cpp \
dialogs/qfontdialog.cpp \
@ -42,4 +39,13 @@ SOURCES += \
dialogs/qfileinfogatherer.cpp \
dialogs/qwizard.cpp \
qtConfig(dialog) {
HEADERS += \
dialogs/qdialog.h \
dialogs/qdialog_p.h
SOURCES += \
dialogs/qdialog.cpp
}
RESOURCES += dialogs/qmessagebox.qrc

View File

@ -41,13 +41,14 @@
#define QCOLORDIALOG_H
#include <QtWidgets/qtwidgetsglobal.h>
#ifndef QT_NO_COLORDIALOG
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_COLORDIALOG
class QColorDialogPrivate;
class Q_WIDGETS_EXPORT QColorDialog : public QDialog
@ -124,8 +125,8 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QColorDialog::ColorDialogOptions)
#endif // QT_NO_COLORDIALOG
QT_END_NAMESPACE
#endif // QT_NO_COLORDIALOG
#endif // QCOLORDIALOG_H

View File

@ -43,6 +43,8 @@
#include <QtWidgets/qtwidgetsglobal.h>
#include <QtWidgets/qwidget.h>
QT_REQUIRE_CONFIG(dialog);
QT_BEGIN_NAMESPACE

View File

@ -61,6 +61,8 @@
#endif
#include <qpa/qplatformdialoghelper.h>
QT_REQUIRE_CONFIG(dialog);
QT_BEGIN_NAMESPACE
class QSizeGrip;

View File

@ -41,13 +41,14 @@
#define QERRORMESSAGE_H
#include <QtWidgets/qtwidgetsglobal.h>
#ifndef QT_NO_ERRORMESSAGE
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ERRORMESSAGE
class QErrorMessagePrivate;
class Q_WIDGETS_EXPORT QErrorMessage: public QDialog
@ -72,8 +73,8 @@ private:
Q_DISABLE_COPY(QErrorMessage)
};
#endif // QT_NO_ERRORMESSAGE
QT_END_NAMESPACE
#endif // QT_NO_ERRORMESSAGE
#endif // QERRORMESSAGE_H

View File

@ -44,13 +44,14 @@
#include <QtCore/qdir.h>
#include <QtCore/qstring.h>
#include <QtCore/qurl.h>
#ifndef QT_NO_FILEDIALOG
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_FILEDIALOG
class QModelIndex;
class QItemSelection;
struct QFileDialogArgs;
@ -313,8 +314,8 @@ inline void QFileDialog::setDirectory(const QDir &adirectory)
Q_DECLARE_OPERATORS_FOR_FLAGS(QFileDialog::Options)
#endif // QT_NO_FILEDIALOG
QT_END_NAMESPACE
#endif // QT_NO_FILEDIALOG
#endif // QFILEDIALOG_H

View File

@ -42,14 +42,15 @@
#include <QtWidgets/qtwidgetsglobal.h>
#include <QtGui/qwindowdefs.h>
#include <QtWidgets/qdialog.h>
#include <QtGui/qfont.h>
#ifndef QT_NO_FONTDIALOG
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_FONTDIALOG
class QFontDialogPrivate;
class Q_WIDGETS_EXPORT QFontDialog : public QDialog
@ -117,8 +118,8 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QFontDialog::FontDialogOptions)
#endif // QT_NO_FONTDIALOG
QT_END_NAMESPACE
#endif // QT_NO_FONTDIALOG
#endif // QFONTDIALOG_H

View File

@ -41,15 +41,16 @@
#define QINPUTDIALOG_H
#include <QtWidgets/qtwidgetsglobal.h>
#include <QtWidgets/qdialog.h>
#include <QtCore/qstring.h>
#include <QtWidgets/qlineedit.h>
#ifndef QT_NO_INPUTDIALOG
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_INPUTDIALOG
class QInputDialogPrivate;
class Q_WIDGETS_EXPORT QInputDialog : public QDialog
@ -209,8 +210,8 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QInputDialog::InputDialogOptions)
#endif // QT_NO_INPUTDIALOG
QT_END_NAMESPACE
#endif // QT_NO_INPUTDIALOG
#endif // QINPUTDIALOG_H

View File

@ -1834,7 +1834,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title)
"<p>Qt and the Qt logo are trademarks of The Qt Company Ltd.</p>"
"<p>Qt is The Qt Company Ltd product developed as an open source "
"project. See <a href=\"http://%3/\">%3</a> for more information.</p>"
).arg(QStringLiteral("2016"),
).arg(QStringLiteral("2017"),
QStringLiteral("qt.io/licensing"),
QStringLiteral("qt.io"));
QMessageBox *msgBox = new QMessageBox(parent);

View File

@ -41,13 +41,14 @@
#define QMESSAGEBOX_H
#include <QtWidgets/qtwidgetsglobal.h>
#ifndef QT_NO_MESSAGEBOX
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_MESSAGEBOX
class QLabel;
class QMessageBoxPrivate;
class QAbstractButton;
@ -322,8 +323,8 @@ QString s = QApplication::tr("Executable '%1' requires Qt "\
str)).arg(QString::fromLatin1(qVersion())); QMessageBox::critical(0, QApplication::tr(\
"Incompatible Qt Library Error"), s, QMessageBox::Abort, 0); qFatal("%s", s.toLatin1().data()); }}
#endif // QT_NO_MESSAGEBOX
QT_END_NAMESPACE
#endif // QT_NO_MESSAGEBOX
#endif // QMESSAGEBOX_H

View File

@ -41,13 +41,14 @@
#define QPROGRESSDIALOG_H
#include <QtWidgets/qtwidgetsglobal.h>
#ifndef QT_NO_PROGRESSDIALOG
#include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_PROGRESSDIALOG
class QPushButton;
class QLabel;
class QProgressBar;
@ -127,8 +128,8 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_disconnectOnClose())
};
#endif // QT_NO_PROGRESSDIALOG
QT_END_NAMESPACE
#endif // QT_NO_PROGRESSDIALOG
#endif // QPROGRESSDIALOG_H

View File

@ -1089,7 +1089,7 @@ void QWizardPrivate::recreateLayout(const QWizardLayoutInfo &info)
// ### hardcoded for now:
titleFont = QFont(QLatin1String("Segoe UI"), 12);
QPalette pal(titleLabel->palette());
pal.setColor(QPalette::Text, "#003399");
pal.setColor(QPalette::Text, QColor(0x00, 0x33, 0x99));
titleLabel->setPalette(pal);
}

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