Compare commits
87 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4903e45231 | ||
|
1bf5d3af1a | ||
|
3f31b643b1 | ||
|
eb192256e7 | ||
|
e2f35fa684 | ||
|
9d43d55b21 | ||
|
303e9168eb | ||
|
5e32c51b7a | ||
|
182868f4d0 | ||
|
b84e1f0526 | ||
|
a649475339 | ||
|
567837a742 | ||
|
07c33ab76f | ||
|
bdccc51bc1 | ||
|
044ac31b24 | ||
|
3f23d27dd5 | ||
|
cb5f69882e | ||
|
3271df912b | ||
|
1253069f65 | ||
|
5839535c9f | ||
|
440a6ac65f | ||
|
ed54545d0d | ||
|
96df877ebc | ||
|
9c80104cfd | ||
|
3dd88d367f | ||
|
9eac4b1faf | ||
|
0b4bfe1757 | ||
|
25e20ae39e | ||
|
2a0186420c | ||
|
28b138cbc2 | ||
|
277b8dde1a | ||
|
7110eb7ca1 | ||
|
d96bbd999f | ||
|
b8e404f6d0 | ||
|
13bbb1d9b9 | ||
|
6cddd0e8cf | ||
|
1e5566c2e9 | ||
|
13c19db171 | ||
|
1e6a680f83 | ||
|
89bd5a7e73 | ||
|
a5a37a7529 | ||
|
5705133066 | ||
|
d1b009cbbb | ||
|
2812f0861c | ||
|
52b739776d | ||
|
f0b93f7a4b | ||
|
fa2323e37b | ||
|
1930af194c | ||
|
f73cd386c3 | ||
|
515e9a1427 | ||
|
40b33adb7a | ||
|
15f29c3a24 | ||
|
7bbbfc38ce | ||
|
c6d07c5418 | ||
|
a4a5b4288e | ||
|
8476ac456e | ||
|
cb90cdbd65 | ||
|
e1e4b1b780 | ||
|
197dfcd36f | ||
|
45237fa54c | ||
|
f470cc2da9 | ||
|
31f07f3114 | ||
|
28798478ba | ||
|
1fd2124de7 | ||
|
f2e9505aa1 | ||
|
41e59afc41 | ||
|
d1646b37b1 | ||
|
4a9292f169 | ||
|
2465184351 | ||
|
f7d44cc6da | ||
|
ee932d3ed5 | ||
|
1304b6705e | ||
|
52889ded67 | ||
|
d570f19652 | ||
|
e8b3593ecb | ||
|
cc1dc42c1f | ||
|
19ab8bf7e7 | ||
|
1e310b5a45 | ||
|
9a322dfdea | ||
|
b207332b93 | ||
|
3a71e387d9 | ||
|
4ddc50c0cd | ||
|
6bffb8e3e1 | ||
|
52ad1de1f6 | ||
|
c7b3c5a082 | ||
|
afec5935ea | ||
|
3a50e51b01 |
@ -4,4 +4,4 @@ CONFIG += warning_clean
|
|||||||
QT_SOURCE_TREE = $$PWD
|
QT_SOURCE_TREE = $$PWD
|
||||||
QT_BUILD_TREE = $$shadowed($$PWD)
|
QT_BUILD_TREE = $$shadowed($$PWD)
|
||||||
|
|
||||||
MODULE_VERSION = 5.12.5
|
MODULE_VERSION = 5.12.7
|
||||||
|
1331
LICENSE.QT-LICENSE-AGREEMENT
Normal file
1331
LICENSE.QT-LICENSE-AGREEMENT
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,913 +0,0 @@
|
|||||||
QT LICENSE AGREEMENT
|
|
||||||
Agreement version 4.0
|
|
||||||
|
|
||||||
This License Agreement ("Agreement") is a legal agreement between The Qt
|
|
||||||
Company (as defined below) and the Licensee (as defined below) for the license
|
|
||||||
of Licensed Software (as defined below). Capitalized terms used herein are
|
|
||||||
defined in Section 1.
|
|
||||||
|
|
||||||
WHEREAS:
|
|
||||||
|
|
||||||
(A). Licensee wishes to use the Licensed Software for the purpose of developing
|
|
||||||
and distributing Applications and/or Devices; and
|
|
||||||
|
|
||||||
(B). The Qt Company is willing to grant the Licensee a right to use Licensed
|
|
||||||
Software for such purpose pursuant to term and conditions of this Agreement.
|
|
||||||
|
|
||||||
NOW, THEREFORE, THE PARTIES HEREBY AGREE AS FOLLOWS:
|
|
||||||
|
|
||||||
1. DEFINITIONS
|
|
||||||
|
|
||||||
"Affiliate" of a Party shall mean an entity (i) which is directly or indirectly
|
|
||||||
controlling such Party; (ii) which is under the same direct or indirect
|
|
||||||
ownership or control as such Party; or (iii) which is directly or indirectly
|
|
||||||
owned or controlled by such Party. For these purposes, an entity shall be
|
|
||||||
treated as being controlled by another if that other entity has fifty percent
|
|
||||||
(50 %) or more of the votes in such entity, is able to direct its affairs
|
|
||||||
and/or to control the composition of its board of directors or equivalent body.
|
|
||||||
|
|
||||||
"Applications" shall mean Licensee's software products created using the
|
|
||||||
Licensed Software, which may include the Redistributables, or part
|
|
||||||
thereof.
|
|
||||||
|
|
||||||
"Contractor(s)" shall mean third party consultants, distributors and
|
|
||||||
contractors performing services to a Party under applicable contractual
|
|
||||||
arrangement.
|
|
||||||
|
|
||||||
"Customer(s)" shall mean Licensee's end users to whom Licensee, directly or
|
|
||||||
indirectly, distributes copies of the Redistributables.
|
|
||||||
|
|
||||||
"Deployment Platforms" shall mean operating systems specified in the License
|
|
||||||
Certificate, in which the Redistributables can be distributed pursuant to the
|
|
||||||
terms and conditions of this Agreement.
|
|
||||||
|
|
||||||
"Designated User(s)" shall mean the employee(s) of Licensee or Licensee's
|
|
||||||
Affiliates acting within the scope of their employment or Licensee's
|
|
||||||
Contractors acting within the scope of their services for Licensee and on
|
|
||||||
behalf of Licensee. Designated Users shall be named in the License Certificate.
|
|
||||||
|
|
||||||
"Development License" shall mean the license needed by the Licensee for each
|
|
||||||
Designated User to use the Licensed Software under the license grant described
|
|
||||||
in Section 3.1 of this Agreement.
|
|
||||||
|
|
||||||
"Development Platforms" shall mean those operating systems specified in the
|
|
||||||
License Certificate, in which the Licensed Software can be used under the
|
|
||||||
Development License, but not distributed in any form or used for any other
|
|
||||||
purpose.
|
|
||||||
|
|
||||||
"Devices" shall mean hardware devices or products that 1) are manufactured
|
|
||||||
and/or distributed by the Licensee or its Affiliates or Contractors, and
|
|
||||||
(2)(i) incorporate or integrate the Redistributables or parts thereof; or (ii)
|
|
||||||
do not incorporate or integrate the Redistributables at the time of
|
|
||||||
distribution, but where, when used by a Customer, the main user interface or
|
|
||||||
substantial functionality of such device is provided by Application(s) or
|
|
||||||
otherwise depends on the Licensed Software.
|
|
||||||
|
|
||||||
"Distribution License(s)" shall mean the license required for distribution of
|
|
||||||
Redistributables in connection with Devices pursuant to license grant described
|
|
||||||
in Section 3.3 of this Agreement.
|
|
||||||
|
|
||||||
"Distribution License Packs" shall mean set of prepaid Distribution Licenses
|
|
||||||
for distribution of Redistributables, as defined in The Qt Company's standard
|
|
||||||
price list, quote, Purchase Order confirmation or in an appendix hereto,
|
|
||||||
as the case may be.
|
|
||||||
|
|
||||||
"Intellectual Property Rights" shall mean patents (including utility models),
|
|
||||||
design patents, and designs (whether or not capable of registration), chip
|
|
||||||
topography rights and other like protection, copyrights, trademarks, service
|
|
||||||
marks, trade names, logos or other words or symbols and any other form of
|
|
||||||
statutory protection of any kind and applications for any of the foregoing as
|
|
||||||
well as any trade secrets.
|
|
||||||
|
|
||||||
"License Certificate" shall mean a certificate generated by The Qt Company for
|
|
||||||
each Designated User respectively upon them downloading the licensed Software.
|
|
||||||
License Certificate will be available under respective Designated User's Qt
|
|
||||||
Account at account.qt.io and it will specify the Designated User, the
|
|
||||||
Development Platforms, Deployment Platforms and the License Term. The terms of
|
|
||||||
the License Certificate are considered part of this Agreement and shall be
|
|
||||||
updated from time to time to reflect any agreed changes to the foregoing terms
|
|
||||||
relating to Designated User's rights to the Licensed Software.
|
|
||||||
|
|
||||||
"License Fee" shall mean the fee charged to the Licensee for rights granted
|
|
||||||
under the terms of this Agreement.
|
|
||||||
|
|
||||||
"License Term" shall mean the agreed validity period of the Development
|
|
||||||
License of the respective Designated User, during which time the
|
|
||||||
Designated User is entitled to use the Licensed Software, as set forth in the
|
|
||||||
respective License Certificate.
|
|
||||||
|
|
||||||
"Licensed Software" shall mean all versions of the
|
|
||||||
|
|
||||||
(i) Qt Toolkit (including Qt Essentials, Qt Add-Ons and Value-Add modules) as
|
|
||||||
described in http://doc.qt.io/qt-5/qtmodules.html,
|
|
||||||
|
|
||||||
(ii) Qt Creator (including Creator IDE tool) as described in
|
|
||||||
http://doc.qt.io/qtcreator/index.html,
|
|
||||||
|
|
||||||
(iii) Qt 3D Studio as described in http://doc.qt.io/qt3dstudio/index.html, and
|
|
||||||
|
|
||||||
as well as corresponding online or electronic documentation, associated media
|
|
||||||
and printed materials, including the source code, example programs and the
|
|
||||||
documentation, licensed to the Licensee under this Agreement. Licensed Software
|
|
||||||
does not include Third Party Software (as defined in Section 4), Open Source
|
|
||||||
Qt, or other software products of The Qt Company (for example Qt Safe Renderer
|
|
||||||
and Qt for Automation), unless such other software products of The Qt Company
|
|
||||||
are separately agreed in writing to be included in scope of the Licensed
|
|
||||||
Software.
|
|
||||||
|
|
||||||
"Licensee" shall mean the individual or legal entity that is party to this
|
|
||||||
Agreement, as identified on the signature page hereof.
|
|
||||||
|
|
||||||
"Licensee's Records" shall mean books and records that are likely to contain
|
|
||||||
information bearing on Licensee's compliance with this Agreement or the
|
|
||||||
payments due to The Qt Company under this Agreement, including, but not limited
|
|
||||||
to: assembly logs, sales records and distribution records.
|
|
||||||
|
|
||||||
"Modified Software" shall have the meaning as set forth in Section 2.3.
|
|
||||||
|
|
||||||
"Online Services" shall mean any services or access to systems made available
|
|
||||||
by The Qt Company to the Licensee over the Internet relating to the Licensed
|
|
||||||
Software or for the purpose of use by the Licensee of the Licensed Software or
|
|
||||||
Support. Use of any such Online Services is discretionary for the Licensee and
|
|
||||||
some of them may be subject to additional fees.
|
|
||||||
|
|
||||||
"Open Source Qt" shall mean the non-commercial Qt computer software products,
|
|
||||||
licensed under the terms of the GNU Lesser General Public License, version
|
|
||||||
2.1 or later ("LGPL") or the GNU General Public License, version 2.0 or later
|
|
||||||
("GPL"). For clarity, Open Source Qt shall not be provided nor governed under
|
|
||||||
this Agreement.
|
|
||||||
|
|
||||||
"Party" or "Parties" shall mean Licensee and/or The Qt Company.
|
|
||||||
|
|
||||||
"Redistributables" shall mean the portions of the Licensed Software set forth
|
|
||||||
in Appendix 1, Section 1 that may be distributed pursuant to the terms of this
|
|
||||||
Agreement in object code form only, including any relevant documentation.
|
|
||||||
Where relevant, any reference to Licensed Software in this Agreement shall
|
|
||||||
include and refer also to Redistributables.
|
|
||||||
|
|
||||||
"Renewal Term" shall mean an extension of previous License Term as agreed
|
|
||||||
between the Parties.
|
|
||||||
|
|
||||||
"Submitted Modified Software" shall have the meaning as set forth in
|
|
||||||
Section 2.3.
|
|
||||||
|
|
||||||
"Support" shall mean standard developer support that is provided by The Qt
|
|
||||||
Company to assist Designated Users in using the Licensed Software in
|
|
||||||
accordance with The Qt Company's standard support terms and as further
|
|
||||||
defined in Section 8 hereunder.
|
|
||||||
|
|
||||||
"Taxes" shall have the meaning set forth in Section 10.5.
|
|
||||||
|
|
||||||
"Term" shall have the meaning set forth in Section 12.
|
|
||||||
|
|
||||||
"The Qt Company" shall mean:
|
|
||||||
|
|
||||||
(i) in the event Licensee is an individual residing in the United States or a
|
|
||||||
legal entity incorporated in the United States or having its headquarters in
|
|
||||||
the United States, The Qt Company Inc., a Delaware corporation with its office
|
|
||||||
at 2350 Mission College Blvd., Suite 1020, Santa Clara, CA 95054, USA.; or
|
|
||||||
|
|
||||||
(ii) in the event the Licensee is an individual residing outside of the United
|
|
||||||
States or a legal entity incorporated outside of the United States or having
|
|
||||||
its registered office outside of the United States, The Qt Company Ltd., a
|
|
||||||
Finnish company with its registered office at Bertel Jungin aukio D3A, 02600
|
|
||||||
Espoo, Finland.
|
|
||||||
|
|
||||||
"Third Party Software " shall have the meaning set forth in Section 4.
|
|
||||||
|
|
||||||
"Updates" shall mean a release or version of the Licensed Software containing
|
|
||||||
bug fixes, error corrections and other changes that are generally made
|
|
||||||
available to users of the Licensed Software that have contracted for Support.
|
|
||||||
Updates are generally depicted as a change to the digits following the decimal
|
|
||||||
in the Licensed Software version number. The Qt Company shall make Updates
|
|
||||||
available to the Licensee under the Support. Updates shall be considered as
|
|
||||||
part of the Licensed Software hereunder.
|
|
||||||
|
|
||||||
"Upgrades" shall mean a release or version of the Licensed Software containing
|
|
||||||
enhancements and new features and are generally depicted as a change to the
|
|
||||||
first digit of the Licensed Software version number. In the event Upgrades are
|
|
||||||
provided to the Licensee under this Agreement, they shall be considered as
|
|
||||||
part of the Licensed Software hereunder.
|
|
||||||
|
|
||||||
2. OWNERSHIP
|
|
||||||
|
|
||||||
2.1 Ownership of The Qt Company
|
|
||||||
|
|
||||||
The Licensed Software is protected by copyright laws and international
|
|
||||||
copyright treaties, as well as other intellectual property laws and treaties.
|
|
||||||
The Licensed Software is licensed, not sold.
|
|
||||||
|
|
||||||
All The Qt Company's Intellectual Property Rights are and shall remain the
|
|
||||||
exclusive property of The Qt Company or its licensors respectively.
|
|
||||||
|
|
||||||
2.2 Ownership of Licensee
|
|
||||||
|
|
||||||
All the Licensee's Intellectual Property Rights are and shall remain the
|
|
||||||
exclusive property of the Licensee or its licensors respectively.
|
|
||||||
|
|
||||||
All Intellectual Property Rights to the Modified Software, Applications and
|
|
||||||
Devices shall remain with the Licensee and no rights thereto shall be granted
|
|
||||||
by the Licensee to The Qt Company under this Agreement (except as set forth in
|
|
||||||
Section 2.3 below).
|
|
||||||
|
|
||||||
2.3 Modified Software
|
|
||||||
|
|
||||||
Licensee may create bug-fixes, error corrections, patches or modifications to
|
|
||||||
the Licensed Software ("Modified Software"). Such Modified Software may break
|
|
||||||
the source or binary compatibility with the Licensed Software (including
|
|
||||||
without limitation through changing the application programming interfaces
|
|
||||||
("API") or by adding, changing or deleting any variable, method, or class
|
|
||||||
signature in the Licensed Software and/or any inter-process protocols, services
|
|
||||||
or standards in the Licensed Software libraries). To the extent that Licensee's
|
|
||||||
Modified Software so breaks source or binary compatibility with the Licensed
|
|
||||||
Software, Licensee acknowledges that The Qt Company's ability to provide
|
|
||||||
Support may be prevented or limited and Licensee's ability to make use of
|
|
||||||
Updates may be restricted.
|
|
||||||
|
|
||||||
Licensee may, at its sole and absolute discretion, choose to submit Modified
|
|
||||||
Software to The Qt Company ("Submitted Modified Software") in connection with
|
|
||||||
Licensee's Support request, service request or otherwise. In the event Licensee
|
|
||||||
does so, then, Licensee hereby grants The Qt Company a sublicensable,
|
|
||||||
assignable, irrevocable, perpetual, worldwide, non-exclusive, royalty-free and
|
|
||||||
fully paid-up license, under all of Licensee's Intellectual Property Rights, to
|
|
||||||
reproduce, adapt, translate, modify, and prepare derivative works of, publicly
|
|
||||||
display, publicly perform, sublicense, make available and distribute such
|
|
||||||
Submitted Modified Software as The Qt Company sees fit at its free and absolute
|
|
||||||
discretion.
|
|
||||||
|
|
||||||
3. LICENSES GRANTED
|
|
||||||
|
|
||||||
3.1 Development with Licensed Software
|
|
||||||
|
|
||||||
Subject to the terms of this Agreement, The Qt Company grants to Licensee a
|
|
||||||
personal, worldwide, non-exclusive, non-transferable license, valid for the
|
|
||||||
License Term, to use, modify and copy the Licensed Software by Designated Users
|
|
||||||
on the Development Platforms for the sole purposes of designing, developing,
|
|
||||||
demonstrating and testing Application(s) and/or Devices, and to provide thereto
|
|
||||||
related support and other related services to end-user Customers.
|
|
||||||
|
|
||||||
Licensee may install copies of the Licensed Software on an unlimited number of
|
|
||||||
computers provided that (i) only the Designated Users may use the Licensed
|
|
||||||
Software, and (ii) all Designated Users must have a valid Development License
|
|
||||||
to use Licensed Software.
|
|
||||||
|
|
||||||
Licensee may at any time designate another Designated User to replace a then-
|
|
||||||
current Designated User by notifying The Qt Company in writing, provided that
|
|
||||||
any Designated User may be replaced only once during any six-month period.
|
|
||||||
|
|
||||||
Upon expiry of the initially agreed License Term, the respective License Terms
|
|
||||||
shall be automatically extended to one or more Renewal Term(s), unless and
|
|
||||||
until either Party notifies the other Party in writing that it does not wish to
|
|
||||||
continue the License Term, such notification to be provided to the other Party
|
|
||||||
no less than ninety (90) days before expiry of the respective License Term.
|
|
||||||
Unless otherwise agreed between the Parties, Renewal Term shall be of equal
|
|
||||||
length with the initial Term.
|
|
||||||
|
|
||||||
Any such Renewal Term shall be subject to License Fees agreed between the
|
|
||||||
Parties or, if no advance agreement exists, subject to The Qt Company's
|
|
||||||
standard pricing applicable at the commencement date of any such Renewal Term.
|
|
||||||
|
|
||||||
3.2 Distribution of Applications
|
|
||||||
|
|
||||||
Subject to the terms of this Agreement, The Qt Company grants to Licensee a
|
|
||||||
personal, worldwide, non-exclusive, non-transferable, revocable (for cause
|
|
||||||
pursuant to this Agreement) right and license, valid for the Term, to
|
|
||||||
|
|
||||||
(i) distribute, by itself or through its Contractors, Redistributables as
|
|
||||||
installed, incorporated or integrated into Applications for execution on the
|
|
||||||
Deployment Platforms, and
|
|
||||||
|
|
||||||
(ii) grant sublicenses to Redistributables, as distributed hereunder, for
|
|
||||||
Customers solely for Customer's internal use and to the extent necessary in
|
|
||||||
order for the Customers to use the Applications for their respective intended
|
|
||||||
purposes.
|
|
||||||
|
|
||||||
Right to distribute the Redistributables as part of an Application as provided
|
|
||||||
herein is not royalty-bearing but is conditional upon the Licensee having paid
|
|
||||||
the agreed Development Licenses from The Qt Company before distributing any
|
|
||||||
Redistributables to Customers.
|
|
||||||
|
|
||||||
3.3 Distribution of Devices
|
|
||||||
|
|
||||||
Subject to the terms of this Agreement, The Qt Company grants to Licensee a
|
|
||||||
personal, worldwide, non-exclusive, non-transferable, revocable (for cause
|
|
||||||
pursuant to this Agreement) right and license, valid for the Term, to
|
|
||||||
|
|
||||||
(i) distribute, by itself or through one or more tiers of Contractors,
|
|
||||||
Redistributables as installed, incorporated or integrated, or intended to be
|
|
||||||
installed, incorporated or integrated into Devices for execution on the
|
|
||||||
Deployment Platforms, and
|
|
||||||
|
|
||||||
(ii) grant sublicenses to Redistributables, as distributed hereunder, for
|
|
||||||
Customers solely for Customer's internal use and to the extent necessary in
|
|
||||||
order for the Customers to use the Devices for their respective intended
|
|
||||||
purposes.
|
|
||||||
|
|
||||||
Right to distribute the Redistributables with Devices as provided herein is
|
|
||||||
conditional upon the Licensee having purchased and paid the appropriate amount
|
|
||||||
of Development and Distribution Licenses from The Qt Company before
|
|
||||||
distributing any Redistributables to Customers.
|
|
||||||
|
|
||||||
3.4 Further Requirements
|
|
||||||
|
|
||||||
The licenses granted above in this Section 3 by The Qt Company to Licensee are
|
|
||||||
conditional and subject to Licensee's compliance with the following terms:
|
|
||||||
|
|
||||||
(i) Licensee shall not remove or alter any copyright, trademark or other
|
|
||||||
proprietary rights notice contained in any portion of the Licensed Software;
|
|
||||||
|
|
||||||
(ii) Applications must add primary and substantial functionality to the
|
|
||||||
Licensed Software;
|
|
||||||
|
|
||||||
(iii) Applications may not pass on functionality which in any way makes it
|
|
||||||
possible for others to create software with the Licensed Software; provided
|
|
||||||
however that Licensee may use the Licensed Software's scripting and QML ("Qt
|
|
||||||
Quick") functionality solely in order to enable scripting, themes and styles
|
|
||||||
that augment the functionality and appearance of the Application(s) without
|
|
||||||
adding primary and substantial functionality to the Application(s);
|
|
||||||
|
|
||||||
(iv) Applications must not compete with the Licensed Software;
|
|
||||||
|
|
||||||
(v) Licensee shall not use The Qt Company's or any of its suppliers' names,
|
|
||||||
logos, or trademarks to market Applications, except that Licensee may use
|
|
||||||
"Built with Qt" logo to indicate that Application(s) was developed using the
|
|
||||||
Licensed Software;
|
|
||||||
|
|
||||||
(vi) Licensee shall not distribute, sublicense or disclose source code of
|
|
||||||
Licensed Software to any third party (provided however that Licensee may
|
|
||||||
appoint employee(s) of Contractors as Designated Users to use Licensed
|
|
||||||
Software pursuant to this Agreement). Such right may be available for the
|
|
||||||
Licensee subject to a separate software development kit ("SDK") license
|
|
||||||
agreement to be concluded with The Qt Company;
|
|
||||||
|
|
||||||
(vii) Licensee shall not grant the Customers a right to (i) make copies of the
|
|
||||||
Redistributables except when and to the extent required to use the Applications
|
|
||||||
and/or Devices for their intended purpose, (ii) modify the Redistributables or
|
|
||||||
create derivative works thereof, (iii) decompile, disassemble or otherwise
|
|
||||||
reverse engineer Redistributables, or (iv) redistribute any copy or portion of
|
|
||||||
the Redistributables to any third party, except as part of the onward sale of
|
|
||||||
the Device on which the Redistributables are installed;
|
|
||||||
|
|
||||||
(viii) Licensee shall not and shall cause that its Affiliates or Contractors
|
|
||||||
shall not a) in any way combine, incorporate or integrate Licensed Software
|
|
||||||
with, or use Licensed Software for creation of, any software created with or
|
|
||||||
incorporating Open Source Qt, or b) incorporate or integrate Applications
|
|
||||||
into a hardware device or product other than a Device, unless Licensee has
|
|
||||||
received an advance written permission from The Qt Company to do so. Absent
|
|
||||||
such written permission, any and all distribution by the Licensee during the
|
|
||||||
Term of a hardware device or product a) which incorporate or integrate any
|
|
||||||
part of Licensed Software or Open Source Qt; or b) where the main user
|
|
||||||
interface or substantial functionality is provided by software build with
|
|
||||||
Licensed Software or Open Source Qt or otherwise depends on the Licensed
|
|
||||||
Software or Open Source Qt, shall be considered as a Device distribution under
|
|
||||||
this Agreement and dependent on compliance thereof (including but not limited
|
|
||||||
to obligation to pay applicable License Fees for such distribution);
|
|
||||||
|
|
||||||
(ix) Licensee shall cause all of its Affiliates and Contractors entitled to
|
|
||||||
make use of the licenses granted under this Agreement, to be contractually
|
|
||||||
bound to comply with the relevant terms of this Agreement and not to use the
|
|
||||||
Licensed Software beyond the terms hereof and for any purposes other than
|
|
||||||
operating within the scope of their services for Licensee. Licensee shall be
|
|
||||||
responsible for any and all actions and omissions of its Affiliates and
|
|
||||||
Contractors relating to the Licensed Software and use thereof (including but
|
|
||||||
not limited to payment of all applicable License Fees);
|
|
||||||
|
|
||||||
(x) Except when and to the extent explicitly provided in this Section 3,
|
|
||||||
Licensee shall not transfer, publish, disclose, display or otherwise make
|
|
||||||
available the Licensed Software;
|
|
||||||
|
|
||||||
; and
|
|
||||||
|
|
||||||
(xi) Licensee shall not attempt or enlist a third party to conduct or attempt
|
|
||||||
to conduct any of the above.
|
|
||||||
|
|
||||||
Above terms shall not be applicable if and to the extent they conflict with any
|
|
||||||
mandatory provisions of any applicable laws.
|
|
||||||
|
|
||||||
Any use of Licensed Software beyond the provisions of this Agreement is
|
|
||||||
strictly prohibited and requires an additional license from The Qt Company.
|
|
||||||
|
|
||||||
4. THIRD PARTY SOFTWARE
|
|
||||||
|
|
||||||
The Licensed Software may provide links to third party libraries or code
|
|
||||||
(collectively "Third Party Software") to implement various functions. Third
|
|
||||||
Party Software does not comprise part of the Licensed Software. In some cases,
|
|
||||||
access to Third Party Software may be included in the Licensed Software. Such
|
|
||||||
Third Party Software will be listed in the ".../src/3rdparty" source tree
|
|
||||||
delivered with the Licensed Software or documented in the Licensed Software, as
|
|
||||||
such may be amended from time to time. Licensee acknowledges that use or
|
|
||||||
distribution of Third Party Software is in all respects subject to applicable
|
|
||||||
license terms of applicable third party right holders.
|
|
||||||
|
|
||||||
5. PRE-RELEASE CODE
|
|
||||||
|
|
||||||
The Licensed Software may contain pre-release code and functionality marked or
|
|
||||||
otherwise stated as "Technology Preview", "Alpha", "Beta" or similar
|
|
||||||
designation. Such pre-release code may be present in order to provide
|
|
||||||
experimental support for new platforms or preliminary versions of one or more
|
|
||||||
new functionalities. The pre-release code may not be at the level of
|
|
||||||
performance and compatibility of a final, generally available, product
|
|
||||||
offering of the Licensed Software. The pre-release parts of the Licensed
|
|
||||||
Software may not operate correctly, may contain errors and may be substantially
|
|
||||||
modified by The Qt Company prior to the first commercial product release, if
|
|
||||||
any. The Qt Company is under no obligation to make pre-release code
|
|
||||||
commercially available, or provide any Support or Updates relating thereto. The
|
|
||||||
Qt Company assumes no liability whatsoever regarding any pre-release code, but
|
|
||||||
any use thereof is exclusively at Licensee's own risk and expense.
|
|
||||||
|
|
||||||
6. LIMITED WARRANTY AND WARRANTY DISCLAIMER
|
|
||||||
|
|
||||||
The Qt Company hereby represents and warrants that it has the power and
|
|
||||||
authority to grant the rights and licenses granted to Licensee under this
|
|
||||||
Agreement.
|
|
||||||
|
|
||||||
Except as set forth above, the Licensed Software is licensed to Licensee
|
|
||||||
"as is" and Licensee's exclusive remedy and The Qt Company's entire liability
|
|
||||||
for errors in the Licensed Software shall be limited, at The Qt Company's
|
|
||||||
option, to correction of the error, replacement of the Licensed Software or
|
|
||||||
return of the applicable fees paid for the defective Licensed Software for the
|
|
||||||
time period during which the License is not able to utilize the Licensed
|
|
||||||
Software under the terms of this Agreement.
|
|
||||||
|
|
||||||
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE QT COMPANY ON BEHALF OF
|
|
||||||
ITSELF AND ITS LICENSORS, SUPPLIERS AND AFFILIATES, DISCLAIMS ALL OTHER
|
|
||||||
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-
|
|
||||||
INFRINGEMENT WITH REGARD TO THE LICENSED SOFTWARE. THE QT COMPANY DOES NOT
|
|
||||||
WARRANT THAT THE LICENSED SOFTWARE WILL SATISFY LICENSEE'S REQUIREMENTS OR THAT
|
|
||||||
IT WILL OPERATE WITHOUT DEFECT OR ERROR OR THAT THE OPERATION THEREOF WILL BE
|
|
||||||
UNINTERRUPTED. ALL USE OF AND RELIANCE ON THE LICENSED SOFTWARE IS AT THE SOLE
|
|
||||||
RISK OF AND RESPONSIBILITY OF LICENSEE.
|
|
||||||
|
|
||||||
7. INDEMNIFICATION AND LIMITATION OF LIABILITY
|
|
||||||
|
|
||||||
7.1 Limitation of Liability
|
|
||||||
|
|
||||||
EXCEPT FOR (I) CASES OF GROSS NEGLIGENCE OR INTENTIONAL MISCONDUCT, AND (II)
|
|
||||||
BREACH OF CONFIDENTIALITY, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, IN NO
|
|
||||||
EVENT SHALL EITHER PARTY BE LIABLE TO THE OTHER PARTY FOR ANY LOSS OF PROFIT,
|
|
||||||
LOSS OF DATA, LOSS OF BUSINESS OR GOODWILL OR ANY OTHER INDIRECT, SPECIAL,
|
|
||||||
CONSEQUENTIAL, INCIDENTAL OR PUNITIVE COST, DAMAGES OR EXPENSE OF ANY KIND,
|
|
||||||
HOWSOEVER ARISING UNDER OR IN CONNECTION WITH THIS AGREEMENT. PARTIES
|
|
||||||
SPECIFICALLY AGREE THAT LICENSEE'S OBLIGATION TO PAY LICENSE AND OTHER FEES
|
|
||||||
CORRESPONDING TO ACTUAL USAGE OF LICENSED SOFTWARE HEREUNDER SHALL BE
|
|
||||||
CONSIDERED AS A DIRECT DAMAGE.
|
|
||||||
|
|
||||||
EXCEPT FOR (I) CASES OF GROSS NEGLIGENCE OR INTENTIONAL MISCONDUCT, AND (II)
|
|
||||||
BREACH OF CONFIDENTIALITY, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, IN
|
|
||||||
NO EVENT SHALL EITHER PARTY'S TOTAL AGGREGATE LIABILITY UNDER THIS AGREEMENT
|
|
||||||
EXCEED THE AGGREGATE LICENSE FEES PAID OR PAYABLE TO THE QT COMPANY FROM
|
|
||||||
LICENSEE DURING THE PERIOD OF TWELVE (12) MONTHS IMMEDIATELY PRECEDING THE
|
|
||||||
EVENT RESULTING IN SUCH LIABILITY.
|
|
||||||
|
|
||||||
THE PROVISIONS OF THIS SECTION 7 ALLOCATE THE RISKS UNDER THIS AGREEMENT
|
|
||||||
BETWEEN THE QT COMPANY AND LICENSEE AND THE PARTIES HAVE RELIED UPON THE
|
|
||||||
LIMITATIONS SET FORTH HEREIN IN DETERMINING WHETHER TO ENTER INTO THIS AGREEMENT.
|
|
||||||
|
|
||||||
7.2 Licensee's Indemnification
|
|
||||||
|
|
||||||
Licensee shall indemnify and hold harmless The Qt Company from and against any
|
|
||||||
claim, injury, judgment, settlement, loss or expense, including attorneys' fees
|
|
||||||
related to: (a) Licensee's misrepresentation in connection with The Qt Company
|
|
||||||
or the Licensed Software or breach of this Agreement, (b) the Application or
|
|
||||||
Device (except where such cause of liability is solely attributable to the
|
|
||||||
Licensed Software).
|
|
||||||
|
|
||||||
8. SUPPORT, UPDATES AND ONLINE SERVICES
|
|
||||||
|
|
||||||
Upon due payment of the agreed License Fees the Licensee will be eligible to
|
|
||||||
receive Support and Updates and to use the Online Services during the License
|
|
||||||
Term, provided, however, that in the event the License Term is longer than 36
|
|
||||||
months, Support is provided only for the first 12 months, unless the Parties
|
|
||||||
specifically otherwise agree.
|
|
||||||
|
|
||||||
Unless otherwise decided by The Company at its free and absolute discretion,
|
|
||||||
Upgrades will not be included in the Support but may be available subject to
|
|
||||||
additional fees.
|
|
||||||
|
|
||||||
From time to time The Qt Company may change the Support terms, provided that
|
|
||||||
during the respective ongoing License Term the level of Support provided by The
|
|
||||||
Qt Company may not be reduced without the consent of the Licensee.
|
|
||||||
|
|
||||||
Unless otherwise agreed, The Qt Company shall not be responsible for providing
|
|
||||||
any service or support to Customers.
|
|
||||||
|
|
||||||
9. CONFIDENTIALITY
|
|
||||||
|
|
||||||
Each Party acknowledges that during the Term of this Agreement each Party may
|
|
||||||
receive information about the other Party's business, business methods,
|
|
||||||
business plans, customers, business relations, technology, and other
|
|
||||||
information, including the terms of this Agreement, that is confidential and
|
|
||||||
of great value to the other Party, and the value of which would be
|
|
||||||
significantly reduced if disclosed to third parties ("Confidential
|
|
||||||
Information"). Accordingly, when a Party (the "Receiving Party") receives
|
|
||||||
Confidential Information from the other Party (the "Disclosing Party"), the
|
|
||||||
Receiving Party shall only disclose such information to employees and
|
|
||||||
Contractors on a need to know basis, and shall cause its employees and
|
|
||||||
employees of its Affiliates to: (i) maintain any and all Confidential
|
|
||||||
Information in confidence; (ii) not disclose the Confidential Information to a
|
|
||||||
third party without the Disclosing Party's prior written approval; and (iii)
|
|
||||||
not, directly or indirectly, use the Confidential Information for any purpose
|
|
||||||
other than for exercising its rights and fulfilling its responsibilities
|
|
||||||
pursuant to this Agreement. Each Party shall take reasonable measures to
|
|
||||||
protect the Confidential Information of the other Party, which measures shall
|
|
||||||
not be less than the measures taken by such Party to protect its own
|
|
||||||
confidential and proprietary information.
|
|
||||||
|
|
||||||
Obligation of confidentiality shall not apply to information that (i) is or
|
|
||||||
becomes generally known to the public through no act or omission of the
|
|
||||||
Receiving Party; (ii) was in the Receiving Party's lawful possession prior to
|
|
||||||
the disclosure hereunder and was not subject to limitations on disclosure or
|
|
||||||
use; (iii) is developed independently by employees or Contractors of the
|
|
||||||
Receiving Party or other persons working for the Receiving Party who have not
|
|
||||||
had access to the Confidential Information of the Disclosing Party, as proven
|
|
||||||
by the written records of the Receiving Party; (iv) is lawfully disclosed to
|
|
||||||
the Receiving Party without restrictions, by a third party not under an
|
|
||||||
obligation of confidentiality; or (v) the Receiving Party is legally compelled
|
|
||||||
to disclose, in which case the Receiving Party shall notify the Disclosing
|
|
||||||
Party of such compelled disclosure and assert the privileged and confidential
|
|
||||||
nature of the information and cooperate fully with the Disclosing Party to
|
|
||||||
limit the scope of disclosure and the dissemination of disclosed Confidential
|
|
||||||
Information to the minimum extent necessary.
|
|
||||||
|
|
||||||
The obligations under this Section 9 shall continue to remain in force for a
|
|
||||||
period of five (5) years after the last disclosure, and, with respect to trade
|
|
||||||
secrets, for so long as such trade secrets are protected under applicable trade
|
|
||||||
secret laws.
|
|
||||||
|
|
||||||
10. FEES, DELIVERY AND PAYMENT
|
|
||||||
|
|
||||||
10.1 License Fees
|
|
||||||
|
|
||||||
License Fees are described in The Qt Company's standard price list, quote or
|
|
||||||
Purchase Order confirmation or in an appendix hereto, as the case may be.
|
|
||||||
|
|
||||||
The License Fees shall not be refunded or claimed as a credit in any event or
|
|
||||||
for any reason whatsoever.
|
|
||||||
|
|
||||||
10.2 Ordering Licenses
|
|
||||||
|
|
||||||
Licensee may purchase Development Licenses and Distribution Licenses pursuant
|
|
||||||
to agreed pricing terms or, if no specific pricing terms have been agreed upon,
|
|
||||||
at The Qt Company's standard pricing terms applicable at the time of purchase.
|
|
||||||
|
|
||||||
Licensee shall submit all purchase orders for Development Licenses and
|
|
||||||
Distribution Licenses to The Qt Company by email or any other method acceptable
|
|
||||||
to The Qt Company (each such order is referred to herein as a "Purchase Order")
|
|
||||||
for confirmation, whereupon the Purchase Order shall become binding between the
|
|
||||||
Parties.
|
|
||||||
|
|
||||||
10.3 Distribution License Packs
|
|
||||||
|
|
||||||
Unless otherwise agreed, Distribution Licenses shall be purchased by way of
|
|
||||||
Distribution License Packs.
|
|
||||||
|
|
||||||
Upon due payment of the ordered Distribution License Pack(s), the Licensee will
|
|
||||||
have an account of Distribution Licenses available for installing, bundling or
|
|
||||||
integrating (all jointly "installing") the Redistributables with the Devices or
|
|
||||||
for otherwise distributing the Redistributables in accordance with this
|
|
||||||
Agreement.
|
|
||||||
|
|
||||||
Each time Licensee "installs" or distributes a copy of Redistributables, then
|
|
||||||
one Distribution License is used, and Licensee's account of available
|
|
||||||
Distribution Licenses is decreased accordingly.
|
|
||||||
|
|
||||||
Licensee may "install" copies of the Redistributables so long as Licensee has
|
|
||||||
Distribution Licenses remaining on its account.
|
|
||||||
|
|
||||||
Redistributables will be deemed to have been "installed" into a Device when one
|
|
||||||
of the following circumstances shall have occurred: a) the Redistributables
|
|
||||||
have been loaded onto the Device and used outside of the Licensee's premises or
|
|
||||||
b) the Device has been fully tested and placed into Licensee's inventory
|
|
||||||
(or sold) for the first time (i.e., Licensee will not be required to use
|
|
||||||
(or pay for) more than one Distribution License for each individual Device,
|
|
||||||
e.g. in a situation where a Device is returned to Licensee's inventory after
|
|
||||||
delivery to a distributor or sale to a Customer). In addition, if Licensee
|
|
||||||
includes a back-up copy of the Redistributables on a CD-ROM or other storage
|
|
||||||
medium along with the product, that backup copy of the Redistributables will
|
|
||||||
not be deemed to have been "installed" and will not require an additional
|
|
||||||
Distribution License.
|
|
||||||
|
|
||||||
10.4 Payment Terms
|
|
||||||
|
|
||||||
License Fees and any other charges under this Agreement shall be paid by
|
|
||||||
Licensee no later than thirty (30) days from the date of the applicable invoice
|
|
||||||
from The Qt Company.
|
|
||||||
|
|
||||||
The Qt Company will submit an invoice to Licensee after the date of this
|
|
||||||
Agreement and/or after The Qt Company receives a Purchase Order from
|
|
||||||
Licensee.
|
|
||||||
|
|
||||||
A late payment charge of the lower of (a) one percent per month; or (b) the
|
|
||||||
interest rate stipulated by applicable law, shall be charged on any unpaid
|
|
||||||
balances that remain past due.
|
|
||||||
|
|
||||||
The Qt Company shall have the right to suspend, terminate or withhold grants
|
|
||||||
of all rights to the Licensed Software hereunder, including but not limited to
|
|
||||||
the Developer License, Distribution License, and Support, should Licensee fail
|
|
||||||
to make payment in timely fashion.
|
|
||||||
|
|
||||||
10.5 Taxes
|
|
||||||
|
|
||||||
All License Fees and other charges payable hereunder are gross amounts but
|
|
||||||
exclusive of any value added tax, use tax, sales tax and other taxes, duties or
|
|
||||||
tariffs ("Taxes"). Such applicable Taxes shall be paid by Licensee, or, where
|
|
||||||
applicable, in lieu of payment of such Taxes, Licensee shall provide an
|
|
||||||
exemption certificate to The Qt Company and any applicable authority.
|
|
||||||
|
|
||||||
11 RECORD-KEEPING AND REPORTING OBLIGATIONS; AUDIT RIGHTS
|
|
||||||
|
|
||||||
11.1 Licensee's Record-keeping
|
|
||||||
|
|
||||||
Licensee shall at all times maintain accurate and up-to-date written records of
|
|
||||||
Licensee's activities related to the use of Licensed Software and distribution
|
|
||||||
of Redistributables. The records shall be adequate to determine Licensee's
|
|
||||||
compliance with the provisions of this Agreement and to demonstrate the number
|
|
||||||
of Designated Users and Redistributables distributed by Licensee. The records
|
|
||||||
shall conform to good accounting practices reasonably acceptable to The Qt
|
|
||||||
Company.
|
|
||||||
|
|
||||||
Licensee shall, within thirty (30) days from receiving The Qt Company's request
|
|
||||||
to that effect, deliver to The Qt Company a report on Licensee's usage of
|
|
||||||
Licensed Software, such report to copies of Redistributables distributed by
|
|
||||||
Licensee during that calendar quarter, and also detailing the number of
|
|
||||||
undistributed copies of Redistributables made by Licensee and remaining in its
|
|
||||||
account contain information, in sufficient detail, on (i) amount of users
|
|
||||||
working with Licensed Software, (ii) copies of Redistributables distributed by
|
|
||||||
Licensee during that calendar quarter, (iii) number of undistributed copies of
|
|
||||||
Redistributables and corresponding number of unused Distribution Licenses
|
|
||||||
remaining on Licensee's account, and (iv) any other information as The Qt
|
|
||||||
Company may reasonably require from time to time.
|
|
||||||
|
|
||||||
11.2. The Qt Company's Audit Rights
|
|
||||||
|
|
||||||
The Qt Company or an independent auditor acting on behalf of The Qt Company's,
|
|
||||||
may, upon at least five (5) business days' prior written notice and at its
|
|
||||||
expense, audit Licensee with respect to the use of the Redistributables, but
|
|
||||||
not more frequently than once during each 6-month period. Such audit may be
|
|
||||||
conducted by mail, electronic means or through an in-person visit to Licensee's
|
|
||||||
place of business. Any such in-person audit shall be conducted during regular
|
|
||||||
business hours at Licensee's facilities and shall not unreasonably interfere
|
|
||||||
with Licensee's business activities. The Qt Company or the independent auditor
|
|
||||||
acting on behalf of The Qt Company shall be entitled to inspect Licensee's
|
|
||||||
Records. All such Licensee's Records and use thereof shall be subject to an
|
|
||||||
obligation of confidentiality under this Agreement.
|
|
||||||
|
|
||||||
If an audit reveals that Licensee is using the Licensed Software beyond scope
|
|
||||||
of the licenses Licensee has paid for, Licensee agrees to immediately pay The
|
|
||||||
Qt Company any amounts owed for such unauthorized use.
|
|
||||||
|
|
||||||
In addition, in the event the audit reveals a material violation of the terms
|
|
||||||
of this Agreement (underpayment of more than 5% of License Fees shall always be
|
|
||||||
deemed a material violation for purposes of this section), then the Licensee
|
|
||||||
shall pay The Qt Company's reasonable cost of conducting such audit.
|
|
||||||
|
|
||||||
12 TERM AND TERMINATION
|
|
||||||
|
|
||||||
12.1 Term
|
|
||||||
|
|
||||||
This Agreement shall enter into force upon due acceptance by both Parties and
|
|
||||||
remain in force for as long as there is any Development License(s) in force
|
|
||||||
("Term"), unless and until terminated pursuant to the terms of this Section 12.
|
|
||||||
|
|
||||||
12.2 Termination by The Qt Company
|
|
||||||
|
|
||||||
The Qt Company shall have the right to terminate this Agreement upon thirty
|
|
||||||
(30) days prior written notice if the Licensee is in material breach of any
|
|
||||||
obligation of this Agreement and fails to remedy such breach within such notice
|
|
||||||
period.
|
|
||||||
|
|
||||||
12.3 Mutual Right to Terminate
|
|
||||||
|
|
||||||
Either Party shall have the right to terminate this Agreement immediately upon
|
|
||||||
written notice in the event that the other Party becomes insolvent, files for
|
|
||||||
any form of bankruptcy, makes any assignment for the benefit of creditors, has
|
|
||||||
a receiver, administrative receiver or officer appointed over the whole or a
|
|
||||||
substantial part of its assets, ceases to conduct business, or an act
|
|
||||||
equivalent to any of the above occurs under the laws of the jurisdiction of the
|
|
||||||
other Party.
|
|
||||||
|
|
||||||
12.4 Parties' Rights and Duties upon Termination
|
|
||||||
|
|
||||||
Upon expiry or termination of the Agreement Licensee shall cease and shall
|
|
||||||
cause all Designated Users (including those of its Affiliates' and
|
|
||||||
Contractors') to cease using the Licensed Software and distribution of the
|
|
||||||
Redistributables under this Agreement.
|
|
||||||
|
|
||||||
Notwithstanding the above, in the event the Agreement expires or is terminated:
|
|
||||||
|
|
||||||
(i) as a result of The Qt Company choosing not to renew the Development
|
|
||||||
License(s) as set forth in Section 3.1, then all valid licenses possessed by
|
|
||||||
the Licensee at such date shall be extended to be valid in perpetuity under the
|
|
||||||
terms of this Agreement and Licensee is entitled to purchase additional
|
|
||||||
licenses as set forth in Section 10.2; or
|
|
||||||
|
|
||||||
(ii) for reason other than by The Qt Company pursuant to item (i) above or
|
|
||||||
pursuant to Section 12.2, then the Licensee is entitled, for a period of six
|
|
||||||
(6) months after the effective date of termination, to continue distribution of
|
|
||||||
Devices under the Distribution Licenses paid but unused at such effective date
|
|
||||||
of termination.
|
|
||||||
|
|
||||||
Upon any such termination the Licensee shall destroy or return to The Qt
|
|
||||||
Company all copies of the Licensed Software and all related materials and will
|
|
||||||
certify the same to The Qt Company upon its request, provided however that
|
|
||||||
Licensee may retain and exploit such copies of the Licensed Software as it may
|
|
||||||
reasonably require in providing continued support to Customers.
|
|
||||||
|
|
||||||
Expiry or termination of this Agreement for any reason whatsoever shall not
|
|
||||||
relieve Licensee of its obligation to pay any License Fees accrued or payable
|
|
||||||
to The Qt Company prior to the effective date of termination, and Licensee
|
|
||||||
shall immediately pay to The Qt Company all such fees upon the effective date
|
|
||||||
of termination. Termination of this Agreement shall not affect any rights of
|
|
||||||
Customers to continue use of Applications and Devices (and therein incorporated
|
|
||||||
Redistributables).
|
|
||||||
|
|
||||||
12.5 Extension in case of bankruptcy
|
|
||||||
|
|
||||||
In the event The Qt Company is declared bankrupt under a final, non-cancellable
|
|
||||||
decision by relevant court of law, and this Agreement is not, at the date of
|
|
||||||
expiry of the Development License(s) pursuant to Section 3.1, assigned to
|
|
||||||
party, who has assumed The Qt Company's position as a legitimate licensor of
|
|
||||||
Licensed Software under this Agreement, then all valid licenses possessed by
|
|
||||||
the Licensee at such date of expiry, and which the Licensee has not notified
|
|
||||||
for expiry, shall be extended to be valid in perpetuity under the terms of
|
|
||||||
this Agreement.
|
|
||||||
|
|
||||||
13. GOVERNING LAW AND LEGAL VENUE
|
|
||||||
|
|
||||||
In the event this Agreement is in the name of The Qt Company Inc., a Delaware
|
|
||||||
Corporation, then:
|
|
||||||
|
|
||||||
(i) this Agreement shall be construed and interpreted in accordance with the
|
|
||||||
laws of the State of California, USA, excluding its choice of law provisions;
|
|
||||||
|
|
||||||
(ii) the United Nations Convention on Contracts for the International Sale of
|
|
||||||
Goods will not apply to this Agreement; and
|
|
||||||
|
|
||||||
(iii) any dispute, claim or controversy arising out of or relating to this
|
|
||||||
Agreement or the breach, termination, enforcement, interpretation or validity
|
|
||||||
thereof, including the determination of the scope or applicability of this
|
|
||||||
Agreement to arbitrate, shall be determined by arbitration in San Francisco,
|
|
||||||
USA, before one arbitrator. The arbitration shall be administered by JAMS
|
|
||||||
pursuant to JAMS' Streamlined Arbitration Rules and Procedures. Judgment on the
|
|
||||||
Award may be entered in any court having jurisdiction. This Section shall not
|
|
||||||
preclude parties from seeking provisional remedies in aid of arbitration from a
|
|
||||||
court of appropriate jurisdiction.
|
|
||||||
|
|
||||||
In the event this Agreement is in the name of The Qt Company Ltd., a Finnish
|
|
||||||
Company, then:
|
|
||||||
|
|
||||||
(i) this Agreement shall be construed and interpreted in accordance with the
|
|
||||||
laws of Finland, excluding its choice of law provisions;
|
|
||||||
|
|
||||||
(ii) the United Nations Convention on Contracts for the International Sale of
|
|
||||||
Goods will not apply to this Agreement; and
|
|
||||||
|
|
||||||
(iii) any disputes, controversy or claim arising out of or relating to this
|
|
||||||
Agreement, or the breach, termination or validity thereof shall be shall be
|
|
||||||
finally settled by arbitration in accordance with the Arbitration Rules of
|
|
||||||
Finland Chamber of Commerce. The arbitration tribunal shall consist of one (1),
|
|
||||||
or if either Party so requires, of three (3), arbitrators. The award shall be
|
|
||||||
final and binding and enforceable in any court of competent jurisdiction. The
|
|
||||||
arbitration shall be held in Helsinki, Finland and the process shall be
|
|
||||||
conducted in the English language. This Section shall not preclude parties from
|
|
||||||
seeking provisional remedies in aid of arbitration from a court of appropriate
|
|
||||||
jurisdiction.
|
|
||||||
|
|
||||||
14. GENERAL PROVISIONS
|
|
||||||
|
|
||||||
14.1 No Assignment
|
|
||||||
|
|
||||||
Except in the case of a merger or sale of substantially all of its corporate
|
|
||||||
assets, Licensee shall not be entitled to assign or transfer all or any of its
|
|
||||||
rights, benefits and obligations under this Agreement without the prior written
|
|
||||||
consent of The Qt Company, which shall not be unreasonably withheld or delayed.
|
|
||||||
The Qt Company shall be entitled to freely assign or transfer any of its
|
|
||||||
rights, benefits or obligations under this Agreement.
|
|
||||||
|
|
||||||
14.2 No Third Party Representations
|
|
||||||
|
|
||||||
Licensee shall make no representations or warranties concerning the Licensed
|
|
||||||
Software on behalf of The Qt Company. Any representation or warranty Licensee
|
|
||||||
makes or purports to make on The Qt Company's behalf shall be void as to The
|
|
||||||
Qt Company.
|
|
||||||
|
|
||||||
14.3 Surviving Sections
|
|
||||||
|
|
||||||
Any terms and conditions that by their nature or otherwise reasonably should
|
|
||||||
survive termination of this Agreement shall so be deemed to survive.
|
|
||||||
|
|
||||||
14.4 Entire Agreement
|
|
||||||
|
|
||||||
This Agreement, the exhibits hereto, the License Certificate and any applicable
|
|
||||||
Purchase Order constitute the complete agreement between the Parties and
|
|
||||||
supersedes all prior or contemporaneous discussions, representations, and
|
|
||||||
proposals, written or oral, with respect to the subject matters discussed
|
|
||||||
herein.
|
|
||||||
|
|
||||||
In the event of any conflict or inconsistency between this Agreement and any
|
|
||||||
Purchase Order, the terms of this Agreement will prevail over the terms of the
|
|
||||||
Purchase Order with respect to such conflict or inconsistency.
|
|
||||||
|
|
||||||
Parties specifically acknowledge and agree that this Agreement prevails over
|
|
||||||
any click-to-accept or similar agreements the Designated Users may need to
|
|
||||||
accept online upon download of the Licensed Software, as may be required by
|
|
||||||
The Qt Company's applicable processes relating to Licensed Software.
|
|
||||||
|
|
||||||
14.5 Modifications
|
|
||||||
|
|
||||||
No modification of this Agreement shall be effective unless contained in a
|
|
||||||
writing executed by an authorized representative of each Party. No term or
|
|
||||||
condition contained in Licensee's Purchase Order shall apply unless expressly
|
|
||||||
accepted by The Qt Company in writing.
|
|
||||||
|
|
||||||
14.6 Force Majeure
|
|
||||||
|
|
||||||
Except for the payment obligations hereunder, neither Party shall be liable to
|
|
||||||
the other for any delay or non-performance of its obligations hereunder in the
|
|
||||||
event and to the extent that such delay or non-performance is due to an event
|
|
||||||
of act of God, terrorist attack or other similar unforeseeable catastrophic
|
|
||||||
event that prevents either Party for fulfilling its obligations under this
|
|
||||||
Agreement and which such Party cannot avoid or circumvent ("Force Majeure
|
|
||||||
Event"). If the Force Majeure Event results in a delay or non-performance of a
|
|
||||||
Party for a period of three (3) months or longer, then either Party shall have
|
|
||||||
the right to terminate this Agreement with immediate effect without any
|
|
||||||
liability (except for the obligations of payment arising prior to the event of
|
|
||||||
Force Majeure) towards the other Party.
|
|
||||||
|
|
||||||
14.7 Notices
|
|
||||||
|
|
||||||
Any notice given by one Party to the other shall be deemed properly given and
|
|
||||||
deemed received if specifically acknowledged by the receiving Party in writing
|
|
||||||
or when successfully delivered to the recipient by hand, fax, or special
|
|
||||||
courier during normal business hours on a business day to the addresses
|
|
||||||
specified for each Party on the signature page. Each communication and document
|
|
||||||
made or delivered by one Party to the other Party pursuant to this Agreement
|
|
||||||
shall be in the English language.
|
|
||||||
|
|
||||||
14.8 Export Control
|
|
||||||
|
|
||||||
Licensee acknowledges that the Redistributables may be subject to export
|
|
||||||
control restrictions under the applicable laws of respective countries.
|
|
||||||
Licensee shall fully comply with all applicable export license restrictions
|
|
||||||
and requirements as well as with all laws and regulations relating to the
|
|
||||||
Redistributables and exercise of licenses hereunder and shall procure all
|
|
||||||
necessary governmental authorizations, including without limitation, all
|
|
||||||
necessary licenses, approvals, permissions or consents, where necessary for the
|
|
||||||
re-exportation of the Redistributables, Applications and/or Devices.
|
|
||||||
|
|
||||||
14.9 No Implied License
|
|
||||||
|
|
||||||
There are no implied licenses or other implied rights granted under this
|
|
||||||
Agreement, and all rights, save for those expressly granted hereunder, shall
|
|
||||||
remain with The Qt Company and its licensors. In addition, no licenses or
|
|
||||||
immunities are granted to the combination of the Licensed Software with any
|
|
||||||
other software or hardware not delivered by The Qt Company under this Agreement.
|
|
||||||
|
|
||||||
14.10 Attorney Fees
|
|
||||||
|
|
||||||
The prevailing Party in any action to enforce this Agreement shall be entitled
|
|
||||||
to recover its attorney's fees and costs in connection with such action.
|
|
||||||
|
|
||||||
14.11 Severability
|
|
||||||
|
|
||||||
If any provision of this Agreement shall be adjudged by any court of competent
|
|
||||||
jurisdiction to be unenforceable or invalid, that provision shall be limited or
|
|
||||||
eliminated to the minimum extent necessary so that this Agreement shall
|
|
||||||
otherwise remain in full force and effect and enforceable.
|
|
||||||
|
|
||||||
|
|
||||||
IN WITNESS WHEREOF, the Parties hereto, intending to be legally bound hereby,
|
|
||||||
have caused this Agreement to be executed by Licensee's authorized
|
|
||||||
representative installing the Licensed Software and accepting the terms
|
|
||||||
hereof in connection therewith.
|
|
||||||
|
|
||||||
|
|
||||||
Appendix 1
|
|
||||||
|
|
||||||
1. Parts of the Licensed Software that are permitted for distribution in
|
|
||||||
object code form only ("Redistributables") under this Agreement:
|
|
||||||
|
|
||||||
- The Licensed Software's Qt Essentials and Qt Add-on libraries
|
|
||||||
- The Licensed Software's configuration tool ("qtconfig")
|
|
||||||
- The Licensed Software's help tool ("Qt Assistant")
|
|
||||||
- The Licensed Software's internationalization tools ("Qt Linguist", "lupdate",
|
|
||||||
"lrelease")
|
|
||||||
- The Licensed Software's QML ("Qt Quick") launcher tool ("qmlscene" or
|
|
||||||
"qmlviewer")
|
|
||||||
- The Licensed Software's installer framework
|
|
||||||
|
|
||||||
2. Parts of the Licensed Software that are not permitted for distribution
|
|
||||||
include, but are not limited to:
|
|
||||||
|
|
||||||
- The Licensed Software's source code and header files
|
|
||||||
- The Licensed Software's documentation
|
|
||||||
- The Licensed Software's documentation generation tool ("qdoc")
|
|
||||||
- The Licensed Software's tool for writing makefiles ("qmake")
|
|
||||||
- The Licensed Software's Meta Object Compiler ("moc")
|
|
||||||
- The Licensed Software's User Interface Compiler ("uic")
|
|
||||||
- The Licensed Software's Resource Compiler ("rcc")
|
|
||||||
- The Licensed Software's parts of the IDE tool ("Qt Creator")
|
|
||||||
- The Licensed Software's parts of the Design tools ("Qt 3D Studio" or
|
|
||||||
"Qt Quick Designer")
|
|
||||||
- The Licensed Software's Emulator
|
|
1285
LICENSE.QT-LICENSE-AGREEMENT-4.2
Normal file
1285
LICENSE.QT-LICENSE-AGREEMENT-4.2
Normal file
File diff suppressed because it is too large
Load Diff
@ -72,7 +72,7 @@ defineReplace(qtConfFunc_licenseCheck) {
|
|||||||
hasOpenSource = true
|
hasOpenSource = true
|
||||||
else: \
|
else: \
|
||||||
hasOpenSource = false
|
hasOpenSource = false
|
||||||
exists($$QT_SOURCE_TREE/LICENSE.QT-LICENSE-AGREEMENT-4.0): \
|
exists($$QT_SOURCE_TREE/LICENSE.QT-LICENSE-AGREEMENT): \
|
||||||
hasCommercial = true
|
hasCommercial = true
|
||||||
else: \
|
else: \
|
||||||
hasCommercial = false
|
hasCommercial = false
|
||||||
@ -202,7 +202,7 @@ defineReplace(qtConfFunc_licenseCheck) {
|
|||||||
affix = either
|
affix = either
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
theLicense = $$cat($$QT_SOURCE_TREE/LICENSE.QT-LICENSE-AGREEMENT-4.0, lines)
|
theLicense = $$cat($$QT_SOURCE_TREE/LICENSE.QT-LICENSE-AGREEMENT, lines)
|
||||||
theLicense = $$first(theLicense)
|
theLicense = $$first(theLicense)
|
||||||
showWhat = "Type '?' to view the $${theLicense}."
|
showWhat = "Type '?' to view the $${theLicense}."
|
||||||
}
|
}
|
||||||
@ -229,7 +229,7 @@ defineReplace(qtConfFunc_licenseCheck) {
|
|||||||
} else: equals(val, n)|equals(val, no) {
|
} else: equals(val, n)|equals(val, no) {
|
||||||
return(false)
|
return(false)
|
||||||
} else: equals(commercial, yes):equals(val, ?) {
|
} else: equals(commercial, yes):equals(val, ?) {
|
||||||
licenseFile = $$QT_SOURCE_TREE/LICENSE.QT-LICENSE-AGREEMENT-4.0
|
licenseFile = $$QT_SOURCE_TREE/LICENSE.QT-LICENSE-AGREEMENT
|
||||||
} else: equals(commercial, no):equals(val, l) {
|
} else: equals(commercial, no):equals(val, l) {
|
||||||
licenseFile = $$QT_SOURCE_TREE/LICENSE.LGPL3
|
licenseFile = $$QT_SOURCE_TREE/LICENSE.LGPL3
|
||||||
} else: equals(commercial, no):equals(val, g):$$gpl2Ok {
|
} else: equals(commercial, no):equals(val, g):$$gpl2Ok {
|
||||||
|
53
dist/changes-5.12.6
vendored
Normal file
53
dist/changes-5.12.6
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
Qt 5.12.6 is a bug-fix release. It maintains both forward and backward
|
||||||
|
compatibility (source and binary) with Qt 5.12.0 through 5.12.5.
|
||||||
|
|
||||||
|
For more details, refer to the online documentation included in this
|
||||||
|
distribution. The documentation is also available online:
|
||||||
|
|
||||||
|
https://doc.qt.io/qt-5/index.html
|
||||||
|
|
||||||
|
The Qt version 5.12 series is binary compatible with the 5.11.x series.
|
||||||
|
Applications compiled for 5.11 will continue to run with 5.12.
|
||||||
|
|
||||||
|
Some of the changes listed in this file include issue tracking numbers
|
||||||
|
corresponding to tasks in the Qt Bug Tracker:
|
||||||
|
|
||||||
|
https://bugreports.qt.io/
|
||||||
|
|
||||||
|
Each of these identifiers can be entered in the bug tracker to obtain more
|
||||||
|
information about a particular change.
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* QtCore *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
- QLocale:
|
||||||
|
* The system locale's UI languages list now includes, as for that of an
|
||||||
|
ordinary locale, the results of adding likely sub-tags from each
|
||||||
|
locale name, and of removing some, where this doesn't change which
|
||||||
|
locale is specified. This gives searches for translation files a
|
||||||
|
better chance of finding a suitable file.
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* Windows *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
- Text:
|
||||||
|
* [QTBUG-57180] Removed confusing DirectWrite warning when loading
|
||||||
|
bitmap fonts.
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* Android *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
- Fixed regression that made it impossible for an application to use the
|
||||||
|
tap-and-hold gesture.
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* Third-Party Code *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
- libjpeg-turbo was updated to version 2.0.3
|
||||||
|
|
||||||
|
- QtSQL
|
||||||
|
* Updated sqlite to v3.29.0
|
25
dist/changes-5.12.7
vendored
Normal file
25
dist/changes-5.12.7
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
Qt 5.12.7 is a bug-fix release. It maintains both forward and backward
|
||||||
|
compatibility (source and binary) with Qt 5.12.0 through 5.12.6.
|
||||||
|
|
||||||
|
For more details, refer to the online documentation included in this
|
||||||
|
distribution. The documentation is also available online:
|
||||||
|
|
||||||
|
https://doc.qt.io/qt-5/index.html
|
||||||
|
|
||||||
|
The Qt version 5.12 series is binary compatible with the 5.11.x series.
|
||||||
|
Applications compiled for 5.11 will continue to run with 5.12.
|
||||||
|
|
||||||
|
Some of the changes listed in this file include issue tracking numbers
|
||||||
|
corresponding to tasks in the Qt Bug Tracker:
|
||||||
|
|
||||||
|
https://bugreports.qt.io/
|
||||||
|
|
||||||
|
Each of these identifiers can be entered in the bug tracker to obtain more
|
||||||
|
information about a particular change.
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* QtSQL *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
- sqlite:
|
||||||
|
* Updated to v3.30.1
|
@ -3,7 +3,7 @@
|
|||||||
dita.metadata.default.author = Qt Project
|
dita.metadata.default.author = Qt Project
|
||||||
dita.metadata.default.permissions = all
|
dita.metadata.default.permissions = all
|
||||||
dita.metadata.default.publisher = Qt Project
|
dita.metadata.default.publisher = Qt Project
|
||||||
dita.metadata.default.copyryear = 2019
|
dita.metadata.default.copyryear = 2020
|
||||||
dita.metadata.default.copyrholder = The Qt Company Ltd
|
dita.metadata.default.copyrholder = The Qt Company Ltd
|
||||||
dita.metadata.default.audience = programmer
|
dita.metadata.default.audience = programmer
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ HTML.footer += \
|
|||||||
" <ul id=\"menu-footer-submenu\" class=\"right clearfix\"><li id=\"menu-item-1795\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1795\"><a title=\"Sign into your account.\" href=\"https://account.qt.io/login\">Sign In</a></li>\n" \
|
" <ul id=\"menu-footer-submenu\" class=\"right clearfix\"><li id=\"menu-item-1795\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1795\"><a title=\"Sign into your account.\" href=\"https://account.qt.io/login\">Sign In</a></li>\n" \
|
||||||
" <li id=\"menu-item-10375\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-10375\"><a href=\"mailto:feedback@theqtcompany.com?Subject=Feedback%20about%20doc.qt.io%20site\">Feedback</a></li>\n" \
|
" <li id=\"menu-item-10375\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-10375\"><a href=\"mailto:feedback@theqtcompany.com?Subject=Feedback%20about%20doc.qt.io%20site\">Feedback</a></li>\n" \
|
||||||
" <li id=\"menu-item-1494\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-1494\"><a href=\"http://qt.io/contact-us/\">Contact us</a></li>\n" \
|
" <li id=\"menu-item-1494\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-1494\"><a href=\"http://qt.io/contact-us/\">Contact us</a></li>\n" \
|
||||||
" <li id=\"menu-item-4472\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-4472\"><a href=\"http://qt.io/about-us/\">© 2019 The Qt Company</a></li>\n" \
|
" <li id=\"menu-item-4472\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-4472\"><a href=\"http://qt.io/about-us/\">© 2020 The Qt Company</a></li>\n" \
|
||||||
" </ul>\n" \
|
" </ul>\n" \
|
||||||
"</div>\n" \
|
"</div>\n" \
|
||||||
"</div>\n" \
|
"</div>\n" \
|
||||||
|
@ -8,7 +8,7 @@ HTML.footer = \
|
|||||||
"</div>\n" \
|
"</div>\n" \
|
||||||
"<div class=\"footer\">\n" \
|
"<div class=\"footer\">\n" \
|
||||||
" <p>\n" \
|
" <p>\n" \
|
||||||
" <acronym title=\"Copyright\">©</acronym> 2019 The Qt Company Ltd.\n" \
|
" <acronym title=\"Copyright\">©</acronym> 2020 The Qt Company Ltd.\n" \
|
||||||
" Documentation contributions included herein are the copyrights of\n" \
|
" Documentation contributions included herein are the copyrights of\n" \
|
||||||
" their respective owners.<br/>" \
|
" their respective owners.<br/>" \
|
||||||
" The documentation provided herein is licensed under the terms of the" \
|
" The documentation provided herein is licensed under the terms of the" \
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
HTML.footer = \
|
HTML.footer = \
|
||||||
" </div>\n" \
|
" </div>\n" \
|
||||||
" <p class=\"copy-notice\">\n" \
|
" <p class=\"copy-notice\">\n" \
|
||||||
" <acronym title=\"Copyright\">©</acronym> 2019 The Qt Company Ltd.\n" \
|
" <acronym title=\"Copyright\">©</acronym> 2020 The Qt Company Ltd.\n" \
|
||||||
" Documentation contributions included herein are the copyrights of\n" \
|
" Documentation contributions included herein are the copyrights of\n" \
|
||||||
" their respective owners. " \
|
" their respective owners. " \
|
||||||
" The documentation provided herein is licensed under the terms of the" \
|
" The documentation provided herein is licensed under the terms of the" \
|
||||||
|
@ -228,7 +228,8 @@ mac {
|
|||||||
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
|
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
|
||||||
} else {
|
} else {
|
||||||
qt_framework {
|
qt_framework {
|
||||||
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}_debug
|
# Intentionally there is no '_debug' infix for framework builds.
|
||||||
|
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
||||||
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
||||||
CMAKE_BUILD_IS_FRAMEWORK = "true"
|
CMAKE_BUILD_IS_FRAMEWORK = "true"
|
||||||
} else {
|
} else {
|
||||||
|
@ -97,21 +97,22 @@ macx-xcode {
|
|||||||
qmake_pkginfo_typeinfo.value = "????"
|
qmake_pkginfo_typeinfo.value = "????"
|
||||||
QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo
|
QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo
|
||||||
|
|
||||||
!isEmpty(VERSION) {
|
bundle_version = $$VERSION
|
||||||
l = $$split(VERSION, '.') 0 0 # make sure there are at least three
|
isEmpty(bundle_version): bundle_version = 1.0.0
|
||||||
VER_MAJ = $$member(l, 0, 0)
|
|
||||||
VER_MIN = $$member(l, 1, 1)
|
|
||||||
VER_PAT = $$member(l, 2, 2)
|
|
||||||
unset(l)
|
|
||||||
|
|
||||||
qmake_full_version.name = QMAKE_FULL_VERSION
|
l = $$split(bundle_version, '.') 0 0 # make sure there are at least three
|
||||||
qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
|
VER_MAJ = $$member(l, 0, 0)
|
||||||
QMAKE_MAC_XCODE_SETTINGS += qmake_full_version
|
VER_MIN = $$member(l, 1, 1)
|
||||||
|
VER_PAT = $$member(l, 2, 2)
|
||||||
|
unset(l)
|
||||||
|
|
||||||
qmake_short_version.name = QMAKE_SHORT_VERSION
|
qmake_full_version.name = QMAKE_FULL_VERSION
|
||||||
qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}
|
qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
|
||||||
QMAKE_MAC_XCODE_SETTINGS += qmake_short_version
|
QMAKE_MAC_XCODE_SETTINGS += qmake_full_version
|
||||||
}
|
|
||||||
|
qmake_short_version.name = QMAKE_SHORT_VERSION
|
||||||
|
qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}
|
||||||
|
QMAKE_MAC_XCODE_SETTINGS += qmake_short_version
|
||||||
|
|
||||||
!isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
|
!isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
|
||||||
debug_information_format.name = DEBUG_INFORMATION_FORMAT
|
debug_information_format.name = DEBUG_INFORMATION_FORMAT
|
||||||
|
@ -821,9 +821,9 @@ defineTest(qtConfLibrary_pkgConfig) {
|
|||||||
!qtConfResolveLibs($${1}.libs, $$libs): \
|
!qtConfResolveLibs($${1}.libs, $$libs): \
|
||||||
return(false)
|
return(false)
|
||||||
contains($${1}.libs, ".*\\.$${QMAKE_EXTENSION_STATICLIB}$") {
|
contains($${1}.libs, ".*\\.$${QMAKE_EXTENSION_STATICLIB}$") {
|
||||||
qtRunLoggedCommand("$$pkg_config --static --libs-only-L $$args", libpaths)|return(false)
|
qtRunLoggedCommand("$$pkg_config --static --libs $$args", libs)|return(false)
|
||||||
qtRunLoggedCommand("$$pkg_config --static --libs-only-l $$args", libs)|return(false)
|
# Split by space
|
||||||
eval(libs = $$libpaths $$libs)
|
eval(libs = $$libs)
|
||||||
!qtConfResolveLibs($${1}.libs, $$libs): \
|
!qtConfResolveLibs($${1}.libs, $$libs): \
|
||||||
return(false)
|
return(false)
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
QMAKE_TARGET_COMPANY = The Qt Company Ltd.
|
QMAKE_TARGET_COMPANY = The Qt Company Ltd.
|
||||||
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
|
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
|
||||||
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
|
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
|
||||||
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2019 The Qt Company Ltd.
|
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
@ -9,7 +9,7 @@ uic.depend_command = $$QMAKE_UIC_DEP -d ${QMAKE_FILE_IN}
|
|||||||
uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||||
uic.input = FORMS
|
uic.input = FORMS
|
||||||
uic.variable_out = GENERATED_FILES
|
uic.variable_out = GENERATED_FILES
|
||||||
uic.CONFIG += no_link target_predeps dep_lines
|
uic.CONFIG += no_link target_predeps dep_lines dep_existing_only
|
||||||
uic.name = UIC ${QMAKE_FILE_IN}
|
uic.name = UIC ${QMAKE_FILE_IN}
|
||||||
silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands
|
silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands
|
||||||
QMAKE_EXTRA_COMPILERS += uic
|
QMAKE_EXTRA_COMPILERS += uic
|
||||||
|
@ -27,7 +27,7 @@ QOBJS = \
|
|||||||
qjsonarray.o qjson.o qjsondocument.o qjsonobject.o qjsonparser.o qjsonvalue.o \
|
qjsonarray.o qjson.o qjsondocument.o qjsonobject.o qjsonparser.o qjsonvalue.o \
|
||||||
qmetatype.o qsystemerror.o qvariant.o \
|
qmetatype.o qsystemerror.o qvariant.o \
|
||||||
quuid.o \
|
quuid.o \
|
||||||
qarraydata.o qbitarray.o qbytearray.o qbytearraymatcher.o \
|
qarraydata.o qbitarray.o qbytearray.o qbytearraylist.o qbytearraymatcher.o \
|
||||||
qcryptographichash.o qdatetime.o qhash.o qlinkedlist.o qlist.o \
|
qcryptographichash.o qdatetime.o qhash.o qlinkedlist.o qlist.o \
|
||||||
qlocale.o qlocale_tools.o qmap.o qregexp.o qringbuffer.o \
|
qlocale.o qlocale_tools.o qmap.o qregexp.o qringbuffer.o \
|
||||||
qstringbuilder.o qstring_compat.o qstring.o qstringlist.o qversionnumber.o \
|
qstringbuilder.o qstring_compat.o qstring.o qstringlist.o qversionnumber.o \
|
||||||
@ -108,6 +108,7 @@ DEPEND_SRC = \
|
|||||||
$(SOURCE_PATH)/src/corelib/tools/qarraydata.cpp \
|
$(SOURCE_PATH)/src/corelib/tools/qarraydata.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp \
|
$(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/tools/qbytearray.cpp\
|
$(SOURCE_PATH)/src/corelib/tools/qbytearray.cpp\
|
||||||
|
$(SOURCE_PATH)/src/corelib/tools/qbytearraylist.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/tools/qbytearraymatcher.cpp \
|
$(SOURCE_PATH)/src/corelib/tools/qbytearraymatcher.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/tools/qcryptographichash.cpp \
|
$(SOURCE_PATH)/src/corelib/tools/qcryptographichash.cpp \
|
||||||
$(SOURCE_PATH)/src/corelib/tools/qdatetime.cpp \
|
$(SOURCE_PATH)/src/corelib/tools/qdatetime.cpp \
|
||||||
@ -307,6 +308,9 @@ qarraydata.o: $(SOURCE_PATH)/src/corelib/tools/qarraydata.cpp
|
|||||||
qbytearray.o: $(SOURCE_PATH)/src/corelib/tools/qbytearray.cpp
|
qbytearray.o: $(SOURCE_PATH)/src/corelib/tools/qbytearray.cpp
|
||||||
$(CXX) -c -o $@ $(CXXFLAGS) $<
|
$(CXX) -c -o $@ $(CXXFLAGS) $<
|
||||||
|
|
||||||
|
qbytearraylist.o: $(SOURCE_PATH)/src/corelib/tools/qbytearraylist.cpp
|
||||||
|
$(CXX) -c -o $@ $(CXXFLAGS) $<
|
||||||
|
|
||||||
qvsnprintf.o: $(SOURCE_PATH)/src/corelib/tools/qvsnprintf.cpp
|
qvsnprintf.o: $(SOURCE_PATH)/src/corelib/tools/qvsnprintf.cpp
|
||||||
$(CXX) -c -o $@ $(CXXFLAGS) $<
|
$(CXX) -c -o $@ $(CXXFLAGS) $<
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ QTOBJS= \
|
|||||||
qfsfileengine_iterator.obj \
|
qfsfileengine_iterator.obj \
|
||||||
qarraydata.obj \
|
qarraydata.obj \
|
||||||
qbytearray.obj \
|
qbytearray.obj \
|
||||||
|
qbytearraylist.obj \
|
||||||
qvsnprintf.obj \
|
qvsnprintf.obj \
|
||||||
qbytearraymatcher.obj \
|
qbytearraymatcher.obj \
|
||||||
qdatetime.obj \
|
qdatetime.obj \
|
||||||
|
@ -4728,6 +4728,11 @@
|
|||||||
\li explicit_dependencies
|
\li explicit_dependencies
|
||||||
\li The dependencies for the output only get generated from the depends
|
\li The dependencies for the output only get generated from the depends
|
||||||
member and from nowhere else.
|
member and from nowhere else.
|
||||||
|
\row
|
||||||
|
\li dep_existing_only
|
||||||
|
\li Every dependency that is a result of .depend_command is checked for
|
||||||
|
existence. Non-existing dependencies are ignored.
|
||||||
|
This value was introduced in Qt 5.12.6.
|
||||||
\row
|
\row
|
||||||
\li dep_lines
|
\li dep_lines
|
||||||
\li The output from the .depend_command is interpreted to be one file
|
\li The output from the .depend_command is interpreted to be one file
|
||||||
|
@ -1870,6 +1870,61 @@ QString MakefileGenerator::resolveDependency(const QDir &outDir, const QString &
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MakefileGenerator::callExtraCompilerDependCommand(const ProString &extraCompiler,
|
||||||
|
const QString &dep_cd_cmd,
|
||||||
|
const QString &tmp_dep_cmd,
|
||||||
|
const QString &inpf,
|
||||||
|
const QString &tmp_out,
|
||||||
|
bool dep_lines,
|
||||||
|
QStringList *deps,
|
||||||
|
bool existingDepsOnly,
|
||||||
|
bool checkCommandAvailability)
|
||||||
|
{
|
||||||
|
char buff[256];
|
||||||
|
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, tmp_out, LocalShell);
|
||||||
|
if (checkCommandAvailability && !canExecute(dep_cmd))
|
||||||
|
return;
|
||||||
|
dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd);
|
||||||
|
if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) {
|
||||||
|
QByteArray depData;
|
||||||
|
while (int read_in = feof(proc) ? 0 : (int)fread(buff, 1, 255, proc))
|
||||||
|
depData.append(buff, read_in);
|
||||||
|
QT_PCLOSE(proc);
|
||||||
|
const QString indeps = QString::fromLocal8Bit(depData);
|
||||||
|
if (indeps.isEmpty())
|
||||||
|
return;
|
||||||
|
QDir outDir(Option::output_dir);
|
||||||
|
QStringList dep_cmd_deps = splitDeps(indeps, dep_lines);
|
||||||
|
for (int i = 0; i < dep_cmd_deps.count(); ++i) {
|
||||||
|
QString &file = dep_cmd_deps[i];
|
||||||
|
const QString absFile = outDir.absoluteFilePath(file);
|
||||||
|
if (absFile == file) {
|
||||||
|
// already absolute; don't do any checks.
|
||||||
|
} else if (exists(absFile)) {
|
||||||
|
file = absFile;
|
||||||
|
} else {
|
||||||
|
const QString localFile = resolveDependency(outDir, file);
|
||||||
|
if (localFile.isEmpty()) {
|
||||||
|
if (exists(file)) {
|
||||||
|
warn_msg(WarnDeprecated, ".depend_command for extra compiler %s"
|
||||||
|
" prints paths relative to source directory",
|
||||||
|
extraCompiler.toLatin1().constData());
|
||||||
|
} else if (existingDepsOnly) {
|
||||||
|
file.clear();
|
||||||
|
} else {
|
||||||
|
file = absFile; // fallback for generated resources
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
file = localFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!file.isEmpty())
|
||||||
|
file = fileFixify(file);
|
||||||
|
}
|
||||||
|
deps->append(dep_cmd_deps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||||
{
|
{
|
||||||
@ -1984,6 +2039,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
}
|
}
|
||||||
t << endl;
|
t << endl;
|
||||||
}
|
}
|
||||||
|
const bool existingDepsOnly = config.contains("dep_existing_only");
|
||||||
QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList();
|
QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList();
|
||||||
if (config.indexOf("combine") != -1) {
|
if (config.indexOf("combine") != -1) {
|
||||||
if (tmp_out.contains(QRegExp("(^|[^$])\\$\\{QMAKE_(?!VAR_)"))) {
|
if (tmp_out.contains(QRegExp("(^|[^$])\\$\\{QMAKE_(?!VAR_)"))) {
|
||||||
@ -1999,44 +2055,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
deps += findDependencies(inpf);
|
deps += findDependencies(inpf);
|
||||||
inputs += Option::fixPathToTargetOS(inpf, false);
|
inputs += Option::fixPathToTargetOS(inpf, false);
|
||||||
if(!tmp_dep_cmd.isEmpty() && doDepends()) {
|
if(!tmp_dep_cmd.isEmpty() && doDepends()) {
|
||||||
char buff[256];
|
callExtraCompilerDependCommand(*it, dep_cd_cmd, tmp_dep_cmd, inpf,
|
||||||
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, tmp_out, LocalShell);
|
tmp_out, dep_lines, &deps, existingDepsOnly);
|
||||||
dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd);
|
|
||||||
if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) {
|
|
||||||
QByteArray depData;
|
|
||||||
while (int read_in = feof(proc) ? 0 : (int)fread(buff, 1, 255, proc))
|
|
||||||
depData.append(buff, read_in);
|
|
||||||
QT_PCLOSE(proc);
|
|
||||||
const QString indeps = QString::fromLocal8Bit(depData);
|
|
||||||
if(!indeps.isEmpty()) {
|
|
||||||
QDir outDir(Option::output_dir);
|
|
||||||
QStringList dep_cmd_deps = splitDeps(indeps, dep_lines);
|
|
||||||
for(int i = 0; i < dep_cmd_deps.count(); ++i) {
|
|
||||||
QString &file = dep_cmd_deps[i];
|
|
||||||
QString absFile = outDir.absoluteFilePath(file);
|
|
||||||
if (absFile == file) {
|
|
||||||
// already absolute; don't do any checks.
|
|
||||||
} else if (exists(absFile)) {
|
|
||||||
file = absFile;
|
|
||||||
} else {
|
|
||||||
QString localFile = resolveDependency(outDir, file);
|
|
||||||
if (localFile.isEmpty()) {
|
|
||||||
if (exists(file))
|
|
||||||
warn_msg(WarnDeprecated, ".depend_command for extra compiler %s"
|
|
||||||
" prints paths relative to source directory",
|
|
||||||
(*it).toLatin1().constData());
|
|
||||||
else
|
|
||||||
file = absFile; // fallback for generated resources
|
|
||||||
} else {
|
|
||||||
file = localFile;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!file.isEmpty())
|
|
||||||
file = fileFixify(file);
|
|
||||||
}
|
|
||||||
deps += dep_cmd_deps;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(int i = 0; i < inputs.size(); ) {
|
for(int i = 0; i < inputs.size(); ) {
|
||||||
@ -2084,44 +2104,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
|||||||
for (ProStringList::ConstIterator it3 = vars.constBegin(); it3 != vars.constEnd(); ++it3)
|
for (ProStringList::ConstIterator it3 = vars.constBegin(); it3 != vars.constEnd(); ++it3)
|
||||||
cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
|
cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
|
||||||
if(!tmp_dep_cmd.isEmpty() && doDepends()) {
|
if(!tmp_dep_cmd.isEmpty() && doDepends()) {
|
||||||
char buff[256];
|
callExtraCompilerDependCommand(*it, dep_cd_cmd, tmp_dep_cmd, inpf,
|
||||||
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, out, LocalShell);
|
tmp_out, dep_lines, &deps, existingDepsOnly);
|
||||||
dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd);
|
|
||||||
if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) {
|
|
||||||
QByteArray depData;
|
|
||||||
while (int read_in = feof(proc) ? 0 : (int)fread(buff, 1, 255, proc))
|
|
||||||
depData.append(buff, read_in);
|
|
||||||
QT_PCLOSE(proc);
|
|
||||||
const QString indeps = QString::fromLocal8Bit(depData);
|
|
||||||
if(!indeps.isEmpty()) {
|
|
||||||
QDir outDir(Option::output_dir);
|
|
||||||
QStringList dep_cmd_deps = splitDeps(indeps, dep_lines);
|
|
||||||
for(int i = 0; i < dep_cmd_deps.count(); ++i) {
|
|
||||||
QString &file = dep_cmd_deps[i];
|
|
||||||
QString absFile = outDir.absoluteFilePath(file);
|
|
||||||
if (absFile == file) {
|
|
||||||
// already absolute; don't do any checks.
|
|
||||||
} else if (exists(absFile)) {
|
|
||||||
file = absFile;
|
|
||||||
} else {
|
|
||||||
QString localFile = resolveDependency(outDir, file);
|
|
||||||
if (localFile.isEmpty()) {
|
|
||||||
if (exists(file))
|
|
||||||
warn_msg(WarnDeprecated, ".depend_command for extra compiler %s"
|
|
||||||
" prints paths relative to source directory",
|
|
||||||
(*it).toLatin1().constData());
|
|
||||||
else
|
|
||||||
file = absFile; // fallback for generated resources
|
|
||||||
} else {
|
|
||||||
file = localFile;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!file.isEmpty())
|
|
||||||
file = fileFixify(file);
|
|
||||||
}
|
|
||||||
deps += dep_cmd_deps;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//use the depend system to find includes of these included files
|
//use the depend system to find includes of these included files
|
||||||
QStringList inc_deps;
|
QStringList inc_deps;
|
||||||
for(int i = 0; i < deps.size(); ++i) {
|
for(int i = 0; i < deps.size(); ++i) {
|
||||||
|
@ -84,6 +84,11 @@ protected:
|
|||||||
void writeExtraVariables(QTextStream &t);
|
void writeExtraVariables(QTextStream &t);
|
||||||
void writeExtraTargets(QTextStream &t);
|
void writeExtraTargets(QTextStream &t);
|
||||||
QString resolveDependency(const QDir &outDir, const QString &file);
|
QString resolveDependency(const QDir &outDir, const QString &file);
|
||||||
|
void callExtraCompilerDependCommand(const ProString &extraCompiler, const QString &dep_cd_cmd,
|
||||||
|
const QString &tmp_dep_cmd, const QString &inpf,
|
||||||
|
const QString &tmp_out, bool dep_lines, QStringList *deps,
|
||||||
|
bool existingDepsOnly,
|
||||||
|
bool checkCommandAvailability = false);
|
||||||
void writeExtraCompilerTargets(QTextStream &t);
|
void writeExtraCompilerTargets(QTextStream &t);
|
||||||
void writeExtraCompilerVariables(QTextStream &t);
|
void writeExtraCompilerVariables(QTextStream &t);
|
||||||
bool writeDummyMakefile(QTextStream &t);
|
bool writeDummyMakefile(QTextStream &t);
|
||||||
|
@ -2350,33 +2350,15 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
|
|||||||
if (!tmp_dep.isEmpty())
|
if (!tmp_dep.isEmpty())
|
||||||
deps = tmp_dep;
|
deps = tmp_dep;
|
||||||
if (!tmp_dep_cmd.isEmpty()) {
|
if (!tmp_dep_cmd.isEmpty()) {
|
||||||
// Execute dependency command, and add every line as a dep
|
const QString dep_cd_cmd = QLatin1String("cd ")
|
||||||
char buff[256];
|
+ IoUtils::shellQuote(Option::fixPathToLocalOS(Option::output_dir, false))
|
||||||
QString dep_cmd = Project->replaceExtraCompilerVariables(
|
+ QLatin1String(" && ");
|
||||||
tmp_dep_cmd, inFile, out, MakefileGenerator::LocalShell);
|
Project->callExtraCompilerDependCommand(extraCompilerName, dep_cd_cmd, tmp_dep_cmd,
|
||||||
if(Project->canExecute(dep_cmd)) {
|
inFile, out,
|
||||||
dep_cmd.prepend(QLatin1String("cd ")
|
true, // dep_lines
|
||||||
+ IoUtils::shellQuote(Option::fixPathToLocalOS(Option::output_dir, false))
|
&deps,
|
||||||
+ QLatin1String(" && "));
|
configs.contains("dep_existing_only"),
|
||||||
if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) {
|
true /* checkCommandAvailability */);
|
||||||
QString indeps;
|
|
||||||
while(!feof(proc)) {
|
|
||||||
int read_in = (int)fread(buff, 1, 255, proc);
|
|
||||||
if(!read_in)
|
|
||||||
break;
|
|
||||||
indeps += QByteArray(buff, read_in);
|
|
||||||
}
|
|
||||||
QT_PCLOSE(proc);
|
|
||||||
if(!indeps.isEmpty()) {
|
|
||||||
QStringList extradeps = indeps.split(QLatin1Char('\n'));
|
|
||||||
for (int i = 0; i < extradeps.count(); ++i) {
|
|
||||||
QString dd = extradeps.at(i).simplified();
|
|
||||||
if (!dd.isEmpty())
|
|
||||||
deps += Project->fileFixify(dd, MakefileGenerator::FileFixifyFromOutdir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (int i = 0; i < deps.count(); ++i)
|
for (int i = 0; i < deps.count(); ++i)
|
||||||
deps[i] = Option::fixPathToTargetOS(
|
deps[i] = Option::fixPathToTargetOS(
|
||||||
|
@ -1575,12 +1575,14 @@ void VcprojGenerator::initExtraCompilerOutputs()
|
|||||||
if (!outputVar.isEmpty() && otherFilters.contains(outputVar))
|
if (!outputVar.isEmpty() && otherFilters.contains(outputVar))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QString tmp_out = project->first(outputs.first().toKey()).toQString();
|
QString tmp_out;
|
||||||
|
if (!outputs.isEmpty())
|
||||||
|
tmp_out = project->first(outputs.first().toKey()).toQString();
|
||||||
if (project->values(ProKey(*it + ".CONFIG")).indexOf("combine") != -1) {
|
if (project->values(ProKey(*it + ".CONFIG")).indexOf("combine") != -1) {
|
||||||
// Combined output, only one file result
|
// Combined output, only one file result
|
||||||
extraCompile.addFile(Option::fixPathToTargetOS(
|
extraCompile.addFile(Option::fixPathToTargetOS(
|
||||||
replaceExtraCompilerVariables(tmp_out, QString(), QString(), NoShell), false));
|
replaceExtraCompilerVariables(tmp_out, QString(), QString(), NoShell), false));
|
||||||
} else {
|
} else if (!inputVars.isEmpty()) {
|
||||||
// One output file per input
|
// One output file per input
|
||||||
const ProStringList &tmp_in = project->values(inputVars.first().toKey());
|
const ProStringList &tmp_in = project->values(inputVars.first().toKey());
|
||||||
for (int i = 0; i < tmp_in.count(); ++i) {
|
for (int i = 0; i < tmp_in.count(); ++i) {
|
||||||
|
@ -68,6 +68,8 @@ public:
|
|||||||
bool usePCH;
|
bool usePCH;
|
||||||
VCProjectWriter *projectWriter;
|
VCProjectWriter *projectWriter;
|
||||||
|
|
||||||
|
using Win32MakefileGenerator::callExtraCompilerDependCommand;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual VCProjectWriter *createProjectWriter();
|
virtual VCProjectWriter *createProjectWriter();
|
||||||
bool doDepends() const override { return false; } // Never necessary
|
bool doDepends() const override { return false; } // Never necessary
|
||||||
|
29
src/3rdparty/libjpeg/LICENSE
vendored
29
src/3rdparty/libjpeg/LICENSE
vendored
@ -14,7 +14,7 @@ libjpeg-turbo is covered by three compatible BSD-style open source licenses:
|
|||||||
This license covers the TurboJPEG API library and associated programs, as
|
This license covers the TurboJPEG API library and associated programs, as
|
||||||
well as the build system.
|
well as the build system.
|
||||||
|
|
||||||
- The zlib License, which is listed below
|
- The [zlib License](https://opensource.org/licenses/Zlib)
|
||||||
|
|
||||||
This license is a subset of the other two, and it covers the libjpeg-turbo
|
This license is a subset of the other two, and it covers the libjpeg-turbo
|
||||||
SIMD extensions.
|
SIMD extensions.
|
||||||
@ -66,7 +66,7 @@ best of our understanding.
|
|||||||
|
|
||||||
2. If your binary distribution includes or uses the TurboJPEG API, then
|
2. If your binary distribution includes or uses the TurboJPEG API, then
|
||||||
your product documentation must include the text of the Modified BSD
|
your product documentation must include the text of the Modified BSD
|
||||||
License.
|
License (see below.)
|
||||||
|
|
||||||
**Origin**
|
**Origin**
|
||||||
- Clause 2 of the Modified BSD License
|
- Clause 2 of the Modified BSD License
|
||||||
@ -91,7 +91,8 @@ best of our understanding.
|
|||||||
The Modified (3-clause) BSD License
|
The Modified (3-clause) BSD License
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
Copyright (C)\<YEAR\> \<AUTHOR\>. All Rights Reserved.
|
Copyright (C)2009-2019 D. R. Commander. All Rights Reserved.
|
||||||
|
Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are met:
|
||||||
@ -118,28 +119,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
The zlib License
|
|
||||||
================
|
|
||||||
|
|
||||||
Copyright (C) \<YEAR\>, \<AUTHOR\>.
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
|
||||||
warranty. In no event will the authors be held liable for any damages
|
|
||||||
arising from the use of this software.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any purpose,
|
|
||||||
including commercial applications, and to alter it and redistribute it
|
|
||||||
freely, subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you must not
|
|
||||||
claim that you wrote the original software. If you use this software
|
|
||||||
in a product, an acknowledgment in the product documentation would be
|
|
||||||
appreciated but is not required.
|
|
||||||
2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
misrepresented as being the original software.
|
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
|
||||||
|
|
||||||
|
|
||||||
Why Three Licenses?
|
Why Three Licenses?
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
18
src/3rdparty/libjpeg/jconfig.h
vendored
18
src/3rdparty/libjpeg/jconfig.h
vendored
@ -2,22 +2,22 @@
|
|||||||
|
|
||||||
#define JPEG_LIB_VERSION 80
|
#define JPEG_LIB_VERSION 80
|
||||||
|
|
||||||
#define LIBJPEG_TURBO_VERSION 2.0.0
|
#define LIBJPEG_TURBO_VERSION 2.0.3
|
||||||
|
|
||||||
#define LIBJPEG_TURBO_VERSION_NUMBER 2000000
|
#define LIBJPEG_TURBO_VERSION_NUMBER 2000002
|
||||||
|
|
||||||
#define C_ARITH_CODING_SUPPORTED
|
#define C_ARITH_CODING_SUPPORTED 1
|
||||||
|
|
||||||
#define D_ARITH_CODING_SUPPORTED
|
#define D_ARITH_CODING_SUPPORTED 1
|
||||||
|
|
||||||
#define MEM_SRCDST_SUPPORTED
|
#define MEM_SRCDST_SUPPORTED 1
|
||||||
|
|
||||||
#define BITS_IN_JSAMPLE 8
|
#define BITS_IN_JSAMPLE 8
|
||||||
|
|
||||||
#define HAVE_STDDEF_H
|
#define HAVE_STDDEF_H 1
|
||||||
|
|
||||||
#define HAVE_STDLIB_H
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
#define HAVE_UNSIGNED_CHAR
|
#define HAVE_UNSIGNED_CHAR 1
|
||||||
|
|
||||||
#define HAVE_UNSIGNED_SHORT
|
#define HAVE_UNSIGNED_SHORT 1
|
||||||
|
2
src/3rdparty/libjpeg/jconfigint.h
vendored
2
src/3rdparty/libjpeg/jconfigint.h
vendored
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#define PACKAGE_NAME "libjpeg-turbo"
|
#define PACKAGE_NAME "libjpeg-turbo"
|
||||||
|
|
||||||
#define VERSION "2.0.0"
|
#define VERSION "2.0.3"
|
||||||
|
|
||||||
#if SIZE_MAX == 0xffffffff
|
#if SIZE_MAX == 0xffffffff
|
||||||
#define SIZEOF_SIZE_T 4
|
#define SIZEOF_SIZE_T 4
|
||||||
|
4
src/3rdparty/libjpeg/qt_attribution.json
vendored
4
src/3rdparty/libjpeg/qt_attribution.json
vendored
@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
"Description": "The Independent JPEG Group's JPEG software",
|
"Description": "The Independent JPEG Group's JPEG software",
|
||||||
"Homepage": "http://libjpeg-turbo.virtualgl.org/",
|
"Homepage": "http://libjpeg-turbo.virtualgl.org/",
|
||||||
"Version": "2.0.0",
|
"Version": "2.0.3",
|
||||||
"License": "Independent JPEG Group License",
|
"License": "Independent JPEG Group License",
|
||||||
"LicenseId": "IJG",
|
"LicenseId": "IJG",
|
||||||
"LicenseFile": "LICENSE",
|
"LicenseFile": "LICENSE",
|
||||||
"Copyright": "Copyright (C) 2009-2018 D. R. Commander
|
"Copyright": "Copyright (C) 2009-2019 D. R. Commander
|
||||||
Copyright (C) 2011-2016 Siarhei Siamashka
|
Copyright (C) 2011-2016 Siarhei Siamashka
|
||||||
Copyright (C) 2015-2016, 2018 Matthieu Darbois
|
Copyright (C) 2015-2016, 2018 Matthieu Darbois
|
||||||
Copyright (C) 2015 Intel Corporation
|
Copyright (C) 2015 Intel Corporation
|
||||||
|
108
src/3rdparty/libjpeg/src/ChangeLog.md
vendored
108
src/3rdparty/libjpeg/src/ChangeLog.md
vendored
@ -1,3 +1,111 @@
|
|||||||
|
2.0.3
|
||||||
|
=====
|
||||||
|
|
||||||
|
### Significant changes relative to 2.0.2:
|
||||||
|
|
||||||
|
1. Fixed "using JNI after critical get" errors that occurred on Android
|
||||||
|
platforms when passing invalid arguments to certain methods in the TurboJPEG
|
||||||
|
Java API.
|
||||||
|
|
||||||
|
2. Fixed a regression in the SIMD feature detection code, introduced by
|
||||||
|
the AVX2 SIMD extensions (2.0 beta1[1]), that was known to cause an illegal
|
||||||
|
instruction exception, in rare cases, on CPUs that lack support for CPUID leaf
|
||||||
|
07H (or on which the maximum CPUID leaf has been limited by way of a BIOS
|
||||||
|
setting.)
|
||||||
|
|
||||||
|
3. The 4:4:0 (h1v2) fancy (smooth) chroma upsampling algorithm in the
|
||||||
|
decompressor now uses a similar bias pattern to that of the 4:2:2 (h2v1) fancy
|
||||||
|
chroma upsampling algorithm, rounding up or down the upsampled result for
|
||||||
|
alternate pixels rather than always rounding down. This ensures that,
|
||||||
|
regardless of whether a 4:2:2 JPEG image is rotated or transposed prior to
|
||||||
|
decompression (in the frequency domain) or after decompression (in the spatial
|
||||||
|
domain), the final image will be similar.
|
||||||
|
|
||||||
|
4. Fixed an integer overflow and subsequent segfault that occurred when
|
||||||
|
attempting to compress or decompress images with more than 1 billion pixels
|
||||||
|
using the TurboJPEG API.
|
||||||
|
|
||||||
|
5. Fixed a regression introduced by 2.0 beta1[15] whereby attempting to
|
||||||
|
generate a progressive JPEG image on an SSE2-capable CPU using a scan script
|
||||||
|
containing one or more scans with lengths divisible by 16 would result in an
|
||||||
|
error ("Missing Huffman code table entry") and an invalid JPEG image.
|
||||||
|
|
||||||
|
6. Fixed an issue whereby `tjDecodeYUV()` and `tjDecodeYUVPlanes()` would throw
|
||||||
|
an error ("Invalid progressive parameters") or a warning ("Inconsistent
|
||||||
|
progression sequence") if passed a TurboJPEG instance that was previously used
|
||||||
|
to decompress a progressive JPEG image.
|
||||||
|
|
||||||
|
|
||||||
|
2.0.2
|
||||||
|
=====
|
||||||
|
|
||||||
|
### Significant changes relative to 2.0.1:
|
||||||
|
|
||||||
|
1. Fixed a regression introduced by 2.0.1[5] that prevented a runtime search
|
||||||
|
path (rpath) from being embedded in the libjpeg-turbo shared libraries and
|
||||||
|
executables for macOS and iOS. This caused a fatal error of the form
|
||||||
|
"dyld: Library not loaded" when attempting to use one of the executables,
|
||||||
|
unless `DYLD_LIBRARY_PATH` was explicitly set to the location of the
|
||||||
|
libjpeg-turbo shared libraries.
|
||||||
|
|
||||||
|
2. Fixed an integer overflow and subsequent segfault (CVE-2018-20330) that
|
||||||
|
occurred when attempting to load a BMP file with more than 1 billion pixels
|
||||||
|
using the `tjLoadImage()` function.
|
||||||
|
|
||||||
|
3. Fixed a buffer overrun (CVE-2018-19664) that occurred when attempting to
|
||||||
|
decompress a specially-crafted malformed JPEG image to a 256-color BMP using
|
||||||
|
djpeg.
|
||||||
|
|
||||||
|
4. Fixed a floating point exception that occurred when attempting to
|
||||||
|
decompress a specially-crafted malformed JPEG image with a specified image
|
||||||
|
width or height of 0 using the C version of TJBench.
|
||||||
|
|
||||||
|
5. The TurboJPEG API will now decompress 4:4:4 JPEG images with 2x1, 1x2, 3x1,
|
||||||
|
or 1x3 luminance and chrominance sampling factors. This is a non-standard way
|
||||||
|
of specifying 1x subsampling (normally 4:4:4 JPEGs have 1x1 luminance and
|
||||||
|
chrominance sampling factors), but the JPEG format and the libjpeg API both
|
||||||
|
allow it.
|
||||||
|
|
||||||
|
6. Fixed a regression introduced by 2.0 beta1[7] that caused djpeg to generate
|
||||||
|
incorrect PPM images when used with the `-colors` option.
|
||||||
|
|
||||||
|
7. Fixed an issue whereby a static build of libjpeg-turbo (a build in which
|
||||||
|
`ENABLE_SHARED` is `0`) could not be installed using the Visual Studio IDE.
|
||||||
|
|
||||||
|
8. Fixed a severe performance issue in the Loongson MMI SIMD extensions that
|
||||||
|
occurred when compressing RGB images whose image rows were not 64-bit-aligned.
|
||||||
|
|
||||||
|
|
||||||
|
2.0.1
|
||||||
|
=====
|
||||||
|
|
||||||
|
### Significant changes relative to 2.0.0:
|
||||||
|
|
||||||
|
1. Fixed a regression introduced with the new CMake-based Un*x build system,
|
||||||
|
whereby jconfig.h could cause compiler warnings of the form
|
||||||
|
`"HAVE_*_H" redefined` if it was included by downstream Autotools-based
|
||||||
|
projects that used `AC_CHECK_HEADERS()` to check for the existence of locale.h,
|
||||||
|
stddef.h, or stdlib.h.
|
||||||
|
|
||||||
|
2. The `jsimd_quantize_float_dspr2()` and `jsimd_convsamp_float_dspr2()`
|
||||||
|
functions in the MIPS DSPr2 SIMD extensions are now disabled at compile time
|
||||||
|
if the soft float ABI is enabled. Those functions use instructions that are
|
||||||
|
incompatible with the soft float ABI.
|
||||||
|
|
||||||
|
3. Fixed a regression in the SIMD feature detection code, introduced by
|
||||||
|
the AVX2 SIMD extensions (2.0 beta1[1]), that caused libjpeg-turbo to crash on
|
||||||
|
Windows 7 if Service Pack 1 was not installed.
|
||||||
|
|
||||||
|
4. Fixed out-of-bounds read in cjpeg that occurred when attempting to compress
|
||||||
|
a specially-crafted malformed color-index (8-bit-per-sample) Targa file in
|
||||||
|
which some of the samples (color indices) exceeded the bounds of the Targa
|
||||||
|
file's color table.
|
||||||
|
|
||||||
|
5. Fixed an issue whereby installing a fully static build of libjpeg-turbo
|
||||||
|
(a build in which `CFLAGS` contains `-static` and `ENABLE_SHARED` is `0`) would
|
||||||
|
fail with "No valid ELF RPATH or RUNPATH entry exists in the file."
|
||||||
|
|
||||||
|
|
||||||
2.0.0
|
2.0.0
|
||||||
=====
|
=====
|
||||||
|
|
||||||
|
28
src/3rdparty/libjpeg/src/README.md
vendored
28
src/3rdparty/libjpeg/src/README.md
vendored
@ -135,12 +135,11 @@ without recompiling. libjpeg-turbo does not claim to support all of the
|
|||||||
libjpeg v7+ features, nor to produce identical output to libjpeg v7+ in all
|
libjpeg v7+ features, nor to produce identical output to libjpeg v7+ in all
|
||||||
cases (see below.)
|
cases (see below.)
|
||||||
|
|
||||||
By passing an argument of `--with-jpeg7` or `--with-jpeg8` to `configure`, or
|
By passing an argument of `-DWITH_JPEG7=1` or `-DWITH_JPEG8=1` to `cmake`, you
|
||||||
an argument of `-DWITH_JPEG7=1` or `-DWITH_JPEG8=1` to `cmake`, you can build a
|
can build a version of libjpeg-turbo that emulates the libjpeg v7 or v8 ABI, so
|
||||||
version of libjpeg-turbo that emulates the libjpeg v7 or v8 ABI, so that
|
that programs that are built against libjpeg v7 or v8 can be run with
|
||||||
programs that are built against libjpeg v7 or v8 can be run with libjpeg-turbo.
|
libjpeg-turbo. The following section describes which libjpeg v7+ features are
|
||||||
The following section describes which libjpeg v7+ features are supported and
|
supported and which aren't.
|
||||||
which aren't.
|
|
||||||
|
|
||||||
### Support for libjpeg v7 and v8 Features
|
### Support for libjpeg v7 and v8 Features
|
||||||
|
|
||||||
@ -247,9 +246,8 @@ don't, and it allows those functions to be provided in the "official"
|
|||||||
libjpeg-turbo binaries.
|
libjpeg-turbo binaries.
|
||||||
|
|
||||||
Those who are concerned about maintaining strict conformance with the libjpeg
|
Those who are concerned about maintaining strict conformance with the libjpeg
|
||||||
v6b or v7 API can pass an argument of `--without-mem-srcdst` to `configure` or
|
v6b or v7 API can pass an argument of `-DWITH_MEM_SRCDST=0` to `cmake` prior to
|
||||||
an argument of `-DWITH_MEM_SRCDST=0` to `cmake` prior to building
|
building libjpeg-turbo. This will restore the pre-1.3 behavior, in which
|
||||||
libjpeg-turbo. This will restore the pre-1.3 behavior, in which
|
|
||||||
`jpeg_mem_src()` and `jpeg_mem_dest()` are only included when emulating the
|
`jpeg_mem_src()` and `jpeg_mem_dest()` are only included when emulating the
|
||||||
libjpeg v8 API/ABI.
|
libjpeg v8 API/ABI.
|
||||||
|
|
||||||
@ -344,3 +342,15 @@ quality of 98-100. Thus, libjpeg-turbo must use the non-SIMD quantization
|
|||||||
function in those cases. This causes performance to drop by as much as 40%.
|
function in those cases. This causes performance to drop by as much as 40%.
|
||||||
It is therefore strongly advised that you use the slow integer forward DCT
|
It is therefore strongly advised that you use the slow integer forward DCT
|
||||||
whenever encoding images with a JPEG quality of 98 or higher.
|
whenever encoding images with a JPEG quality of 98 or higher.
|
||||||
|
|
||||||
|
|
||||||
|
Memory Debugger Pitfalls
|
||||||
|
========================
|
||||||
|
|
||||||
|
Valgrind and Memory Sanitizer (MSan) can generate false positives
|
||||||
|
(specifically, incorrect reports of uninitialized memory accesses) when used
|
||||||
|
with libjpeg-turbo's SIMD extensions. It is generally recommended that the
|
||||||
|
SIMD extensions be disabled, either by passing an argument of `-DWITH_SIMD=0`
|
||||||
|
to `cmake` when configuring the build or by setting the environment variable
|
||||||
|
`JSIMD_FORCENONE` to `1` at run time, when testing libjpeg-turbo with Valgrind,
|
||||||
|
MSan, or other memory debuggers.
|
||||||
|
6
src/3rdparty/libjpeg/src/jchuff.c
vendored
6
src/3rdparty/libjpeg/src/jchuff.c
vendored
@ -4,7 +4,7 @@
|
|||||||
* This file was part of the Independent JPEG Group's software:
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright (C) 2009-2011, 2014-2016, 2018, D. R. Commander.
|
* Copyright (C) 2009-2011, 2014-2016, 2018-2019, D. R. Commander.
|
||||||
* Copyright (C) 2015, Matthieu Darbois.
|
* Copyright (C) 2015, Matthieu Darbois.
|
||||||
* For conditions of distribution and use, see the accompanying README.ijg
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
* file.
|
* file.
|
||||||
@ -356,6 +356,8 @@ dump_buffer(working_state *state)
|
|||||||
put_buffer = (put_buffer << size) | code; \
|
put_buffer = (put_buffer << size) | code; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if SIZEOF_SIZE_T != 8 && !defined(_WIN64)
|
||||||
|
|
||||||
#define CHECKBUF15() { \
|
#define CHECKBUF15() { \
|
||||||
if (put_bits > 15) { \
|
if (put_bits > 15) { \
|
||||||
EMIT_BYTE() \
|
EMIT_BYTE() \
|
||||||
@ -363,6 +365,8 @@ dump_buffer(working_state *state)
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CHECKBUF31() { \
|
#define CHECKBUF31() { \
|
||||||
if (put_bits > 31) { \
|
if (put_bits > 31) { \
|
||||||
EMIT_BYTE() \
|
EMIT_BYTE() \
|
||||||
|
2
src/3rdparty/libjpeg/src/jcmaster.c
vendored
2
src/3rdparty/libjpeg/src/jcmaster.c
vendored
@ -492,8 +492,8 @@ prepare_for_pass(j_compress_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
master->pass_type = output_pass;
|
master->pass_type = output_pass;
|
||||||
master->pass_number++;
|
master->pass_number++;
|
||||||
/*FALLTHROUGH*/
|
|
||||||
#endif
|
#endif
|
||||||
|
/*FALLTHROUGH*/
|
||||||
case output_pass:
|
case output_pass:
|
||||||
/* Do a data-output pass. */
|
/* Do a data-output pass. */
|
||||||
/* We need not repeat per-scan setup if prior optimization pass did it. */
|
/* We need not repeat per-scan setup if prior optimization pass did it. */
|
||||||
|
28
src/3rdparty/libjpeg/src/jconfig.h.in
vendored
28
src/3rdparty/libjpeg/src/jconfig.h.in
vendored
@ -10,16 +10,16 @@
|
|||||||
#define LIBJPEG_TURBO_VERSION_NUMBER @LIBJPEG_TURBO_VERSION_NUMBER@
|
#define LIBJPEG_TURBO_VERSION_NUMBER @LIBJPEG_TURBO_VERSION_NUMBER@
|
||||||
|
|
||||||
/* Support arithmetic encoding */
|
/* Support arithmetic encoding */
|
||||||
#cmakedefine C_ARITH_CODING_SUPPORTED
|
#cmakedefine C_ARITH_CODING_SUPPORTED 1
|
||||||
|
|
||||||
/* Support arithmetic decoding */
|
/* Support arithmetic decoding */
|
||||||
#cmakedefine D_ARITH_CODING_SUPPORTED
|
#cmakedefine D_ARITH_CODING_SUPPORTED 1
|
||||||
|
|
||||||
/* Support in-memory source/destination managers */
|
/* Support in-memory source/destination managers */
|
||||||
#cmakedefine MEM_SRCDST_SUPPORTED
|
#cmakedefine MEM_SRCDST_SUPPORTED 1
|
||||||
|
|
||||||
/* Use accelerated SIMD routines. */
|
/* Use accelerated SIMD routines. */
|
||||||
#cmakedefine WITH_SIMD
|
#cmakedefine WITH_SIMD 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define BITS_IN_JSAMPLE as either
|
* Define BITS_IN_JSAMPLE as either
|
||||||
@ -33,37 +33,37 @@
|
|||||||
#define BITS_IN_JSAMPLE @BITS_IN_JSAMPLE@ /* use 8 or 12 */
|
#define BITS_IN_JSAMPLE @BITS_IN_JSAMPLE@ /* use 8 or 12 */
|
||||||
|
|
||||||
/* Define to 1 if you have the <locale.h> header file. */
|
/* Define to 1 if you have the <locale.h> header file. */
|
||||||
#cmakedefine HAVE_LOCALE_H
|
#cmakedefine HAVE_LOCALE_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <stddef.h> header file. */
|
/* Define to 1 if you have the <stddef.h> header file. */
|
||||||
#cmakedefine HAVE_STDDEF_H
|
#cmakedefine HAVE_STDDEF_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#cmakedefine HAVE_STDLIB_H
|
#cmakedefine HAVE_STDLIB_H 1
|
||||||
|
|
||||||
/* Define if you need to include <sys/types.h> to get size_t. */
|
/* Define if you need to include <sys/types.h> to get size_t. */
|
||||||
#cmakedefine NEED_SYS_TYPES_H
|
#cmakedefine NEED_SYS_TYPES_H 1
|
||||||
|
|
||||||
/* Define if you have BSD-like bzero and bcopy in <strings.h> rather than
|
/* Define if you have BSD-like bzero and bcopy in <strings.h> rather than
|
||||||
memset/memcpy in <string.h>. */
|
memset/memcpy in <string.h>. */
|
||||||
#cmakedefine NEED_BSD_STRINGS
|
#cmakedefine NEED_BSD_STRINGS 1
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `unsigned char'. */
|
/* Define to 1 if the system has the type `unsigned char'. */
|
||||||
#cmakedefine HAVE_UNSIGNED_CHAR
|
#cmakedefine HAVE_UNSIGNED_CHAR 1
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `unsigned short'. */
|
/* Define to 1 if the system has the type `unsigned short'. */
|
||||||
#cmakedefine HAVE_UNSIGNED_SHORT
|
#cmakedefine HAVE_UNSIGNED_SHORT 1
|
||||||
|
|
||||||
/* Compiler does not support pointers to undefined structures. */
|
/* Compiler does not support pointers to undefined structures. */
|
||||||
#cmakedefine INCOMPLETE_TYPES_BROKEN
|
#cmakedefine INCOMPLETE_TYPES_BROKEN 1
|
||||||
|
|
||||||
/* Define if your (broken) compiler shifts signed values as if they were
|
/* Define if your (broken) compiler shifts signed values as if they were
|
||||||
unsigned. */
|
unsigned. */
|
||||||
#cmakedefine RIGHT_SHIFT_IS_UNSIGNED
|
#cmakedefine RIGHT_SHIFT_IS_UNSIGNED 1
|
||||||
|
|
||||||
/* Define to 1 if type `char' is unsigned and you are not using gcc. */
|
/* Define to 1 if type `char' is unsigned and you are not using gcc. */
|
||||||
#ifndef __CHAR_UNSIGNED__
|
#ifndef __CHAR_UNSIGNED__
|
||||||
#cmakedefine __CHAR_UNSIGNED__
|
#cmakedefine __CHAR_UNSIGNED__ 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
2
src/3rdparty/libjpeg/src/jdcolor.c
vendored
2
src/3rdparty/libjpeg/src/jdcolor.c
vendored
@ -592,7 +592,7 @@ ycck_cmyk_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
|||||||
/* Declarations for ordered dithering
|
/* Declarations for ordered dithering
|
||||||
*
|
*
|
||||||
* We use a 4x4 ordered dither array packed into 32 bits. This array is
|
* We use a 4x4 ordered dither array packed into 32 bits. This array is
|
||||||
* sufficent for dithering RGB888 to RGB565.
|
* sufficient for dithering RGB888 to RGB565.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DITHER_MASK 0x3
|
#define DITHER_MASK 0x3
|
||||||
|
10
src/3rdparty/libjpeg/src/jdhuff.c
vendored
10
src/3rdparty/libjpeg/src/jdhuff.c
vendored
@ -4,7 +4,7 @@
|
|||||||
* This file was part of the Independent JPEG Group's software:
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright (C) 2009-2011, 2016, 2018, D. R. Commander.
|
* Copyright (C) 2009-2011, 2016, 2018-2019, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README.ijg
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
* file.
|
* file.
|
||||||
*
|
*
|
||||||
@ -589,7 +589,11 @@ decode_mcu_slow(j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||||||
if (entropy->dc_needed[blkn]) {
|
if (entropy->dc_needed[blkn]) {
|
||||||
/* Convert DC difference to actual value, update last_dc_val */
|
/* Convert DC difference to actual value, update last_dc_val */
|
||||||
int ci = cinfo->MCU_membership[blkn];
|
int ci = cinfo->MCU_membership[blkn];
|
||||||
s += state.last_dc_val[ci];
|
/* This is really just
|
||||||
|
* s += state.last_dc_val[ci];
|
||||||
|
* It is written this way in order to shut up UBSan.
|
||||||
|
*/
|
||||||
|
s = (int)((unsigned int)s + (unsigned int)state.last_dc_val[ci]);
|
||||||
state.last_dc_val[ci] = s;
|
state.last_dc_val[ci] = s;
|
||||||
if (block) {
|
if (block) {
|
||||||
/* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */
|
/* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */
|
||||||
@ -684,7 +688,7 @@ decode_mcu_fast(j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||||||
|
|
||||||
if (entropy->dc_needed[blkn]) {
|
if (entropy->dc_needed[blkn]) {
|
||||||
int ci = cinfo->MCU_membership[blkn];
|
int ci = cinfo->MCU_membership[blkn];
|
||||||
s += state.last_dc_val[ci];
|
s = (int)((unsigned int)s + (unsigned int)state.last_dc_val[ci]);
|
||||||
state.last_dc_val[ci] = s;
|
state.last_dc_val[ci] = s;
|
||||||
if (block)
|
if (block)
|
||||||
(*block)[0] = (JCOEF)s;
|
(*block)[0] = (JCOEF)s;
|
||||||
|
4
src/3rdparty/libjpeg/src/jdmerge.c
vendored
4
src/3rdparty/libjpeg/src/jdmerge.c
vendored
@ -429,8 +429,6 @@ h2v2_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
|||||||
#define PACK_TWO_PIXELS_LE(l, r) ((r << 16) | l)
|
#define PACK_TWO_PIXELS_LE(l, r) ((r << 16) | l)
|
||||||
#define PACK_TWO_PIXELS_BE(l, r) ((l << 16) | r)
|
#define PACK_TWO_PIXELS_BE(l, r) ((l << 16) | r)
|
||||||
|
|
||||||
#define PACK_NEED_ALIGNMENT(ptr) (((size_t)(ptr)) & 3)
|
|
||||||
|
|
||||||
#define WRITE_TWO_PIXELS_LE(addr, pixels) { \
|
#define WRITE_TWO_PIXELS_LE(addr, pixels) { \
|
||||||
((INT16 *)(addr))[0] = (INT16)(pixels); \
|
((INT16 *)(addr))[0] = (INT16)(pixels); \
|
||||||
((INT16 *)(addr))[1] = (INT16)((pixels) >> 16); \
|
((INT16 *)(addr))[1] = (INT16)((pixels) >> 16); \
|
||||||
@ -448,7 +446,7 @@ h2v2_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
|||||||
/* Declarations for ordered dithering
|
/* Declarations for ordered dithering
|
||||||
*
|
*
|
||||||
* We use a 4x4 ordered dither array packed into 32 bits. This array is
|
* We use a 4x4 ordered dither array packed into 32 bits. This array is
|
||||||
* sufficent for dithering RGB888 to RGB565.
|
* sufficient for dithering RGB888 to RGB565.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DITHER_MASK 0x3
|
#define DITHER_MASK 0x3
|
||||||
|
14
src/3rdparty/libjpeg/src/jdsample.c
vendored
14
src/3rdparty/libjpeg/src/jdsample.c
vendored
@ -8,6 +8,7 @@
|
|||||||
* Copyright (C) 2010, 2015-2016, D. R. Commander.
|
* Copyright (C) 2010, 2015-2016, D. R. Commander.
|
||||||
* Copyright (C) 2014, MIPS Technologies, Inc., California.
|
* Copyright (C) 2014, MIPS Technologies, Inc., California.
|
||||||
* Copyright (C) 2015, Google, Inc.
|
* Copyright (C) 2015, Google, Inc.
|
||||||
|
* Copyright (C) 2019, Arm Limited.
|
||||||
* For conditions of distribution and use, see the accompanying README.ijg
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
* file.
|
* file.
|
||||||
*
|
*
|
||||||
@ -315,9 +316,9 @@ h1v2_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
|
|||||||
JSAMPARRAY output_data = *output_data_ptr;
|
JSAMPARRAY output_data = *output_data_ptr;
|
||||||
JSAMPROW inptr0, inptr1, outptr;
|
JSAMPROW inptr0, inptr1, outptr;
|
||||||
#if BITS_IN_JSAMPLE == 8
|
#if BITS_IN_JSAMPLE == 8
|
||||||
int thiscolsum;
|
int thiscolsum, bias;
|
||||||
#else
|
#else
|
||||||
JLONG thiscolsum;
|
JLONG thiscolsum, bias;
|
||||||
#endif
|
#endif
|
||||||
JDIMENSION colctr;
|
JDIMENSION colctr;
|
||||||
int inrow, outrow, v;
|
int inrow, outrow, v;
|
||||||
@ -327,15 +328,18 @@ h1v2_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
|
|||||||
for (v = 0; v < 2; v++) {
|
for (v = 0; v < 2; v++) {
|
||||||
/* inptr0 points to nearest input row, inptr1 points to next nearest */
|
/* inptr0 points to nearest input row, inptr1 points to next nearest */
|
||||||
inptr0 = input_data[inrow];
|
inptr0 = input_data[inrow];
|
||||||
if (v == 0) /* next nearest is row above */
|
if (v == 0) { /* next nearest is row above */
|
||||||
inptr1 = input_data[inrow - 1];
|
inptr1 = input_data[inrow - 1];
|
||||||
else /* next nearest is row below */
|
bias = 1;
|
||||||
|
} else { /* next nearest is row below */
|
||||||
inptr1 = input_data[inrow + 1];
|
inptr1 = input_data[inrow + 1];
|
||||||
|
bias = 2;
|
||||||
|
}
|
||||||
outptr = output_data[outrow++];
|
outptr = output_data[outrow++];
|
||||||
|
|
||||||
for (colctr = 0; colctr < compptr->downsampled_width; colctr++) {
|
for (colctr = 0; colctr < compptr->downsampled_width; colctr++) {
|
||||||
thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
|
thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
|
||||||
*outptr++ = (JSAMPLE)((thiscolsum + 1) >> 2);
|
*outptr++ = (JSAMPLE)((thiscolsum + bias) >> 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inrow++;
|
inrow++;
|
||||||
|
2
src/3rdparty/libjpeg/src/jquant1.c
vendored
2
src/3rdparty/libjpeg/src/jquant1.c
vendored
@ -154,7 +154,7 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
boolean is_padded; /* is the colorindex padded for odither? */
|
boolean is_padded; /* is the colorindex padded for odither? */
|
||||||
|
|
||||||
int Ncolors[MAX_Q_COMPS]; /* # of values alloced to each component */
|
int Ncolors[MAX_Q_COMPS]; /* # of values allocated to each component */
|
||||||
|
|
||||||
/* Variables for ordered dithering */
|
/* Variables for ordered dithering */
|
||||||
int row_index; /* cur row's vertical index in dither matrix */
|
int row_index; /* cur row's vertical index in dither matrix */
|
||||||
|
6
src/3rdparty/libjpeg/src/jversion.h
vendored
6
src/3rdparty/libjpeg/src/jversion.h
vendored
@ -4,7 +4,7 @@
|
|||||||
* This file was part of the Independent JPEG Group's software:
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding.
|
* Copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding.
|
||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright (C) 2010, 2012-2018, D. R. Commander.
|
* Copyright (C) 2010, 2012-2019, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README.ijg
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
* file.
|
* file.
|
||||||
*
|
*
|
||||||
@ -36,7 +36,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define JCOPYRIGHT \
|
#define JCOPYRIGHT \
|
||||||
"Copyright (C) 2009-2018 D. R. Commander\n" \
|
"Copyright (C) 2009-2019 D. R. Commander\n" \
|
||||||
"Copyright (C) 2011-2016 Siarhei Siamashka\n" \
|
"Copyright (C) 2011-2016 Siarhei Siamashka\n" \
|
||||||
"Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \
|
"Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \
|
||||||
"Copyright (C) 2015 Intel Corporation\n" \
|
"Copyright (C) 2015 Intel Corporation\n" \
|
||||||
@ -49,4 +49,4 @@
|
|||||||
"Copyright (C) 1991-2016 Thomas G. Lane, Guido Vollbeding"
|
"Copyright (C) 1991-2016 Thomas G. Lane, Guido Vollbeding"
|
||||||
|
|
||||||
#define JCOPYRIGHT_SHORT \
|
#define JCOPYRIGHT_SHORT \
|
||||||
"Copyright (C) 1991-2018 The libjpeg-turbo Project and many others"
|
"Copyright (C) 1991-2019 The libjpeg-turbo Project and many others"
|
||||||
|
26
src/3rdparty/sqlite/patches/0001-Fix-CVE-2019-19244-in-SQLite.patch
vendored
Normal file
26
src/3rdparty/sqlite/patches/0001-Fix-CVE-2019-19244-in-SQLite.patch
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 676425e522e08eb0e7dfaacdac79a5de27542322 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy Shaw <andy.shaw@qt.io>
|
||||||
|
Date: Wed, 11 Dec 2019 10:51:22 +0100
|
||||||
|
Subject: [PATCH 53/53] Fix CVE-2019-19244 in SQLite
|
||||||
|
|
||||||
|
Fixes: QTBUG-80635
|
||||||
|
Change-Id: I718349e28ec76ea164dd50f2a985f2074dd6bdbd
|
||||||
|
---
|
||||||
|
src/3rdparty/sqlite/sqlite3.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
index 8fd740b300..bd647ca1c2 100644
|
||||||
|
--- a/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
+++ b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
@@ -131679,6 +131679,7 @@ SQLITE_PRIVATE int sqlite3Select(
|
||||||
|
*/
|
||||||
|
if( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct
|
||||||
|
&& sqlite3ExprListCompare(sSort.pOrderBy, pEList, -1)==0
|
||||||
|
+ && p->pWin==0
|
||||||
|
){
|
||||||
|
p->selFlags &= ~SF_Distinct;
|
||||||
|
pGroupBy = p->pGroupBy = sqlite3ExprListDup(db, pEList, 0);
|
||||||
|
--
|
||||||
|
2.21.0 (Apple Git-122.2)
|
||||||
|
|
31
src/3rdparty/sqlite/patches/0002-Fix-CVE-2019-19242-in-SQLite.patch
vendored
Normal file
31
src/3rdparty/sqlite/patches/0002-Fix-CVE-2019-19242-in-SQLite.patch
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 7905740b8e79479298e83d8e559fc49b46cf980e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy Shaw <andy.shaw@qt.io>
|
||||||
|
Date: Thu, 19 Dec 2019 21:59:09 +0100
|
||||||
|
Subject: [PATCH] Fix CVE-2019-19242 in SQLite
|
||||||
|
|
||||||
|
Change-Id: I78a72a574da5cf3503950afe47146ae6424f00c6
|
||||||
|
---
|
||||||
|
src/3rdparty/sqlite/sqlite3.c | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
index bd647ca1c2..d3e0c065b6 100644
|
||||||
|
--- a/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
+++ b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
@@ -101055,7 +101055,12 @@ expr_code_doover:
|
||||||
|
** constant.
|
||||||
|
*/
|
||||||
|
int iReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft,target);
|
||||||
|
- int aff = sqlite3TableColumnAffinity(pExpr->y.pTab, pExpr->iColumn);
|
||||||
|
+ int aff;
|
||||||
|
+ if( pExpr->y.pTab ){
|
||||||
|
+ aff = sqlite3TableColumnAffinity(pExpr->y.pTab, pExpr->iColumn);
|
||||||
|
+ }else{
|
||||||
|
+ aff = pExpr->affExpr;
|
||||||
|
+ }
|
||||||
|
if( aff>SQLITE_AFF_BLOB ){
|
||||||
|
static const char zAff[] = "B\000C\000D\000E";
|
||||||
|
assert( SQLITE_AFF_BLOB=='A' );
|
||||||
|
--
|
||||||
|
2.21.0 (Apple Git-122.2)
|
||||||
|
|
95
src/3rdparty/sqlite/patches/0003-Fix-CVE-2019-19603-in-SQLite.patch
vendored
Normal file
95
src/3rdparty/sqlite/patches/0003-Fix-CVE-2019-19603-in-SQLite.patch
vendored
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
From 11a2f4647b67494fb731a6fd793f1b28074631d3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy Shaw <andy.shaw@qt.io>
|
||||||
|
Date: Thu, 19 Dec 2019 22:31:15 +0100
|
||||||
|
Subject: [PATCH] Fix CVE-2019-19603 in SQLite
|
||||||
|
|
||||||
|
This includes the patch needed to fix this CVE and a supporting one to
|
||||||
|
include a new function added that it depends on.
|
||||||
|
|
||||||
|
Task-number: QTBUG-80903
|
||||||
|
Change-Id: Ic7639d50c89a3ee7d45426588c3ab0efd0eebb72
|
||||||
|
---
|
||||||
|
src/3rdparty/sqlite/sqlite3.c | 32 ++++++++++++++++++++++++++------
|
||||||
|
1 file changed, 26 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
index d3e0c065b6..a430554db7 100644
|
||||||
|
--- a/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
+++ b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
@@ -19519,6 +19519,12 @@ SQLITE_PRIVATE Module *sqlite3VtabCreateModule(
|
||||||
|
);
|
||||||
|
# define sqlite3VtabInSync(db) ((db)->nVTrans>0 && (db)->aVTrans==0)
|
||||||
|
#endif
|
||||||
|
+SQLITE_PRIVATE int sqlite3ReadOnlyShadowTables(sqlite3 *db);
|
||||||
|
+#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||||
|
+SQLITE_PRIVATE int sqlite3ShadowTableName(sqlite3 *db, const char *zName);
|
||||||
|
+#else
|
||||||
|
+# define sqlite3ShadowTableName(A,B) 0
|
||||||
|
+#endif
|
||||||
|
SQLITE_PRIVATE int sqlite3VtabEponymousTableInit(Parse*,Module*);
|
||||||
|
SQLITE_PRIVATE void sqlite3VtabEponymousTableClear(sqlite3*,Module*);
|
||||||
|
SQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse*,Table*);
|
||||||
|
@@ -108483,6 +108489,22 @@ SQLITE_PRIVATE int sqlite3WritableSchema(sqlite3 *db){
|
||||||
|
return (db->flags&(SQLITE_WriteSchema|SQLITE_Defensive))==SQLITE_WriteSchema;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/*
|
||||||
|
+ ** Return TRUE if shadow tables should be read-only in the current
|
||||||
|
+ ** context.
|
||||||
|
+ */
|
||||||
|
+int sqlite3ReadOnlyShadowTables(sqlite3 *db){
|
||||||
|
+#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||||
|
+ if( (db->flags & SQLITE_Defensive)!=0
|
||||||
|
+ && db->pVtabCtx==0
|
||||||
|
+ && db->nVdbeExec==0
|
||||||
|
+ ){
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
** This routine is used to check if the UTF-8 string zName is a legal
|
||||||
|
** unqualified name for a new schema object (table, index, view or
|
||||||
|
@@ -108516,8 +108538,8 @@ SQLITE_PRIVATE int sqlite3CheckObjectName(
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
- if( pParse->nested==0
|
||||||
|
- && 0==sqlite3StrNICmp(zName, "sqlite_", 7)
|
||||||
|
+ if( (pParse->nested==0 && 0==sqlite3StrNICmp(zName, "sqlite_", 7))
|
||||||
|
+ || (sqlite3ReadOnlyShadowTables(db) && sqlite3ShadowTableName(db, zName))
|
||||||
|
){
|
||||||
|
sqlite3ErrorMsg(pParse, "object name reserved for internal use: %s",
|
||||||
|
zName);
|
||||||
|
@@ -109662,7 +109684,7 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){
|
||||||
|
** zName is temporarily modified while this routine is running, but is
|
||||||
|
** restored to its original value prior to this routine returning.
|
||||||
|
*/
|
||||||
|
-static int isShadowTableName(sqlite3 *db, char *zName){
|
||||||
|
+int sqlite3ShadowTableName(sqlite3 *db, const char *zName){
|
||||||
|
char *zTail; /* Pointer to the last "_" in zName */
|
||||||
|
Table *pTab; /* Table that zName is a shadow of */
|
||||||
|
Module *pMod; /* Module for the virtual table */
|
||||||
|
@@ -109680,8 +109702,6 @@ static int isShadowTableName(sqlite3 *db, char *zName){
|
||||||
|
if( pMod->pModule->xShadowName==0 ) return 0;
|
||||||
|
return pMod->pModule->xShadowName(zTail+1);
|
||||||
|
}
|
||||||
|
-#else
|
||||||
|
-# define isShadowTableName(x,y) 0
|
||||||
|
#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -109723,7 +109743,7 @@ SQLITE_PRIVATE void sqlite3EndTable(
|
||||||
|
p = pParse->pNewTable;
|
||||||
|
if( p==0 ) return;
|
||||||
|
|
||||||
|
- if( pSelect==0 && isShadowTableName(db, p->zName) ){
|
||||||
|
+ if( pSelect==0 && sqlite3ShadowTableName(db, p->zName) ){
|
||||||
|
p->tabFlags |= TF_Shadow;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.21.0 (Apple Git-122.2)
|
||||||
|
|
29
src/3rdparty/sqlite/patches/0004-Fix-CVE-2019-19646-in-SQLite.patch
vendored
Normal file
29
src/3rdparty/sqlite/patches/0004-Fix-CVE-2019-19646-in-SQLite.patch
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From a83bbce4d6f31d93ea4d2a681aa52c148f148e26 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy Shaw <andy.shaw@qt.io>
|
||||||
|
Date: Thu, 2 Jan 2020 09:07:08 +0100
|
||||||
|
Subject: [PATCH] Fix CVE-2019-19646 in SQLite
|
||||||
|
|
||||||
|
Task-number: QTBUG-81020
|
||||||
|
Change-Id: I7176db20d4a44b1fb443a6108675f719e9643343
|
||||||
|
---
|
||||||
|
src/3rdparty/sqlite/sqlite3.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
index 57e61b8313..980a149b1a 100644
|
||||||
|
--- a/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
+++ b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
@@ -123765,7 +123765,9 @@ SQLITE_PRIVATE void sqlite3Pragma(
|
||||||
|
if( j==pTab->iPKey ) continue;
|
||||||
|
if( pTab->aCol[j].notNull==0 ) continue;
|
||||||
|
sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, j, 3);
|
||||||
|
- sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
|
||||||
|
+ if( sqlite3VdbeGetOp(v,-1)->opcode==OP_Column ){
|
||||||
|
+ sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
|
||||||
|
+ }
|
||||||
|
jmp2 = sqlite3VdbeAddOp1(v, OP_NotNull, 3); VdbeCoverage(v);
|
||||||
|
zErr = sqlite3MPrintf(db, "NULL value in %s.%s", pTab->zName,
|
||||||
|
pTab->aCol[j].zName);
|
||||||
|
--
|
||||||
|
2.21.0 (Apple Git-122.2)
|
||||||
|
|
83
src/3rdparty/sqlite/patches/0005-Fix-CVE-2019-19645-in-SQLite.patch
vendored
Normal file
83
src/3rdparty/sqlite/patches/0005-Fix-CVE-2019-19645-in-SQLite.patch
vendored
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
From 78c972eec5bab03a408b8ba1373572bcfe2db630 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy Shaw <andy.shaw@qt.io>
|
||||||
|
Date: Thu, 2 Jan 2020 08:47:23 +0100
|
||||||
|
Subject: [PATCH] Fix CVE-2019-19645 in SQLite
|
||||||
|
|
||||||
|
Task-number: QTBUG-81020
|
||||||
|
Change-Id: I58b1dd9e7a90ba998c3af7f25a4627d8bdd70970
|
||||||
|
---
|
||||||
|
src/3rdparty/sqlite/sqlite3.c | 11 ++++++++++-
|
||||||
|
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
index d3e0c065b6..57e61b8313 100644
|
||||||
|
--- a/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
+++ b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
@@ -17946,6 +17946,7 @@ struct Select {
|
||||||
|
#define SF_IncludeHidden 0x20000 /* Include hidden columns in output */
|
||||||
|
#define SF_ComplexResult 0x40000 /* Result contains subquery or function */
|
||||||
|
#define SF_WhereBegin 0x80000 /* Really a WhereBegin() call. Debug Only */
|
||||||
|
+#define SF_View 0x0200000 /* SELECT statement is a view */
|
||||||
|
|
||||||
|
/*
|
||||||
|
** The results of a SELECT can be distributed in several ways, as defined
|
||||||
|
@@ -103920,6 +103921,7 @@ static int renameUnmapExprCb(Walker *pWalker, Expr *pExpr){
|
||||||
|
static int renameUnmapSelectCb(Walker *pWalker, Select *p){
|
||||||
|
Parse *pParse = pWalker->pParse;
|
||||||
|
int i;
|
||||||
|
+ if( p->selFlags & SF_View ) return WRC_Prune;
|
||||||
|
if( ALWAYS(p->pEList) ){
|
||||||
|
ExprList *pList = p->pEList;
|
||||||
|
for(i=0; i<pList->nExpr; i++){
|
||||||
|
@@ -104024,6 +104026,7 @@ static void renameWalkWith(Walker *pWalker, Select *pSelect){
|
||||||
|
** descend into sub-select statements.
|
||||||
|
*/
|
||||||
|
static int renameColumnSelectCb(Walker *pWalker, Select *p){
|
||||||
|
+ if( p->selFlags & SF_View ) return WRC_Prune;
|
||||||
|
renameWalkWith(pWalker, p);
|
||||||
|
return WRC_Continue;
|
||||||
|
}
|
||||||
|
@@ -104489,8 +104492,9 @@ static void renameColumnFunc(
|
||||||
|
if( sParse.pNewTable ){
|
||||||
|
Select *pSelect = sParse.pNewTable->pSelect;
|
||||||
|
if( pSelect ){
|
||||||
|
+ pSelect->selFlags &= ~SF_View;
|
||||||
|
sParse.rc = SQLITE_OK;
|
||||||
|
- sqlite3SelectPrep(&sParse, sParse.pNewTable->pSelect, 0);
|
||||||
|
+ sqlite3SelectPrep(&sParse, pSelect, 0);
|
||||||
|
rc = (db->mallocFailed ? SQLITE_NOMEM : sParse.rc);
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
sqlite3WalkSelect(&sWalker, pSelect);
|
||||||
|
@@ -104602,6 +104606,7 @@ static int renameTableSelectCb(Walker *pWalker, Select *pSelect){
|
||||||
|
int i;
|
||||||
|
RenameCtx *p = pWalker->u.pRename;
|
||||||
|
SrcList *pSrc = pSelect->pSrc;
|
||||||
|
+ if( pSelect->selFlags & SF_View ) return WRC_Prune;
|
||||||
|
if( pSrc==0 ){
|
||||||
|
assert( pWalker->pParse->db->mallocFailed );
|
||||||
|
return WRC_Abort;
|
||||||
|
@@ -104681,10 +104686,13 @@ static void renameTableFunc(
|
||||||
|
|
||||||
|
if( pTab->pSelect ){
|
||||||
|
if( isLegacy==0 ){
|
||||||
|
+ Select *pSelect = pTab->pSelect;
|
||||||
|
NameContext sNC;
|
||||||
|
memset(&sNC, 0, sizeof(sNC));
|
||||||
|
sNC.pParse = &sParse;
|
||||||
|
|
||||||
|
+ assert( pSelect->selFlags & SF_View );
|
||||||
|
+ pSelect->selFlags &= ~SF_View;
|
||||||
|
sqlite3SelectPrep(&sParse, pTab->pSelect, &sNC);
|
||||||
|
if( sParse.nErr ) rc = sParse.rc;
|
||||||
|
sqlite3WalkSelect(&sWalker, pTab->pSelect);
|
||||||
|
@@ -109994,6 +110002,7 @@ SQLITE_PRIVATE void sqlite3CreateView(
|
||||||
|
** allocated rather than point to the input string - which means that
|
||||||
|
** they will persist after the current sqlite3_exec() call returns.
|
||||||
|
*/
|
||||||
|
+ pSelect->selFlags |= SF_View;
|
||||||
|
if( IN_RENAME_OBJECT ){
|
||||||
|
p->pSelect = pSelect;
|
||||||
|
pSelect = 0;
|
||||||
|
--
|
||||||
|
2.21.0 (Apple Git-122.2)
|
||||||
|
|
30
src/3rdparty/sqlite/patches/0006-Fix-CVE-2019-19880-in-SQLite.patch
vendored
Normal file
30
src/3rdparty/sqlite/patches/0006-Fix-CVE-2019-19880-in-SQLite.patch
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 423d82ac8c7c545e8eac6f70a3e5e92208b7d991 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy Shaw <andy.shaw@qt.io>
|
||||||
|
Date: Tue, 21 Jan 2020 15:15:00 +0100
|
||||||
|
Subject: [PATCH] Fix CVE-2019-19880 in SQLite
|
||||||
|
|
||||||
|
Fixes: QTBUG-81565
|
||||||
|
Change-Id: I6bf2364e696315e5262d1abfa2f0b6947f14a33b
|
||||||
|
---
|
||||||
|
src/3rdparty/sqlite/sqlite3.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
index d5b43857ad..cd1a4d5221 100644
|
||||||
|
--- a/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
+++ b/src/3rdparty/sqlite/sqlite3.c
|
||||||
|
@@ -147620,9 +147620,11 @@ static ExprList *exprListAppendList(
|
||||||
|
int nInit = pList ? pList->nExpr : 0;
|
||||||
|
for(i=0; i<pAppend->nExpr; i++){
|
||||||
|
Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0);
|
||||||
|
+ assert( pDup==0 || !ExprHasProperty(pDup, EP_MemToken) );
|
||||||
|
if( bIntToNull && pDup && pDup->op==TK_INTEGER ){
|
||||||
|
pDup->op = TK_NULL;
|
||||||
|
pDup->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
|
||||||
|
+ pDup->u.zToken = 0;
|
||||||
|
}
|
||||||
|
pList = sqlite3ExprListAppend(pParse, pList, pDup);
|
||||||
|
if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags;
|
||||||
|
--
|
||||||
|
2.21.0 (Apple Git-122.2)
|
||||||
|
|
4
src/3rdparty/sqlite/qt_attribution.json
vendored
4
src/3rdparty/sqlite/qt_attribution.json
vendored
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
"Description": "SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.",
|
"Description": "SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.",
|
||||||
"Homepage": "https://www.sqlite.org/",
|
"Homepage": "https://www.sqlite.org/",
|
||||||
"Version": "3.28.0",
|
"Version": "3.30.1",
|
||||||
"DownloadLocation": "https://www.sqlite.org/2019/sqlite-amalgamation-3280000.zip",
|
"DownloadLocation": "https://www.sqlite.org/2019/sqlite-amalgamation-3300100.zip",
|
||||||
"License": "Public Domain",
|
"License": "Public Domain",
|
||||||
"Copyright": "The authors disclaim copyright to the source code. However, a license can be obtained if needed."
|
"Copyright": "The authors disclaim copyright to the source code. However, a license can be obtained if needed."
|
||||||
}
|
}
|
||||||
|
12043
src/3rdparty/sqlite/sqlite3.c
vendored
12043
src/3rdparty/sqlite/sqlite3.c
vendored
File diff suppressed because it is too large
Load Diff
124
src/3rdparty/sqlite/sqlite3.h
vendored
124
src/3rdparty/sqlite/sqlite3.h
vendored
@ -123,9 +123,9 @@ extern "C" {
|
|||||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||||
** [sqlite_version()] and [sqlite_source_id()].
|
** [sqlite_version()] and [sqlite_source_id()].
|
||||||
*/
|
*/
|
||||||
#define SQLITE_VERSION "3.28.0"
|
#define SQLITE_VERSION "3.30.1"
|
||||||
#define SQLITE_VERSION_NUMBER 3028000
|
#define SQLITE_VERSION_NUMBER 3030001
|
||||||
#define SQLITE_SOURCE_ID "2019-04-16 19:49:53 884b4b7e502b4e991677b53971277adfaf0a04a284f8e483e2553d0f83156b50"
|
#define SQLITE_SOURCE_ID "2019-10-10 20:19:45 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3df1b0b"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Run-Time Library Version Numbers
|
** CAPI3REF: Run-Time Library Version Numbers
|
||||||
@ -1296,8 +1296,14 @@ typedef struct sqlite3_api_routines sqlite3_api_routines;
|
|||||||
** ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
|
** ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
|
||||||
** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
|
** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
|
||||||
** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
|
** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
|
||||||
** to test whether a file is at least readable. The file can be a
|
** to test whether a file is at least readable. The SQLITE_ACCESS_READ
|
||||||
** directory.
|
** flag is never actually used and is not implemented in the built-in
|
||||||
|
** VFSes of SQLite. The file is named by the second argument and can be a
|
||||||
|
** directory. The xAccess method returns [SQLITE_OK] on success or some
|
||||||
|
** non-zero error code if there is an I/O error or if the name of
|
||||||
|
** the file given in the second argument is illegal. If SQLITE_OK
|
||||||
|
** is returned, then non-zero or zero is written into *pResOut to indicate
|
||||||
|
** whether or not the file is accessible.
|
||||||
**
|
**
|
||||||
** ^SQLite will always allocate at least mxPathname+1 bytes for the
|
** ^SQLite will always allocate at least mxPathname+1 bytes for the
|
||||||
** output buffer xFullPathname. The exact size of the output buffer
|
** output buffer xFullPathname. The exact size of the output buffer
|
||||||
@ -2087,6 +2093,17 @@ struct sqlite3_mem_methods {
|
|||||||
** following this call. The second parameter may be a NULL pointer, in
|
** following this call. The second parameter may be a NULL pointer, in
|
||||||
** which case the trigger setting is not reported back. </dd>
|
** which case the trigger setting is not reported back. </dd>
|
||||||
**
|
**
|
||||||
|
** [[SQLITE_DBCONFIG_ENABLE_VIEW]]
|
||||||
|
** <dt>SQLITE_DBCONFIG_ENABLE_VIEW</dt>
|
||||||
|
** <dd> ^This option is used to enable or disable [CREATE VIEW | views].
|
||||||
|
** There should be two additional arguments.
|
||||||
|
** The first argument is an integer which is 0 to disable views,
|
||||||
|
** positive to enable views or negative to leave the setting unchanged.
|
||||||
|
** The second parameter is a pointer to an integer into which
|
||||||
|
** is written 0 or 1 to indicate whether views are disabled or enabled
|
||||||
|
** following this call. The second parameter may be a NULL pointer, in
|
||||||
|
** which case the view setting is not reported back. </dd>
|
||||||
|
**
|
||||||
** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]]
|
** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]]
|
||||||
** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
|
** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
|
||||||
** <dd> ^This option is used to enable or disable the
|
** <dd> ^This option is used to enable or disable the
|
||||||
@ -2198,6 +2215,7 @@ struct sqlite3_mem_methods {
|
|||||||
** features include but are not limited to the following:
|
** features include but are not limited to the following:
|
||||||
** <ul>
|
** <ul>
|
||||||
** <li> The [PRAGMA writable_schema=ON] statement.
|
** <li> The [PRAGMA writable_schema=ON] statement.
|
||||||
|
** <li> The [PRAGMA journal_mode=OFF] statement.
|
||||||
** <li> Writes to the [sqlite_dbpage] virtual table.
|
** <li> Writes to the [sqlite_dbpage] virtual table.
|
||||||
** <li> Direct writes to [shadow tables].
|
** <li> Direct writes to [shadow tables].
|
||||||
** </ul>
|
** </ul>
|
||||||
@ -2213,6 +2231,34 @@ struct sqlite3_mem_methods {
|
|||||||
** integer into which is written 0 or 1 to indicate whether the writable_schema
|
** integer into which is written 0 or 1 to indicate whether the writable_schema
|
||||||
** is enabled or disabled following this call.
|
** is enabled or disabled following this call.
|
||||||
** </dd>
|
** </dd>
|
||||||
|
**
|
||||||
|
** [[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE]]
|
||||||
|
** <dt>SQLITE_DBCONFIG_LEGACY_ALTER_TABLE</dt>
|
||||||
|
** <dd>The SQLITE_DBCONFIG_LEGACY_ALTER_TABLE option activates or deactivates
|
||||||
|
** the legacy behavior of the [ALTER TABLE RENAME] command such it
|
||||||
|
** behaves as it did prior to [version 3.24.0] (2018-06-04). See the
|
||||||
|
** "Compatibility Notice" on the [ALTER TABLE RENAME documentation] for
|
||||||
|
** additional information. This feature can also be turned on and off
|
||||||
|
** using the [PRAGMA legacy_alter_table] statement.
|
||||||
|
** </dd>
|
||||||
|
**
|
||||||
|
** [[SQLITE_DBCONFIG_DQS_DML]]
|
||||||
|
** <dt>SQLITE_DBCONFIG_DQS_DML</td>
|
||||||
|
** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates
|
||||||
|
** the legacy [double-quoted string literal] misfeature for DML statement
|
||||||
|
** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The
|
||||||
|
** default value of this setting is determined by the [-DSQLITE_DQS]
|
||||||
|
** compile-time option.
|
||||||
|
** </dd>
|
||||||
|
**
|
||||||
|
** [[SQLITE_DBCONFIG_DQS_DDL]]
|
||||||
|
** <dt>SQLITE_DBCONFIG_DQS_DDL</td>
|
||||||
|
** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates
|
||||||
|
** the legacy [double-quoted string literal] misfeature for DDL statements,
|
||||||
|
** such as CREATE TABLE and CREATE INDEX. The
|
||||||
|
** default value of this setting is determined by the [-DSQLITE_DQS]
|
||||||
|
** compile-time option.
|
||||||
|
** </dd>
|
||||||
** </dl>
|
** </dl>
|
||||||
*/
|
*/
|
||||||
#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
|
#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
|
||||||
@ -2227,7 +2273,11 @@ struct sqlite3_mem_methods {
|
|||||||
#define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */
|
#define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */
|
||||||
#define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */
|
#define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */
|
||||||
#define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */
|
#define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */
|
||||||
#define SQLITE_DBCONFIG_MAX 1011 /* Largest DBCONFIG */
|
#define SQLITE_DBCONFIG_LEGACY_ALTER_TABLE 1012 /* int int* */
|
||||||
|
#define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */
|
||||||
|
#define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */
|
||||||
|
#define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */
|
||||||
|
#define SQLITE_DBCONFIG_MAX 1015 /* Largest DBCONFIG */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Enable Or Disable Extended Result Codes
|
** CAPI3REF: Enable Or Disable Extended Result Codes
|
||||||
@ -3776,7 +3826,7 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
|
|||||||
** ^The specific value of WHERE-clause [parameter] might influence the
|
** ^The specific value of WHERE-clause [parameter] might influence the
|
||||||
** choice of query plan if the parameter is the left-hand side of a [LIKE]
|
** choice of query plan if the parameter is the left-hand side of a [LIKE]
|
||||||
** or [GLOB] operator or if the parameter is compared to an indexed column
|
** or [GLOB] operator or if the parameter is compared to an indexed column
|
||||||
** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
|
** and the [SQLITE_ENABLE_STAT4] compile-time option is enabled.
|
||||||
** </li>
|
** </li>
|
||||||
** </ol>
|
** </ol>
|
||||||
**
|
**
|
||||||
@ -4811,6 +4861,12 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
|||||||
** perform additional optimizations on deterministic functions, so use
|
** perform additional optimizations on deterministic functions, so use
|
||||||
** of the [SQLITE_DETERMINISTIC] flag is recommended where possible.
|
** of the [SQLITE_DETERMINISTIC] flag is recommended where possible.
|
||||||
**
|
**
|
||||||
|
** ^The fourth parameter may also optionally include the [SQLITE_DIRECTONLY]
|
||||||
|
** flag, which if present prevents the function from being invoked from
|
||||||
|
** within VIEWs or TRIGGERs. For security reasons, the [SQLITE_DIRECTONLY]
|
||||||
|
** flag is recommended for any application-defined SQL function that has
|
||||||
|
** side-effects.
|
||||||
|
**
|
||||||
** ^(The fifth parameter is an arbitrary pointer. The implementation of the
|
** ^(The fifth parameter is an arbitrary pointer. The implementation of the
|
||||||
** function can gain access to this pointer using [sqlite3_user_data()].)^
|
** function can gain access to this pointer using [sqlite3_user_data()].)^
|
||||||
**
|
**
|
||||||
@ -4927,8 +4983,30 @@ SQLITE_API int sqlite3_create_window_function(
|
|||||||
** [SQLITE_UTF8 | preferred text encoding] as the fourth argument
|
** [SQLITE_UTF8 | preferred text encoding] as the fourth argument
|
||||||
** to [sqlite3_create_function()], [sqlite3_create_function16()], or
|
** to [sqlite3_create_function()], [sqlite3_create_function16()], or
|
||||||
** [sqlite3_create_function_v2()].
|
** [sqlite3_create_function_v2()].
|
||||||
|
**
|
||||||
|
** The SQLITE_DETERMINISTIC flag means that the new function will always
|
||||||
|
** maps the same inputs into the same output. The abs() function is
|
||||||
|
** deterministic, for example, but randomblob() is not.
|
||||||
|
**
|
||||||
|
** The SQLITE_DIRECTONLY flag means that the function may only be invoked
|
||||||
|
** from top-level SQL, and cannot be used in VIEWs or TRIGGERs. This is
|
||||||
|
** a security feature which is recommended for all
|
||||||
|
** [application-defined SQL functions] that have side-effects. This flag
|
||||||
|
** prevents an attacker from adding triggers and views to a schema then
|
||||||
|
** tricking a high-privilege application into causing unintended side-effects
|
||||||
|
** while performing ordinary queries.
|
||||||
|
**
|
||||||
|
** The SQLITE_SUBTYPE flag indicates to SQLite that a function may call
|
||||||
|
** [sqlite3_value_subtype()] to inspect the sub-types of its arguments.
|
||||||
|
** Specifying this flag makes no difference for scalar or aggregate user
|
||||||
|
** functions. However, if it is not specified for a user-defined window
|
||||||
|
** function, then any sub-types belonging to arguments passed to the window
|
||||||
|
** function may be discarded before the window function is called (i.e.
|
||||||
|
** sqlite3_value_subtype() will always return 0).
|
||||||
*/
|
*/
|
||||||
#define SQLITE_DETERMINISTIC 0x800
|
#define SQLITE_DETERMINISTIC 0x000000800
|
||||||
|
#define SQLITE_DIRECTONLY 0x000080000
|
||||||
|
#define SQLITE_SUBTYPE 0x000100000
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Deprecated Functions
|
** CAPI3REF: Deprecated Functions
|
||||||
@ -6574,6 +6652,12 @@ struct sqlite3_index_info {
|
|||||||
** ^The sqlite3_create_module()
|
** ^The sqlite3_create_module()
|
||||||
** interface is equivalent to sqlite3_create_module_v2() with a NULL
|
** interface is equivalent to sqlite3_create_module_v2() with a NULL
|
||||||
** destructor.
|
** destructor.
|
||||||
|
**
|
||||||
|
** ^If the third parameter (the pointer to the sqlite3_module object) is
|
||||||
|
** NULL then no new module is create and any existing modules with the
|
||||||
|
** same name are dropped.
|
||||||
|
**
|
||||||
|
** See also: [sqlite3_drop_modules()]
|
||||||
*/
|
*/
|
||||||
SQLITE_API int sqlite3_create_module(
|
SQLITE_API int sqlite3_create_module(
|
||||||
sqlite3 *db, /* SQLite connection to register module with */
|
sqlite3 *db, /* SQLite connection to register module with */
|
||||||
@ -6589,6 +6673,23 @@ SQLITE_API int sqlite3_create_module_v2(
|
|||||||
void(*xDestroy)(void*) /* Module destructor function */
|
void(*xDestroy)(void*) /* Module destructor function */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
** CAPI3REF: Remove Unnecessary Virtual Table Implementations
|
||||||
|
** METHOD: sqlite3
|
||||||
|
**
|
||||||
|
** ^The sqlite3_drop_modules(D,L) interface removes all virtual
|
||||||
|
** table modules from database connection D except those named on list L.
|
||||||
|
** The L parameter must be either NULL or a pointer to an array of pointers
|
||||||
|
** to strings where the array is terminated by a single NULL pointer.
|
||||||
|
** ^If the L parameter is NULL, then all virtual table modules are removed.
|
||||||
|
**
|
||||||
|
** See also: [sqlite3_create_module()]
|
||||||
|
*/
|
||||||
|
SQLITE_API int sqlite3_drop_modules(
|
||||||
|
sqlite3 *db, /* Remove modules from this connection */
|
||||||
|
const char **azKeep /* Except, do not remove the ones named here */
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Virtual Table Instance Object
|
** CAPI3REF: Virtual Table Instance Object
|
||||||
** KEYWORDS: sqlite3_vtab
|
** KEYWORDS: sqlite3_vtab
|
||||||
@ -7297,7 +7398,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|||||||
#define SQLITE_TESTCTRL_FIRST 5
|
#define SQLITE_TESTCTRL_FIRST 5
|
||||||
#define SQLITE_TESTCTRL_PRNG_SAVE 5
|
#define SQLITE_TESTCTRL_PRNG_SAVE 5
|
||||||
#define SQLITE_TESTCTRL_PRNG_RESTORE 6
|
#define SQLITE_TESTCTRL_PRNG_RESTORE 6
|
||||||
#define SQLITE_TESTCTRL_PRNG_RESET 7
|
#define SQLITE_TESTCTRL_PRNG_RESET 7 /* NOT USED */
|
||||||
#define SQLITE_TESTCTRL_BITVEC_TEST 8
|
#define SQLITE_TESTCTRL_BITVEC_TEST 8
|
||||||
#define SQLITE_TESTCTRL_FAULT_INSTALL 9
|
#define SQLITE_TESTCTRL_FAULT_INSTALL 9
|
||||||
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
|
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
|
||||||
@ -7319,7 +7420,10 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|||||||
#define SQLITE_TESTCTRL_SORTER_MMAP 24
|
#define SQLITE_TESTCTRL_SORTER_MMAP 24
|
||||||
#define SQLITE_TESTCTRL_IMPOSTER 25
|
#define SQLITE_TESTCTRL_IMPOSTER 25
|
||||||
#define SQLITE_TESTCTRL_PARSER_COVERAGE 26
|
#define SQLITE_TESTCTRL_PARSER_COVERAGE 26
|
||||||
#define SQLITE_TESTCTRL_LAST 26 /* Largest TESTCTRL */
|
#define SQLITE_TESTCTRL_RESULT_INTREAL 27
|
||||||
|
#define SQLITE_TESTCTRL_PRNG_SEED 28
|
||||||
|
#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29
|
||||||
|
#define SQLITE_TESTCTRL_LAST 29 /* Largest TESTCTRL */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: SQL Keyword Checking
|
** CAPI3REF: SQL Keyword Checking
|
||||||
|
@ -132,23 +132,6 @@ public class QtActivityLoader extends QtLoader {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT < 16) {
|
|
||||||
// fatal error, show the error and quit
|
|
||||||
AlertDialog errorDialog = new AlertDialog.Builder(m_activity).create();
|
|
||||||
if (m_contextInfo.metaData.containsKey("android.app.unsupported_android_version"))
|
|
||||||
errorDialog.setMessage(m_contextInfo.metaData.getString("android.app.unsupported_android_version"));
|
|
||||||
else
|
|
||||||
errorDialog.setMessage("Unsupported Android version.");
|
|
||||||
errorDialog.setButton(m_activity.getResources().getString(android.R.string.ok), new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
errorDialog.show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
m_activity.setTheme(Class.forName("android.R$style").getDeclaredField(QT_ANDROID_DEFAULT_THEME).getInt(null));
|
m_activity.setTheme(Class.forName("android.R$style").getDeclaredField(QT_ANDROID_DEFAULT_THEME).getInt(null));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -59,7 +59,7 @@ macro(QT5_MAKE_OUTPUT_FILE infile prefix ext outfile )
|
|||||||
set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
||||||
string(REPLACE ".." "__" _outfile ${_outfile})
|
string(REPLACE ".." "__" _outfile ${_outfile})
|
||||||
get_filename_component(outpath ${_outfile} PATH)
|
get_filename_component(outpath ${_outfile} PATH)
|
||||||
get_filename_component(_outfile ${_outfile} NAME_WE)
|
string(REGEX REPLACE "\\.[^.]*$" "" _outfile ${_outfile})
|
||||||
file(MAKE_DIRECTORY ${outpath})
|
file(MAKE_DIRECTORY ${outpath})
|
||||||
set(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
|
set(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
@ -90,42 +90,6 @@ DECLSPEC_IMPORT BOOLEAN WINAPI SystemFunction036(PVOID RandomBuffer, ULONG Rando
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
|
|
||||||
static qsizetype qt_random_cpu(void *buffer, qsizetype count) Q_DECL_NOTHROW;
|
|
||||||
|
|
||||||
# ifdef Q_PROCESSOR_X86_64
|
|
||||||
# define _rdrandXX_step _rdrand64_step
|
|
||||||
# else
|
|
||||||
# define _rdrandXX_step _rdrand32_step
|
|
||||||
# endif
|
|
||||||
|
|
||||||
static QT_FUNCTION_TARGET(RDRND) qsizetype qt_random_cpu(void *buffer, qsizetype count) Q_DECL_NOTHROW
|
|
||||||
{
|
|
||||||
unsigned *ptr = reinterpret_cast<unsigned *>(buffer);
|
|
||||||
unsigned *end = ptr + count;
|
|
||||||
|
|
||||||
while (ptr + sizeof(qregisteruint)/sizeof(*ptr) <= end) {
|
|
||||||
if (_rdrandXX_step(reinterpret_cast<qregisteruint *>(ptr)) == 0)
|
|
||||||
goto out;
|
|
||||||
ptr += sizeof(qregisteruint)/sizeof(*ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sizeof(*ptr) != sizeof(qregisteruint) && ptr != end) {
|
|
||||||
if (_rdrand32_step(ptr))
|
|
||||||
goto out;
|
|
||||||
++ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
return ptr - reinterpret_cast<unsigned *>(buffer);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
static qsizetype qt_random_cpu(void *, qsizetype)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
// may be "overridden" by a member enum
|
// may be "overridden" by a member enum
|
||||||
FillBufferNoexcept = true
|
FillBufferNoexcept = true
|
||||||
@ -366,8 +330,8 @@ Q_NEVER_INLINE void QRandomGenerator::SystemGenerator::generate(quint32 *begin,
|
|||||||
}
|
}
|
||||||
|
|
||||||
qsizetype filled = 0;
|
qsizetype filled = 0;
|
||||||
if (qt_has_hwrng() && (uint(qt_randomdevice_control) & SkipHWRNG) == 0)
|
if (qHasHwrng() && (uint(qt_randomdevice_control) & SkipHWRNG) == 0)
|
||||||
filled += qt_random_cpu(buffer, count);
|
filled += qRandomCpu(buffer, count);
|
||||||
|
|
||||||
if (filled != count && (uint(qt_randomdevice_control) & SkipSystemRNG) == 0) {
|
if (filled != count && (uint(qt_randomdevice_control) & SkipSystemRNG) == 0) {
|
||||||
qsizetype bytesFilled =
|
qsizetype bytesFilled =
|
||||||
|
@ -79,14 +79,6 @@ extern Q_CORE_EXPORT QBasicAtomicInteger<uint> qt_randomdevice_control;
|
|||||||
enum { qt_randomdevice_control = 0 };
|
enum { qt_randomdevice_control = 0 };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline bool qt_has_hwrng()
|
|
||||||
{
|
|
||||||
#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
|
|
||||||
return qCpuHasFeature(RDRND);
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -69,7 +69,9 @@ static bool checkNameDecodable(const char *d_name, qsizetype len)
|
|||||||
# ifdef QT_LOCALE_IS_UTF8
|
# ifdef QT_LOCALE_IS_UTF8
|
||||||
int mibEnum = 106;
|
int mibEnum = 106;
|
||||||
# else
|
# else
|
||||||
int mibEnum = codec->mibEnum();
|
int mibEnum = 4; // Latin 1
|
||||||
|
if (codec)
|
||||||
|
mibEnum = codec->mibEnum();
|
||||||
# endif
|
# endif
|
||||||
if (Q_LIKELY(mibEnum == 106)) // UTF-8
|
if (Q_LIKELY(mibEnum == 106)) // UTF-8
|
||||||
return QUtf8::isValidUtf8(d_name, len).isValidUtf8;
|
return QUtf8::isValidUtf8(d_name, len).isValidUtf8;
|
||||||
|
@ -83,7 +83,10 @@ enum {
|
|||||||
WM_QT_SOCKETNOTIFIER = WM_USER,
|
WM_QT_SOCKETNOTIFIER = WM_USER,
|
||||||
WM_QT_SENDPOSTEDEVENTS = WM_USER + 1,
|
WM_QT_SENDPOSTEDEVENTS = WM_USER + 1,
|
||||||
WM_QT_ACTIVATENOTIFIERS = WM_USER + 2,
|
WM_QT_ACTIVATENOTIFIERS = WM_USER + 2,
|
||||||
SendPostedEventsWindowsTimerId = ~1u
|
};
|
||||||
|
|
||||||
|
enum : UINT_PTR {
|
||||||
|
SendPostedEventsWindowsTimerId = ~UINT_PTR(1)
|
||||||
};
|
};
|
||||||
|
|
||||||
class QEventDispatcherWin32Private;
|
class QEventDispatcherWin32Private;
|
||||||
@ -278,7 +281,7 @@ LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
|
|||||||
// no more input or timer events in the message queue, we can allow posted events to be sent normally now
|
// no more input or timer events in the message queue, we can allow posted events to be sent normally now
|
||||||
if (d->sendPostedEventsWindowsTimerId != 0) {
|
if (d->sendPostedEventsWindowsTimerId != 0) {
|
||||||
// stop the timer to send posted events, since we now allow the WM_QT_SENDPOSTEDEVENTS message
|
// stop the timer to send posted events, since we now allow the WM_QT_SENDPOSTEDEVENTS message
|
||||||
KillTimer(d->internalHwnd, d->sendPostedEventsWindowsTimerId);
|
KillTimer(d->internalHwnd, SendPostedEventsWindowsTimerId);
|
||||||
d->sendPostedEventsWindowsTimerId = 0;
|
d->sendPostedEventsWindowsTimerId = 0;
|
||||||
}
|
}
|
||||||
(void) d->wakeUps.fetchAndStoreRelease(0);
|
(void) d->wakeUps.fetchAndStoreRelease(0);
|
||||||
|
@ -173,7 +173,8 @@ public:
|
|||||||
|
|
||||||
// for controlling when to send posted events
|
// for controlling when to send posted events
|
||||||
QAtomicInt serialNumber;
|
QAtomicInt serialNumber;
|
||||||
int lastSerialNumber, sendPostedEventsWindowsTimerId;
|
int lastSerialNumber;
|
||||||
|
UINT_PTR sendPostedEventsWindowsTimerId;
|
||||||
QAtomicInt wakeUps;
|
QAtomicInt wakeUps;
|
||||||
|
|
||||||
// timers
|
// timers
|
||||||
|
@ -232,7 +232,7 @@ QObjectPrivate::QObjectPrivate(int version)
|
|||||||
receiveChildEvents = true;
|
receiveChildEvents = true;
|
||||||
postedEvents = 0;
|
postedEvents = 0;
|
||||||
extraData = 0;
|
extraData = 0;
|
||||||
connectedSignals[0] = connectedSignals[1] = 0;
|
// connectedSignals[0] = connectedSignals[1] = 0; // already 0.
|
||||||
metaObject = 0;
|
metaObject = 0;
|
||||||
isWindow = false;
|
isWindow = false;
|
||||||
deleteLaterCalled = false;
|
deleteLaterCalled = false;
|
||||||
@ -411,9 +411,10 @@ void QObjectPrivate::addConnection(int signal, Connection *c)
|
|||||||
c->next->prev = &c->next;
|
c->next->prev = &c->next;
|
||||||
|
|
||||||
if (signal < 0) {
|
if (signal < 0) {
|
||||||
connectedSignals[0] = connectedSignals[1] = ~0;
|
connectedSignals[0].store(~0);
|
||||||
|
connectedSignals[1].store(~0);
|
||||||
} else if (signal < (int)sizeof(connectedSignals) * 8) {
|
} else if (signal < (int)sizeof(connectedSignals) * 8) {
|
||||||
connectedSignals[signal >> 5] |= (1 << (signal & 0x1f));
|
connectedSignals[signal >> 5].store(connectedSignals[signal >> 5].load() | (1 << (signal & 0x1f)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,7 +456,7 @@ void QObjectPrivate::cleanConnectionLists()
|
|||||||
if (!allConnected && !connected && signal >= 0
|
if (!allConnected && !connected && signal >= 0
|
||||||
&& size_t(signal) < sizeof(connectedSignals) * 8) {
|
&& size_t(signal) < sizeof(connectedSignals) * 8) {
|
||||||
// This signal is no longer connected
|
// This signal is no longer connected
|
||||||
connectedSignals[signal >> 5] &= ~(1 << (signal & 0x1f));
|
connectedSignals[signal >> 5].store(connectedSignals[signal >> 5].load() & ~(1 << (signal & 0x1f)));
|
||||||
} else if (signal == -1) {
|
} else if (signal == -1) {
|
||||||
allConnected = connected;
|
allConnected = connected;
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ public:
|
|||||||
|
|
||||||
Connection *senders; // linked list of connections connected to this object
|
Connection *senders; // linked list of connections connected to this object
|
||||||
Sender *currentSender; // object currently activating the object
|
Sender *currentSender; // object currently activating the object
|
||||||
mutable quint32 connectedSignals[2];
|
mutable QAtomicInteger<quint32> connectedSignals[2];
|
||||||
|
|
||||||
union {
|
union {
|
||||||
QObject *currentChildBeingDeleted; // should only be used when QObjectData::isDeletingChildren is set
|
QObject *currentChildBeingDeleted; // should only be used when QObjectData::isDeletingChildren is set
|
||||||
@ -257,7 +257,7 @@ Q_DECLARE_TYPEINFO(QObjectPrivate::ConnectionList, Q_MOVABLE_TYPE);
|
|||||||
inline bool QObjectPrivate::isSignalConnected(uint signal_index, bool checkDeclarative) const
|
inline bool QObjectPrivate::isSignalConnected(uint signal_index, bool checkDeclarative) const
|
||||||
{
|
{
|
||||||
return signal_index >= sizeof(connectedSignals) * 8
|
return signal_index >= sizeof(connectedSignals) * 8
|
||||||
|| (connectedSignals[signal_index >> 5] & (1 << (signal_index & 0x1f))
|
|| (connectedSignals[signal_index >> 5].load() & (1 << (signal_index & 0x1f))
|
||||||
|| (checkDeclarative && isDeclarativeSignalConnected(signal_index)));
|
|| (checkDeclarative && isDeclarativeSignalConnected(signal_index)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
** Copyright (C) 2018 Intel Corporation
|
** Copyright (C) 2020 Intel Corporation
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the QtCore module of the Qt Toolkit.
|
** This file is part of the QtCore module of the Qt Toolkit.
|
||||||
@ -208,6 +208,8 @@ bool QLibraryPrivate::load_sys()
|
|||||||
for(int suffix = 0; retry && !pHnd && suffix < suffixes.size(); suffix++) {
|
for(int suffix = 0; retry && !pHnd && suffix < suffixes.size(); suffix++) {
|
||||||
if (!prefixes.at(prefix).isEmpty() && name.startsWith(prefixes.at(prefix)))
|
if (!prefixes.at(prefix).isEmpty() && name.startsWith(prefixes.at(prefix)))
|
||||||
continue;
|
continue;
|
||||||
|
if (path.isEmpty() && prefixes.at(prefix).contains(QLatin1Char('/')))
|
||||||
|
continue;
|
||||||
if (!suffixes.at(suffix).isEmpty() && name.endsWith(suffixes.at(suffix)))
|
if (!suffixes.at(suffix).isEmpty() && name.endsWith(suffixes.at(suffix)))
|
||||||
continue;
|
continue;
|
||||||
if (loadHints & QLibrary::LoadArchiveMemberHint) {
|
if (loadHints & QLibrary::LoadArchiveMemberHint) {
|
||||||
|
@ -305,7 +305,6 @@ static QString locatePlugin(const QString& fileName)
|
|||||||
paths.append(fileName.left(slash)); // don't include the '/'
|
paths.append(fileName.left(slash)); // don't include the '/'
|
||||||
} else {
|
} else {
|
||||||
paths = QCoreApplication::libraryPaths();
|
paths = QCoreApplication::libraryPaths();
|
||||||
paths.prepend(QStringLiteral(".")); // search in current dir first
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const QString &path : qAsConst(paths)) {
|
for (const QString &path : qAsConst(paths)) {
|
||||||
|
@ -222,7 +222,9 @@ public:
|
|||||||
for (int i = 0; i < str.length(); ++i)
|
for (int i = 0; i < str.length(); ++i)
|
||||||
d->utf16[i] = uc[i];
|
d->utf16[i] = uc[i];
|
||||||
#else
|
#else
|
||||||
memcpy(d->utf16, str.unicode(), str.length()*sizeof(ushort));
|
memcpy(static_cast<void *>(d->utf16),
|
||||||
|
static_cast<const void *>(str.unicode()),
|
||||||
|
str.length()*sizeof(ushort));
|
||||||
#endif
|
#endif
|
||||||
if (str.length() & 1)
|
if (str.length() & 1)
|
||||||
d->utf16[str.length()] = 0;
|
d->utf16[str.length()] = 0;
|
||||||
|
@ -3028,15 +3028,15 @@ inline qint64 QDateTimePrivate::zoneMSecsToEpochMSecs(qint64 zoneMSecs, const QT
|
|||||||
datetime by adding a number of seconds, days, months, or years.
|
datetime by adding a number of seconds, days, months, or years.
|
||||||
|
|
||||||
QDateTime can describe datetimes with respect to \l{Qt::LocalTime}{local
|
QDateTime can describe datetimes with respect to \l{Qt::LocalTime}{local
|
||||||
time}, to \l{Qt::UTC}{UTC}, to a specified \l{Qt::OffsetFromUTC}{offset
|
time}, to \l{Qt::UTC}{UTC}, to a specified \l{Qt::OffsetFromUTC}{offset from
|
||||||
from UTC} or to a specified \l{{Qt::TimeZone}{time zone}, in conjunction
|
UTC} or to a specified \l{Qt::TimeZone}{time zone}, in conjunction with the
|
||||||
with the QTimeZone class. For example, a time zone of "Europe/Berlin" will
|
QTimeZone class. For example, a time zone of "Europe/Berlin" will apply the
|
||||||
apply the daylight-saving rules as used in Germany since 1970. In contrast,
|
daylight-saving rules as used in Germany since 1970. In contrast, an offset
|
||||||
an offset from UTC of +3600 seconds is one hour ahead of UTC (usually
|
from UTC of +3600 seconds is one hour ahead of UTC (usually written in ISO
|
||||||
written in ISO standard notation as "UTC+01:00"), with no daylight-saving
|
standard notation as "UTC+01:00"), with no daylight-saving offset or
|
||||||
offset or changes. When using either local time or a specified time zone,
|
changes. When using either local time or a specified time zone, time-zone
|
||||||
time-zone transitions such as the starts and ends of daylight-saving time
|
transitions such as the starts and ends of daylight-saving time (DST; but
|
||||||
(DST) are taken into account. The choice of system used to represent a
|
see below) are taken into account. The choice of system used to represent a
|
||||||
datetime is described as its "timespec".
|
datetime is described as its "timespec".
|
||||||
|
|
||||||
A QDateTime object is typically created either by giving a date and time
|
A QDateTime object is typically created either by giving a date and time
|
||||||
@ -3124,11 +3124,13 @@ inline qint64 QDateTimePrivate::zoneMSecsToEpochMSecs(qint64 zoneMSecs, const QT
|
|||||||
|
|
||||||
The range of valid dates taking DST into account is 1970-01-01 to the
|
The range of valid dates taking DST into account is 1970-01-01 to the
|
||||||
present, and rules are in place for handling DST correctly until 2037-12-31,
|
present, and rules are in place for handling DST correctly until 2037-12-31,
|
||||||
but these could change. For dates falling outside that range, QDateTime
|
but these could change. For dates after 2037, QDateTime makes a \e{best
|
||||||
makes a \e{best guess} using the rules for year 1970 or 2037, but we can't
|
guess} using the rules for year 2037, but we can't guarantee accuracy;
|
||||||
guarantee accuracy. This means QDateTime doesn't take into account changes
|
indeed, for \e{any} future date, the time-zone may change its rules before
|
||||||
in a time zone before 1970, even if the system's time zone database provides
|
that date comes around. For dates before 1970, QDateTime doesn't take DST
|
||||||
that information.
|
changes into account, even if the system's time zone database provides that
|
||||||
|
information, although it does take into account changes to the time-zone's
|
||||||
|
standard offset, where this information is available.
|
||||||
|
|
||||||
\section2 Offsets From UTC
|
\section2 Offsets From UTC
|
||||||
|
|
||||||
@ -3374,17 +3376,22 @@ QTimeZone QDateTime::timeZone() const
|
|||||||
/*!
|
/*!
|
||||||
\since 5.2
|
\since 5.2
|
||||||
|
|
||||||
Returns the current Offset From UTC in seconds.
|
Returns this date-time's Offset From UTC in seconds.
|
||||||
|
|
||||||
If the timeSpec() is Qt::OffsetFromUTC this will be the value originally set.
|
The result depends on timeSpec():
|
||||||
|
\list
|
||||||
|
\li \c Qt::UTC The offset is 0.
|
||||||
|
\li \c Qt::OffsetFromUTC The offset is the value originally set.
|
||||||
|
\li \c Qt::LocalTime The local time's offset from UTC is returned.
|
||||||
|
\li \c Qt::TimeZone The offset used by the time-zone is returned.
|
||||||
|
\endlist
|
||||||
|
|
||||||
If the timeSpec() is Qt::TimeZone this will be the offset effective in the
|
For the last two, the offset at this date and time will be returned, taking
|
||||||
Time Zone including any Daylight-Saving Offset.
|
account of Daylight-Saving Offset unless the date precedes the start of
|
||||||
|
1970. The offset is the difference between the local time or time in the
|
||||||
If the timeSpec() is Qt::LocalTime this will be the difference between the
|
given time-zone and UTC time; it is positive in time-zones ahead of UTC
|
||||||
Local Time and UTC including any Daylight-Saving Offset.
|
(East of The Prime Meridian), negative for those behind UTC (West of The
|
||||||
|
Prime Meridian).
|
||||||
If the timeSpec() is Qt::UTC this will be 0.
|
|
||||||
|
|
||||||
\sa setOffsetFromUtc()
|
\sa setOffsetFromUtc()
|
||||||
*/
|
*/
|
||||||
|
@ -106,7 +106,8 @@ Q_CORE_EXPORT Q_DECL_PURE_FUNCTION uint qt_hash(QStringView key, uint chained =
|
|||||||
|
|
||||||
Q_DECL_CONST_FUNCTION inline uint qHash(std::nullptr_t, uint seed = 0) Q_DECL_NOTHROW
|
Q_DECL_CONST_FUNCTION inline uint qHash(std::nullptr_t, uint seed = 0) Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
return qHash(reinterpret_cast<quintptr>(nullptr), seed);
|
const void *ptr = nullptr; // work-around for MSVC's reinterpret_cast bug
|
||||||
|
return qHash(reinterpret_cast<quintptr>(ptr), seed);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T> inline uint qHash(const T *key, uint seed = 0) Q_DECL_NOTHROW
|
template <class T> inline uint qHash(const T *key, uint seed = 0) Q_DECL_NOTHROW
|
||||||
|
@ -339,6 +339,22 @@ QByteArray QLocalePrivate::bcp47Name(char separator) const
|
|||||||
return localeId.withLikelySubtagsRemoved().name(separator);
|
return localeId.withLikelySubtagsRemoved().name(separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\internal
|
||||||
|
*/
|
||||||
|
QByteArray QLocalePrivate::rawName(char separator) const
|
||||||
|
{
|
||||||
|
QByteArrayList parts;
|
||||||
|
if (m_data->m_language_id != QLocale::AnyLanguage)
|
||||||
|
parts.append(languageCode().latin1());
|
||||||
|
if (m_data->m_script_id != QLocale::AnyScript)
|
||||||
|
parts.append(scriptCode().latin1());
|
||||||
|
if (m_data->m_country_id != QLocale::AnyCountry)
|
||||||
|
parts.append(countryCode().latin1());
|
||||||
|
|
||||||
|
return parts.join(separator);
|
||||||
|
}
|
||||||
|
|
||||||
static const QLocaleData *findLocaleDataById(const QLocaleId &localeId)
|
static const QLocaleData *findLocaleDataById(const QLocaleId &localeId)
|
||||||
{
|
{
|
||||||
const uint idx = locale_index[localeId.language_id];
|
const uint idx = locale_index[localeId.language_id];
|
||||||
@ -3973,29 +3989,63 @@ QString QLocale::formattedDataSize(qint64 bytes, int precision, DataSizeFormats
|
|||||||
*/
|
*/
|
||||||
QStringList QLocale::uiLanguages() const
|
QStringList QLocale::uiLanguages() const
|
||||||
{
|
{
|
||||||
|
QStringList uiLanguages;
|
||||||
|
QVector<QLocale> locales;
|
||||||
#ifndef QT_NO_SYSTEMLOCALE
|
#ifndef QT_NO_SYSTEMLOCALE
|
||||||
if (d->m_data == systemData()) {
|
if (d->m_data == systemData()) {
|
||||||
QVariant res = systemLocale()->query(QSystemLocale::UILanguages, QVariant());
|
QVariant res = systemLocale()->query(QSystemLocale::UILanguages, QVariant());
|
||||||
if (!res.isNull()) {
|
if (!res.isNull()) {
|
||||||
QStringList result = res.toStringList();
|
uiLanguages = res.toStringList();
|
||||||
if (!result.isEmpty())
|
// ... but we need to include likely-adjusted forms of each of those, too:
|
||||||
return result;
|
for (const auto entry : qAsConst(uiLanguages))
|
||||||
|
locales.append(QLocale(entry));
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
#endif
|
#endif
|
||||||
QLocaleId id = QLocaleId::fromIds(d->m_data->m_language_id, d->m_data->m_script_id, d->m_data->m_country_id);
|
{
|
||||||
const QLocaleId max = id.withLikelySubtagsAdded();
|
locales.append(*this);
|
||||||
const QLocaleId min = max.withLikelySubtagsRemoved();
|
}
|
||||||
|
for (int i = locales.size(); i-- > 0; ) {
|
||||||
QStringList uiLanguages;
|
const QLocale &locale = locales.at(i);
|
||||||
uiLanguages.append(QString::fromLatin1(min.name()));
|
int j;
|
||||||
if (id.script_id) {
|
QByteArray prior;
|
||||||
id.script_id = 0;
|
if (i < uiLanguages.size()) {
|
||||||
if (id != min && id.withLikelySubtagsAdded() == max)
|
// Adding likely-adjusted forms to system locale's list.
|
||||||
uiLanguages.append(QString::fromLatin1(id.name()));
|
// Name the locale is derived from:
|
||||||
|
const QString &name = uiLanguages.at(i);
|
||||||
|
prior = name.toLatin1();
|
||||||
|
// Don't try to likely-adjust if construction's likely-adjustments
|
||||||
|
// were so drastic the result doesn't match the prior name:
|
||||||
|
if (locale.name() != name && locale.d->rawName() != prior)
|
||||||
|
continue;
|
||||||
|
// Insert just after prior:
|
||||||
|
j = i + 1;
|
||||||
|
} else {
|
||||||
|
// Plain locale, not system locale; just append.
|
||||||
|
j = uiLanguages.size();
|
||||||
|
}
|
||||||
|
const auto data = locale.d->m_data;
|
||||||
|
|
||||||
|
QLocaleId id
|
||||||
|
= QLocaleId::fromIds(data->m_language_id, data->m_script_id, data->m_country_id);
|
||||||
|
const QLocaleId max = id.withLikelySubtagsAdded();
|
||||||
|
const QLocaleId min = max.withLikelySubtagsRemoved();
|
||||||
|
id.script_id = 0; // For re-use as script-less variant.
|
||||||
|
|
||||||
|
// Include version with all likely sub-tags (last) if distinct from the rest:
|
||||||
|
if (max != min && max != id && max.name() != prior)
|
||||||
|
uiLanguages.insert(j, QString::fromLatin1(max.name()));
|
||||||
|
|
||||||
|
// Include scriptless version if likely-equivalent and distinct:
|
||||||
|
if (data->m_script_id && id != min && id.name() != prior
|
||||||
|
&& id.withLikelySubtagsAdded() == max) {
|
||||||
|
uiLanguages.insert(j, QString::fromLatin1(id.name()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Include minimal version (first) unless it's what our locale is derived from:
|
||||||
|
if (min.name() != prior)
|
||||||
|
uiLanguages.insert(j, QString::fromLatin1(min.name()));
|
||||||
}
|
}
|
||||||
if (max != min && max != id)
|
|
||||||
uiLanguages.append(QString::fromLatin1(max.name()));
|
|
||||||
return uiLanguages;
|
return uiLanguages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,6 +355,7 @@ public:
|
|||||||
quint16 countryId() const { return m_data->m_country_id; }
|
quint16 countryId() const { return m_data->m_country_id; }
|
||||||
|
|
||||||
QByteArray bcp47Name(char separator = '-') const;
|
QByteArray bcp47Name(char separator = '-') const;
|
||||||
|
QByteArray rawName(char separator = '-') const;
|
||||||
|
|
||||||
inline QLatin1String languageCode() const { return QLocalePrivate::languageToCode(QLocale::Language(m_data->m_language_id)); }
|
inline QLatin1String languageCode() const { return QLocalePrivate::languageToCode(QLocale::Language(m_data->m_language_id)); }
|
||||||
inline QLatin1String scriptCode() const { return QLocalePrivate::scriptToCode(QLocale::Script(m_data->m_script_id)); }
|
inline QLatin1String scriptCode() const { return QLocalePrivate::scriptToCode(QLocale::Script(m_data->m_script_id)); }
|
||||||
|
@ -376,6 +376,38 @@ static quint64 detectProcessorFeatures()
|
|||||||
features &= ~AllAVX512;
|
features &= ~AllAVX512;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
|
||||||
|
/**
|
||||||
|
* Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a
|
||||||
|
* failing random generation instruction, which always returns
|
||||||
|
* 0xffffffff, even when generation was "successful".
|
||||||
|
*
|
||||||
|
* This code checks if hardware random generator generates four consecutive
|
||||||
|
* equal numbers. If it does, then we probably have a failing one and
|
||||||
|
* should disable it completely.
|
||||||
|
*
|
||||||
|
* https://bugreports.qt.io/browse/QTBUG-69423
|
||||||
|
*/
|
||||||
|
if (features & CpuFeatureRDRND) {
|
||||||
|
const qsizetype testBufferSize = 4;
|
||||||
|
unsigned testBuffer[4] = {};
|
||||||
|
|
||||||
|
const qsizetype generated = qRandomCpu(testBuffer, testBufferSize);
|
||||||
|
|
||||||
|
if (Q_UNLIKELY(generated == testBufferSize &&
|
||||||
|
testBuffer[0] == testBuffer[1] &&
|
||||||
|
testBuffer[1] == testBuffer[2] &&
|
||||||
|
testBuffer[2] == testBuffer[3])) {
|
||||||
|
|
||||||
|
fprintf(stderr, "WARNING: CPU random generator seem to be failing, disable hardware random number generation\n");
|
||||||
|
fprintf(stderr, "WARNING: RDRND generated: 0x%x 0x%x 0x%x 0x%x\n",
|
||||||
|
testBuffer[0], testBuffer[1], testBuffer[2], testBuffer[3]);
|
||||||
|
|
||||||
|
features &= ~CpuFeatureRDRND;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return features;
|
return features;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -589,4 +621,40 @@ void qDumpCPUFeatures()
|
|||||||
puts("");
|
puts("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
|
||||||
|
|
||||||
|
# ifdef Q_PROCESSOR_X86_64
|
||||||
|
# define _rdrandXX_step _rdrand64_step
|
||||||
|
# else
|
||||||
|
# define _rdrandXX_step _rdrand32_step
|
||||||
|
# endif
|
||||||
|
|
||||||
|
QT_FUNCTION_TARGET(RDRND) qsizetype qRandomCpu(void *buffer, qsizetype count) Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
unsigned *ptr = reinterpret_cast<unsigned *>(buffer);
|
||||||
|
unsigned *end = ptr + count;
|
||||||
|
int retries = 10;
|
||||||
|
|
||||||
|
while (ptr + sizeof(qregisteruint)/sizeof(*ptr) <= end) {
|
||||||
|
if (_rdrandXX_step(reinterpret_cast<qregisteruint *>(ptr)))
|
||||||
|
ptr += sizeof(qregisteruint)/sizeof(*ptr);
|
||||||
|
else if (--retries == 0)
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (sizeof(*ptr) != sizeof(qregisteruint) && ptr != end) {
|
||||||
|
bool ok = _rdrand32_step(ptr);
|
||||||
|
if (!ok && --retries)
|
||||||
|
continue;
|
||||||
|
if (ok)
|
||||||
|
++ptr;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
return ptr - reinterpret_cast<unsigned *>(buffer);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -346,6 +346,15 @@ extern Q_CORE_EXPORT QBasicAtomicInteger<unsigned> qt_cpu_features[2];
|
|||||||
#endif
|
#endif
|
||||||
Q_CORE_EXPORT void qDetectCpuFeatures();
|
Q_CORE_EXPORT void qDetectCpuFeatures();
|
||||||
|
|
||||||
|
#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
|
||||||
|
Q_CORE_EXPORT qsizetype qRandomCpu(void *, qsizetype) Q_DECL_NOTHROW;
|
||||||
|
#else
|
||||||
|
static inline qsizetype qRandomCpu(void *, qsizetype) Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline quint64 qCpuFeatures()
|
static inline quint64 qCpuFeatures()
|
||||||
{
|
{
|
||||||
quint64 features = qt_cpu_features[0].load();
|
quint64 features = qt_cpu_features[0].load();
|
||||||
@ -366,6 +375,15 @@ static inline quint64 qCpuFeatures()
|
|||||||
#define qCpuHasFeature(feature) (((qCompilerCpuFeatures & CpuFeature ## feature) == CpuFeature ## feature) \
|
#define qCpuHasFeature(feature) (((qCompilerCpuFeatures & CpuFeature ## feature) == CpuFeature ## feature) \
|
||||||
|| ((qCpuFeatures() & CpuFeature ## feature) == CpuFeature ## feature))
|
|| ((qCpuFeatures() & CpuFeature ## feature) == CpuFeature ## feature))
|
||||||
|
|
||||||
|
inline bool qHasHwrng()
|
||||||
|
{
|
||||||
|
#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
|
||||||
|
return qCpuHasFeature(RDRND);
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#define ALIGNMENT_PROLOGUE_16BYTES(ptr, i, length) \
|
#define ALIGNMENT_PROLOGUE_16BYTES(ptr, i, length) \
|
||||||
for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((4 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x3)) & 0x3))); ++i)
|
for (; i < static_cast<int>(qMin(static_cast<quintptr>(length), ((4 - ((reinterpret_cast<quintptr>(ptr) >> 2) & 0x3)) & 0x3))); ++i)
|
||||||
|
|
||||||
|
@ -918,7 +918,7 @@ static int ucstrncmp(const QChar *a, const QChar *b, size_t l)
|
|||||||
};
|
};
|
||||||
|
|
||||||
// we're going to read a[0..15] and b[0..15] (32 bytes)
|
// we're going to read a[0..15] and b[0..15] (32 bytes)
|
||||||
for ( ; a + offset + 16 <= end; offset += 16) {
|
for ( ; end - a >= offset + 16; offset += 16) {
|
||||||
#ifdef __AVX2__
|
#ifdef __AVX2__
|
||||||
__m256i a_data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(a + offset));
|
__m256i a_data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(a + offset));
|
||||||
__m256i b_data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(b + offset));
|
__m256i b_data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(b + offset));
|
||||||
@ -942,7 +942,7 @@ static int ucstrncmp(const QChar *a, const QChar *b, size_t l)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we're going to read a[0..7] and b[0..7] (16 bytes)
|
// we're going to read a[0..7] and b[0..7] (16 bytes)
|
||||||
if (a + offset + 8 <= end) {
|
if (end - a >= offset + 8) {
|
||||||
__m128i a_data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(a + offset));
|
__m128i a_data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(a + offset));
|
||||||
__m128i b_data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(b + offset));
|
__m128i b_data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(b + offset));
|
||||||
if (isDifferent(a_data, b_data))
|
if (isDifferent(a_data, b_data))
|
||||||
@ -952,7 +952,7 @@ static int ucstrncmp(const QChar *a, const QChar *b, size_t l)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we're going to read a[0..3] and b[0..3] (8 bytes)
|
// we're going to read a[0..3] and b[0..3] (8 bytes)
|
||||||
if (a + offset + 4 <= end) {
|
if (end - a >= offset + 4) {
|
||||||
__m128i a_data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(a + offset));
|
__m128i a_data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(a + offset));
|
||||||
__m128i b_data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(b + offset));
|
__m128i b_data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(b + offset));
|
||||||
if (isDifferent(a_data, b_data))
|
if (isDifferent(a_data, b_data))
|
||||||
@ -973,7 +973,7 @@ static int ucstrncmp(const QChar *a, const QChar *b, size_t l)
|
|||||||
if (l >= 8) {
|
if (l >= 8) {
|
||||||
const QChar *end = a + l;
|
const QChar *end = a + l;
|
||||||
const uint16x8_t mask = { 1, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, 1 << 6, 1 << 7 };
|
const uint16x8_t mask = { 1, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, 1 << 6, 1 << 7 };
|
||||||
while (a + 7 < end) {
|
while (end - a > 7) {
|
||||||
uint16x8_t da = vld1q_u16(reinterpret_cast<const uint16_t *>(a));
|
uint16x8_t da = vld1q_u16(reinterpret_cast<const uint16_t *>(a));
|
||||||
uint16x8_t db = vld1q_u16(reinterpret_cast<const uint16_t *>(b));
|
uint16x8_t db = vld1q_u16(reinterpret_cast<const uint16_t *>(b));
|
||||||
|
|
||||||
|
@ -371,6 +371,7 @@ QDate calculateTransitionLocalDate(const SYSTEMTIME &rule, int year)
|
|||||||
// Otherwise, the rule date is annual and relative:
|
// Otherwise, the rule date is annual and relative:
|
||||||
const int dayOfWeek = rule.wDayOfWeek == 0 ? 7 : rule.wDayOfWeek;
|
const int dayOfWeek = rule.wDayOfWeek == 0 ? 7 : rule.wDayOfWeek;
|
||||||
QDate date(year, rule.wMonth, 1);
|
QDate date(year, rule.wMonth, 1);
|
||||||
|
Q_ASSERT(date.isValid());
|
||||||
// How many days before was last dayOfWeek before target month ?
|
// How many days before was last dayOfWeek before target month ?
|
||||||
int adjust = dayOfWeek - date.dayOfWeek(); // -6 <= adjust < 7
|
int adjust = dayOfWeek - date.dayOfWeek(); // -6 <= adjust < 7
|
||||||
if (adjust >= 0) // Ensure -7 <= adjust < 0:
|
if (adjust >= 0) // Ensure -7 <= adjust < 0:
|
||||||
@ -401,6 +402,7 @@ qint64 calculateTransitionForYear(const SYSTEMTIME &rule, int year, int bias)
|
|||||||
{
|
{
|
||||||
// TODO Consider caching the calculated values - i.e. replace SYSTEMTIME in
|
// TODO Consider caching the calculated values - i.e. replace SYSTEMTIME in
|
||||||
// WinTransitionRule; do this in init() once and store the results.
|
// WinTransitionRule; do this in init() once and store the results.
|
||||||
|
Q_ASSERT(year);
|
||||||
const QDate date = calculateTransitionLocalDate(rule, year);
|
const QDate date = calculateTransitionLocalDate(rule, year);
|
||||||
const QTime time = QTime(rule.wHour, rule.wMinute, rule.wSecond);
|
const QTime time = QTime(rule.wHour, rule.wMinute, rule.wSecond);
|
||||||
if (date.isValid() && time.isValid())
|
if (date.isValid() && time.isValid())
|
||||||
@ -479,6 +481,7 @@ struct TransitionTimePair
|
|||||||
|
|
||||||
int yearEndOffset(const QWinTimeZonePrivate::QWinTransitionRule &rule, int year)
|
int yearEndOffset(const QWinTimeZonePrivate::QWinTransitionRule &rule, int year)
|
||||||
{
|
{
|
||||||
|
Q_ASSERT(year);
|
||||||
int offset = rule.standardTimeBias;
|
int offset = rule.standardTimeBias;
|
||||||
// Only needed to help another TransitionTimePair work out year + 1's start
|
// Only needed to help another TransitionTimePair work out year + 1's start
|
||||||
// offset; and the oldYearOffset we use only affects an alleged transition
|
// offset; and the oldYearOffset we use only affects an alleged transition
|
||||||
@ -743,11 +746,12 @@ QTimeZonePrivate::Data QWinTimeZonePrivate::data(qint64 forMSecsSinceEpoch) cons
|
|||||||
const QWinTransitionRule &rule = m_tranRules.at(ruleIndex);
|
const QWinTransitionRule &rule = m_tranRules.at(ruleIndex);
|
||||||
// Does this rule's period include any transition at all ?
|
// Does this rule's period include any transition at all ?
|
||||||
if (rule.standardTimeRule.wMonth > 0 || rule.daylightTimeRule.wMonth > 0) {
|
if (rule.standardTimeRule.wMonth > 0 || rule.daylightTimeRule.wMonth > 0) {
|
||||||
const int endYear = qMax(rule.startYear, year - 1);
|
int prior = year == 1 ? -1 : year - 1; // No year 0.
|
||||||
|
const int endYear = qMax(rule.startYear, prior);
|
||||||
while (year >= endYear) {
|
while (year >= endYear) {
|
||||||
const int newYearOffset = (year <= rule.startYear && ruleIndex > 0)
|
const int newYearOffset = (year <= rule.startYear && ruleIndex > 0)
|
||||||
? yearEndOffset(m_tranRules.at(ruleIndex - 1), year - 1)
|
? yearEndOffset(m_tranRules.at(ruleIndex - 1), prior)
|
||||||
: yearEndOffset(rule, year - 1);
|
: yearEndOffset(rule, prior);
|
||||||
const TransitionTimePair pair(rule, year, newYearOffset);
|
const TransitionTimePair pair(rule, year, newYearOffset);
|
||||||
bool isDst = false;
|
bool isDst = false;
|
||||||
if (pair.std != invalidMSecs() && pair.std <= forMSecsSinceEpoch) {
|
if (pair.std != invalidMSecs() && pair.std <= forMSecsSinceEpoch) {
|
||||||
@ -755,7 +759,8 @@ QTimeZonePrivate::Data QWinTimeZonePrivate::data(qint64 forMSecsSinceEpoch) cons
|
|||||||
} else if (pair.dst != invalidMSecs() && pair.dst <= forMSecsSinceEpoch) {
|
} else if (pair.dst != invalidMSecs() && pair.dst <= forMSecsSinceEpoch) {
|
||||||
isDst = true;
|
isDst = true;
|
||||||
} else {
|
} else {
|
||||||
--year; // Try an earlier year for this rule (once).
|
year = prior; // Try an earlier year for this rule (once).
|
||||||
|
prior = year == 1 ? -1 : year - 1; // No year 0.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return ruleToData(rule, forMSecsSinceEpoch,
|
return ruleToData(rule, forMSecsSinceEpoch,
|
||||||
@ -767,8 +772,11 @@ QTimeZonePrivate::Data QWinTimeZonePrivate::data(qint64 forMSecsSinceEpoch) cons
|
|||||||
// No transition, no DST, use the year's standard time.
|
// No transition, no DST, use the year's standard time.
|
||||||
return ruleToData(rule, forMSecsSinceEpoch, QTimeZone::StandardTime);
|
return ruleToData(rule, forMSecsSinceEpoch, QTimeZone::StandardTime);
|
||||||
}
|
}
|
||||||
if (year >= rule.startYear)
|
if (year >= rule.startYear) {
|
||||||
year = rule.startYear - 1; // Seek last transition in new rule.
|
year = rule.startYear - 1; // Seek last transition in new rule.
|
||||||
|
if (!year)
|
||||||
|
--year;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// We don't have relevant data :-(
|
// We don't have relevant data :-(
|
||||||
return invalidData();
|
return invalidData();
|
||||||
@ -795,9 +803,10 @@ QTimeZonePrivate::Data QWinTimeZonePrivate::nextTransition(qint64 afterMSecsSinc
|
|||||||
year = rule.startYear; // Seek first transition in this rule.
|
year = rule.startYear; // Seek first transition in this rule.
|
||||||
const int endYear = ruleIndex + 1 < m_tranRules.count()
|
const int endYear = ruleIndex + 1 < m_tranRules.count()
|
||||||
? qMin(m_tranRules.at(ruleIndex + 1).startYear, year + 2) : (year + 2);
|
? qMin(m_tranRules.at(ruleIndex + 1).startYear, year + 2) : (year + 2);
|
||||||
|
int prior = year == 1 ? -1 : year - 1; // No year 0.
|
||||||
int newYearOffset = (year <= rule.startYear && ruleIndex > 0)
|
int newYearOffset = (year <= rule.startYear && ruleIndex > 0)
|
||||||
? yearEndOffset(m_tranRules.at(ruleIndex - 1), year - 1)
|
? yearEndOffset(m_tranRules.at(ruleIndex - 1), prior)
|
||||||
: yearEndOffset(rule, year - 1);
|
: yearEndOffset(rule, prior);
|
||||||
while (year < endYear) {
|
while (year < endYear) {
|
||||||
const TransitionTimePair pair(rule, year, newYearOffset);
|
const TransitionTimePair pair(rule, year, newYearOffset);
|
||||||
bool isDst = false;
|
bool isDst = false;
|
||||||
@ -810,7 +819,9 @@ QTimeZonePrivate::Data QWinTimeZonePrivate::nextTransition(qint64 afterMSecsSinc
|
|||||||
newYearOffset = rule.standardTimeBias;
|
newYearOffset = rule.standardTimeBias;
|
||||||
if (pair.dst > pair.std)
|
if (pair.dst > pair.std)
|
||||||
newYearOffset += rule.daylightTimeBias;
|
newYearOffset += rule.daylightTimeBias;
|
||||||
++year; // Try a later year for this rule (once).
|
// Try a later year for this rule (once).
|
||||||
|
prior = year;
|
||||||
|
year = year == -1 ? 1 : year + 1; // No year 0
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -837,11 +848,12 @@ QTimeZonePrivate::Data QWinTimeZonePrivate::previousTransition(qint64 beforeMSec
|
|||||||
const QWinTransitionRule &rule = m_tranRules.at(ruleIndex);
|
const QWinTransitionRule &rule = m_tranRules.at(ruleIndex);
|
||||||
// Does this rule's period include any transition at all ?
|
// Does this rule's period include any transition at all ?
|
||||||
if (rule.standardTimeRule.wMonth > 0 || rule.daylightTimeRule.wMonth > 0) {
|
if (rule.standardTimeRule.wMonth > 0 || rule.daylightTimeRule.wMonth > 0) {
|
||||||
const int endYear = qMax(rule.startYear, year - 1);
|
int prior = year == 1 ? -1 : year - 1; // No year 0.
|
||||||
|
const int endYear = qMax(rule.startYear, prior);
|
||||||
while (year >= endYear) {
|
while (year >= endYear) {
|
||||||
const int newYearOffset = (year <= rule.startYear && ruleIndex > 0)
|
const int newYearOffset = (year <= rule.startYear && ruleIndex > 0)
|
||||||
? yearEndOffset(m_tranRules.at(ruleIndex - 1), year - 1)
|
? yearEndOffset(m_tranRules.at(ruleIndex - 1), prior)
|
||||||
: yearEndOffset(rule, year - 1);
|
: yearEndOffset(rule, prior);
|
||||||
const TransitionTimePair pair(rule, year, newYearOffset);
|
const TransitionTimePair pair(rule, year, newYearOffset);
|
||||||
bool isDst = false;
|
bool isDst = false;
|
||||||
if (pair.std != invalidMSecs() && pair.std < beforeMSecsSinceEpoch) {
|
if (pair.std != invalidMSecs() && pair.std < beforeMSecsSinceEpoch) {
|
||||||
@ -849,7 +861,8 @@ QTimeZonePrivate::Data QWinTimeZonePrivate::previousTransition(qint64 beforeMSec
|
|||||||
} else if (pair.dst != invalidMSecs() && pair.dst < beforeMSecsSinceEpoch) {
|
} else if (pair.dst != invalidMSecs() && pair.dst < beforeMSecsSinceEpoch) {
|
||||||
isDst = true;
|
isDst = true;
|
||||||
} else {
|
} else {
|
||||||
--year; // Try an earlier year for this rule (once).
|
year = prior; // Try an earlier year for this rule (once).
|
||||||
|
prior = year == 1 ? -1 : year - 1; // No year 0.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (isDst)
|
if (isDst)
|
||||||
@ -863,8 +876,11 @@ QTimeZonePrivate::Data QWinTimeZonePrivate::previousTransition(qint64 beforeMSec
|
|||||||
// rule:
|
// rule:
|
||||||
return ruleToData(rule, startOfTime, QTimeZone::StandardTime, false);
|
return ruleToData(rule, startOfTime, QTimeZone::StandardTime, false);
|
||||||
} // else: no transition during rule's period
|
} // else: no transition during rule's period
|
||||||
if (year >= rule.startYear)
|
if (year >= rule.startYear) {
|
||||||
year = rule.startYear - 1; // Seek last transition in new rule
|
year = rule.startYear - 1; // Seek last transition in new rule
|
||||||
|
if (!year)
|
||||||
|
--year;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Apparently no transition before the given time:
|
// Apparently no transition before the given time:
|
||||||
return invalidData();
|
return invalidData();
|
||||||
|
@ -935,6 +935,8 @@ public:
|
|||||||
friend class QGuiApplicationPrivate;
|
friend class QGuiApplicationPrivate;
|
||||||
friend class QApplication;
|
friend class QApplication;
|
||||||
friend class QApplicationPrivate;
|
friend class QApplicationPrivate;
|
||||||
|
friend class QQuickPointerTouchEvent;
|
||||||
|
friend class QQuickMultiPointTouchArea;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if QT_DEPRECATED_SINCE(5, 0)
|
#if QT_DEPRECATED_SINCE(5, 0)
|
||||||
|
@ -67,7 +67,8 @@ public:
|
|||||||
state(Qt::TouchPointReleased),
|
state(Qt::TouchPointReleased),
|
||||||
pressure(-1),
|
pressure(-1),
|
||||||
rotation(0),
|
rotation(0),
|
||||||
ellipseDiameters(0, 0)
|
ellipseDiameters(0, 0),
|
||||||
|
stationaryWithModifiedProperty(false)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
inline QTouchEventTouchPointPrivate *detach()
|
inline QTouchEventTouchPointPrivate *detach()
|
||||||
@ -91,6 +92,7 @@ public:
|
|||||||
QSizeF ellipseDiameters;
|
QSizeF ellipseDiameters;
|
||||||
QVector2D velocity;
|
QVector2D velocity;
|
||||||
QTouchEvent::TouchPoint::InfoFlags flags;
|
QTouchEvent::TouchPoint::InfoFlags flags;
|
||||||
|
bool stationaryWithModifiedProperty : 1;
|
||||||
QVector<QPointF> rawScreenPositions;
|
QVector<QPointF> rawScreenPositions;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ Qt::KeyboardModifiers QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
|
|||||||
|
|
||||||
QPointF QGuiApplicationPrivate::lastCursorPosition(qInf(), qInf());
|
QPointF QGuiApplicationPrivate::lastCursorPosition(qInf(), qInf());
|
||||||
|
|
||||||
QWindow *QGuiApplicationPrivate::currentMouseWindow = 0;
|
QPointer<QWindow> QGuiApplicationPrivate::currentMouseWindow;
|
||||||
|
|
||||||
QString QGuiApplicationPrivate::styleOverride;
|
QString QGuiApplicationPrivate::styleOverride;
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ int QGuiApplicationPrivate::mousePressY = 0;
|
|||||||
static int mouseDoubleClickDistance = -1;
|
static int mouseDoubleClickDistance = -1;
|
||||||
static int touchDoubleTapDistance = -1;
|
static int touchDoubleTapDistance = -1;
|
||||||
|
|
||||||
QWindow *QGuiApplicationPrivate::currentMousePressWindow = 0;
|
QPointer<QWindow> QGuiApplicationPrivate::currentMousePressWindow;
|
||||||
|
|
||||||
static Qt::LayoutDirection layout_direction = Qt::LayoutDirectionAuto;
|
static Qt::LayoutDirection layout_direction = Qt::LayoutDirectionAuto;
|
||||||
static bool force_reverse = false;
|
static bool force_reverse = false;
|
||||||
@ -201,7 +201,7 @@ QClipboard *QGuiApplicationPrivate::qt_clipboard = 0;
|
|||||||
QList<QScreen *> QGuiApplicationPrivate::screen_list;
|
QList<QScreen *> QGuiApplicationPrivate::screen_list;
|
||||||
|
|
||||||
QWindowList QGuiApplicationPrivate::window_list;
|
QWindowList QGuiApplicationPrivate::window_list;
|
||||||
QWindow *QGuiApplicationPrivate::focus_window = 0;
|
QPointer<QWindow> QGuiApplicationPrivate::focus_window;
|
||||||
|
|
||||||
static QBasicMutex applicationFontMutex;
|
static QBasicMutex applicationFontMutex;
|
||||||
QFont *QGuiApplicationPrivate::app_font = 0;
|
QFont *QGuiApplicationPrivate::app_font = 0;
|
||||||
@ -2775,10 +2775,12 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
|
|||||||
if (touchPoint.state() == Qt::TouchPointStationary) {
|
if (touchPoint.state() == Qt::TouchPointStationary) {
|
||||||
if (touchInfo.touchPoint.velocity() != touchPoint.velocity()) {
|
if (touchInfo.touchPoint.velocity() != touchPoint.velocity()) {
|
||||||
touchInfo.touchPoint.setVelocity(touchPoint.velocity());
|
touchInfo.touchPoint.setVelocity(touchPoint.velocity());
|
||||||
|
touchPoint.d->stationaryWithModifiedProperty = true;
|
||||||
stationaryTouchPointChangedProperty = true;
|
stationaryTouchPointChangedProperty = true;
|
||||||
}
|
}
|
||||||
if (!qFuzzyCompare(touchInfo.touchPoint.pressure(), touchPoint.pressure())) {
|
if (!qFuzzyCompare(touchInfo.touchPoint.pressure(), touchPoint.pressure())) {
|
||||||
touchInfo.touchPoint.setPressure(touchPoint.pressure());
|
touchInfo.touchPoint.setPressure(touchPoint.pressure());
|
||||||
|
touchPoint.d->stationaryWithModifiedProperty = true;
|
||||||
stationaryTouchPointChangedProperty = true;
|
stationaryTouchPointChangedProperty = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -212,8 +212,8 @@ public:
|
|||||||
static int mousePressX;
|
static int mousePressX;
|
||||||
static int mousePressY;
|
static int mousePressY;
|
||||||
static QPointF lastCursorPosition;
|
static QPointF lastCursorPosition;
|
||||||
static QWindow *currentMouseWindow;
|
static QPointer<QWindow> currentMouseWindow;
|
||||||
static QWindow *currentMousePressWindow;
|
static QPointer<QWindow> currentMousePressWindow;
|
||||||
static Qt::ApplicationState applicationState;
|
static Qt::ApplicationState applicationState;
|
||||||
static bool highDpiScalingUpdated;
|
static bool highDpiScalingUpdated;
|
||||||
static QPointer<QWindow> currentDragWindow;
|
static QPointer<QWindow> currentDragWindow;
|
||||||
@ -234,7 +234,7 @@ public:
|
|||||||
static QPalette *app_pal;
|
static QPalette *app_pal;
|
||||||
|
|
||||||
static QWindowList window_list;
|
static QWindowList window_list;
|
||||||
static QWindow *focus_window;
|
static QPointer<QWindow> focus_window;
|
||||||
|
|
||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
QList<QCursor> cursor_list;
|
QList<QCursor> cursor_list;
|
||||||
|
@ -495,6 +495,8 @@ static const struct {
|
|||||||
{ Qt::Key_LaunchD, QT_TRANSLATE_NOOP("QShortcut", "Launch (D)") },
|
{ Qt::Key_LaunchD, QT_TRANSLATE_NOOP("QShortcut", "Launch (D)") },
|
||||||
{ Qt::Key_LaunchE, QT_TRANSLATE_NOOP("QShortcut", "Launch (E)") },
|
{ Qt::Key_LaunchE, QT_TRANSLATE_NOOP("QShortcut", "Launch (E)") },
|
||||||
{ Qt::Key_LaunchF, QT_TRANSLATE_NOOP("QShortcut", "Launch (F)") },
|
{ Qt::Key_LaunchF, QT_TRANSLATE_NOOP("QShortcut", "Launch (F)") },
|
||||||
|
{ Qt::Key_LaunchG, QT_TRANSLATE_NOOP("QShortcut", "Launch (G)") },
|
||||||
|
{ Qt::Key_LaunchH, QT_TRANSLATE_NOOP("QShortcut", "Launch (H)") },
|
||||||
{ Qt::Key_MonBrightnessUp, QT_TRANSLATE_NOOP("QShortcut", "Monitor Brightness Up") },
|
{ Qt::Key_MonBrightnessUp, QT_TRANSLATE_NOOP("QShortcut", "Monitor Brightness Up") },
|
||||||
{ Qt::Key_MonBrightnessDown, QT_TRANSLATE_NOOP("QShortcut", "Monitor Brightness Down") },
|
{ Qt::Key_MonBrightnessDown, QT_TRANSLATE_NOOP("QShortcut", "Monitor Brightness Down") },
|
||||||
{ Qt::Key_KeyboardLightOnOff, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Light On/Off") },
|
{ Qt::Key_KeyboardLightOnOff, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Light On/Off") },
|
||||||
@ -521,9 +523,11 @@ static const struct {
|
|||||||
{ Qt::Key_Book, QT_TRANSLATE_NOOP("QShortcut", "Book") },
|
{ Qt::Key_Book, QT_TRANSLATE_NOOP("QShortcut", "Book") },
|
||||||
{ Qt::Key_CD, QT_TRANSLATE_NOOP("QShortcut", "CD") },
|
{ Qt::Key_CD, QT_TRANSLATE_NOOP("QShortcut", "CD") },
|
||||||
{ Qt::Key_Calculator, QT_TRANSLATE_NOOP("QShortcut", "Calculator") },
|
{ Qt::Key_Calculator, QT_TRANSLATE_NOOP("QShortcut", "Calculator") },
|
||||||
|
{ Qt::Key_Calendar, QT_TRANSLATE_NOOP("QShortcut", "Calendar") },
|
||||||
{ Qt::Key_Clear, QT_TRANSLATE_NOOP("QShortcut", "Clear") },
|
{ Qt::Key_Clear, QT_TRANSLATE_NOOP("QShortcut", "Clear") },
|
||||||
{ Qt::Key_ClearGrab, QT_TRANSLATE_NOOP("QShortcut", "Clear Grab") },
|
{ Qt::Key_ClearGrab, QT_TRANSLATE_NOOP("QShortcut", "Clear Grab") },
|
||||||
{ Qt::Key_Close, QT_TRANSLATE_NOOP("QShortcut", "Close") },
|
{ Qt::Key_Close, QT_TRANSLATE_NOOP("QShortcut", "Close") },
|
||||||
|
{ Qt::Key_ContrastAdjust, QT_TRANSLATE_NOOP("QShortcut", "Adjust contrast") },
|
||||||
{ Qt::Key_Copy, QT_TRANSLATE_NOOP("QShortcut", "Copy") },
|
{ Qt::Key_Copy, QT_TRANSLATE_NOOP("QShortcut", "Copy") },
|
||||||
{ Qt::Key_Cut, QT_TRANSLATE_NOOP("QShortcut", "Cut") },
|
{ Qt::Key_Cut, QT_TRANSLATE_NOOP("QShortcut", "Cut") },
|
||||||
{ Qt::Key_Display, QT_TRANSLATE_NOOP("QShortcut", "Display") },
|
{ Qt::Key_Display, QT_TRANSLATE_NOOP("QShortcut", "Display") },
|
||||||
@ -537,6 +541,7 @@ static const struct {
|
|||||||
{ Qt::Key_LogOff, QT_TRANSLATE_NOOP("QShortcut", "Logoff") },
|
{ Qt::Key_LogOff, QT_TRANSLATE_NOOP("QShortcut", "Logoff") },
|
||||||
{ Qt::Key_Market, QT_TRANSLATE_NOOP("QShortcut", "Market") },
|
{ Qt::Key_Market, QT_TRANSLATE_NOOP("QShortcut", "Market") },
|
||||||
{ Qt::Key_Meeting, QT_TRANSLATE_NOOP("QShortcut", "Meeting") },
|
{ Qt::Key_Meeting, QT_TRANSLATE_NOOP("QShortcut", "Meeting") },
|
||||||
|
{ Qt::Key_Memo, QT_TRANSLATE_NOOP("QShortcut", "Memo") },
|
||||||
{ Qt::Key_MenuKB, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Menu") },
|
{ Qt::Key_MenuKB, QT_TRANSLATE_NOOP("QShortcut", "Keyboard Menu") },
|
||||||
{ Qt::Key_MenuPB, QT_TRANSLATE_NOOP("QShortcut", "Menu PB") },
|
{ Qt::Key_MenuPB, QT_TRANSLATE_NOOP("QShortcut", "Menu PB") },
|
||||||
{ Qt::Key_MySites, QT_TRANSLATE_NOOP("QShortcut", "My Sites") },
|
{ Qt::Key_MySites, QT_TRANSLATE_NOOP("QShortcut", "My Sites") },
|
||||||
@ -557,6 +562,7 @@ static const struct {
|
|||||||
{ Qt::Key_Support, QT_TRANSLATE_NOOP("QShortcut", "Support") },
|
{ Qt::Key_Support, QT_TRANSLATE_NOOP("QShortcut", "Support") },
|
||||||
{ Qt::Key_TaskPane, QT_TRANSLATE_NOOP("QShortcut", "Task Panel") },
|
{ Qt::Key_TaskPane, QT_TRANSLATE_NOOP("QShortcut", "Task Panel") },
|
||||||
{ Qt::Key_Terminal, QT_TRANSLATE_NOOP("QShortcut", "Terminal") },
|
{ Qt::Key_Terminal, QT_TRANSLATE_NOOP("QShortcut", "Terminal") },
|
||||||
|
{ Qt::Key_ToDoList, QT_TRANSLATE_NOOP("QShortcut", "To-do list") },
|
||||||
{ Qt::Key_Tools, QT_TRANSLATE_NOOP("QShortcut", "Tools") },
|
{ Qt::Key_Tools, QT_TRANSLATE_NOOP("QShortcut", "Tools") },
|
||||||
{ Qt::Key_Travel, QT_TRANSLATE_NOOP("QShortcut", "Travel") },
|
{ Qt::Key_Travel, QT_TRANSLATE_NOOP("QShortcut", "Travel") },
|
||||||
{ Qt::Key_Video, QT_TRANSLATE_NOOP("QShortcut", "Video") },
|
{ Qt::Key_Video, QT_TRANSLATE_NOOP("QShortcut", "Video") },
|
||||||
|
@ -352,9 +352,10 @@
|
|||||||
"condition": "features.openssl-linked && libs.openssl.source != 0
|
"condition": "features.openssl-linked && libs.openssl.source != 0
|
||||||
&& input.openssl.prefix == '' && input.openssl.libs == '' && input.openssl.libs.debug == ''",
|
&& input.openssl.prefix == '' && input.openssl.libs == '' && input.openssl.libs.debug == ''",
|
||||||
"message": "When linking against OpenSSL, you can override the default
|
"message": "When linking against OpenSSL, you can override the default
|
||||||
library names through OPENSSL_LIBS.
|
library names and directories with setting OPENSSL_PREFIX (or OPENSSL_INCDIR, OPENSSL_LIBDIR),
|
||||||
|
and OPENSSL_LIBS, OPENSSL_LIBS_DEBUG, OPENSSL_LIBS_RELEASE.
|
||||||
For example:
|
For example:
|
||||||
OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
|
./configure -openssl-linked OPENSSL_PREFIX='/opt/ssl' OPENSSL_LIBS='-lssl -lcrypto'"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "warning",
|
"type": "warning",
|
||||||
|
@ -55,12 +55,11 @@
|
|||||||
When building a version of Qt linked against OpenSSL, the build system will
|
When building a version of Qt linked against OpenSSL, the build system will
|
||||||
attempt to link with libssl and libcrypt libraries located in the default
|
attempt to link with libssl and libcrypt libraries located in the default
|
||||||
location on the developer's system. This location is configurable:
|
location on the developer's system. This location is configurable:
|
||||||
set the \c OPENSSL_LIBS environment variable to contain the linker options
|
set the \c OPENSSL_LIBDIR command line argument. For example, on Unix/Linux
|
||||||
required to link Qt against the installed library. For example, on a Unix/Linux
|
|
||||||
system:
|
system:
|
||||||
|
|
||||||
\code
|
\code
|
||||||
OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked
|
./configure -openssl-linked OPENSSL_LIBDIR=/usr/local/ssl
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
To disable SSL support in a Qt build, configure Qt with the \c{-no-openssl}
|
To disable SSL support in a Qt build, configure Qt with the \c{-no-openssl}
|
||||||
|
@ -102,9 +102,9 @@ qtConfig(ssl) {
|
|||||||
# Add optional SSL libs
|
# Add optional SSL libs
|
||||||
# Static linking of OpenSSL with msvc:
|
# Static linking of OpenSSL with msvc:
|
||||||
# - Binaries http://slproweb.com/products/Win32OpenSSL.html
|
# - Binaries http://slproweb.com/products/Win32OpenSSL.html
|
||||||
# - also needs -lUser32 -lAdvapi32 -lGdi32 -lCrypt32
|
# - also needs -lWs2_32 -lGdi32 -lAdvapi32 -lCrypt32 -lUser32
|
||||||
# - libs in <OPENSSL_DIR>\lib\VC\static
|
# - libs in <OPENSSL_DIR>\lib\VC\static
|
||||||
# - configure: -openssl -openssl-linked -I <OPENSSL_DIR>\include -L <OPENSSL_DIR>\lib\VC\static OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32" OPENSSL_LIBS_DEBUG="-lssleay32MDd -llibeay32MDd" OPENSSL_LIBS_RELEASE="-lssleay32MD -llibeay32MD"
|
# - configure: -openssl-linked -openssl-linked OPENSSL_INCDIR="%OPENSSL_DIR%\include" OPENSSL_LIBDIR="%OPENSSL_DIR%\lib\VC\static" OPENSSL_LIBS="-lWs2_32 -lGdi32 -lAdvapi32 -lCrypt32 -lUser32" OPENSSL_LIBS_DEBUG="-llibssl64MDd -llibcrypto64MDd" OPENSSL_LIBS_RELEASE="-llibssl64MD -llibcrypto64MD"
|
||||||
|
|
||||||
qtConfig(openssl-linked): \
|
qtConfig(openssl-linked): \
|
||||||
QMAKE_USE_FOR_PRIVATE += openssl
|
QMAKE_USE_FOR_PRIVATE += openssl
|
||||||
|
@ -4979,7 +4979,7 @@ void QGLWidget::renderText(double x, double y, double z, const QString &str, con
|
|||||||
// The only option in Qt 5 is the shader-based OpenGL 2 paint engine.
|
// The only option in Qt 5 is the shader-based OpenGL 2 paint engine.
|
||||||
// Setting fixed pipeline transformations is futile. Instead, pass the
|
// Setting fixed pipeline transformations is futile. Instead, pass the
|
||||||
// extra values directly and let the engine figure the matrices out.
|
// extra values directly and let the engine figure the matrices out.
|
||||||
static_cast<QGL2PaintEngineEx *>(p->paintEngine())->setTranslateZ(-win_z);
|
static_cast<QGL2PaintEngineEx *>(p->paintEngine())->setTranslateZ(-2 * win_z);
|
||||||
|
|
||||||
qt_gl_draw_text(p, qRound(win_x), qRound(win_y), str, font);
|
qt_gl_draw_text(p, qRound(win_x), qRound(win_y), str, font);
|
||||||
|
|
||||||
|
@ -100,20 +100,6 @@ static const char *languageForWritingSystem[] = {
|
|||||||
};
|
};
|
||||||
enum { LanguageCount = sizeof(languageForWritingSystem) / sizeof(const char *) };
|
enum { LanguageCount = sizeof(languageForWritingSystem) / sizeof(const char *) };
|
||||||
|
|
||||||
#ifdef Q_OS_OSX
|
|
||||||
static NSInteger languageMapSort(id obj1, id obj2, void *context)
|
|
||||||
{
|
|
||||||
NSArray<NSString *> *map1 = reinterpret_cast<NSArray<NSString *> *>(obj1);
|
|
||||||
NSArray<NSString *> *map2 = reinterpret_cast<NSArray<NSString *> *>(obj2);
|
|
||||||
NSArray<NSString *> *languages = reinterpret_cast<NSArray<NSString *> *>(context);
|
|
||||||
|
|
||||||
NSString *lang1 = [map1 objectAtIndex:0];
|
|
||||||
NSString *lang2 = [map2 objectAtIndex:0];
|
|
||||||
|
|
||||||
return [languages indexOfObject:lang1] - [languages indexOfObject:lang2];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QCoreTextFontDatabase::QCoreTextFontDatabase()
|
QCoreTextFontDatabase::QCoreTextFontDatabase()
|
||||||
: m_hasPopulatedAliases(false)
|
: m_hasPopulatedAliases(false)
|
||||||
{
|
{
|
||||||
@ -406,142 +392,99 @@ template class QCoreTextFontDatabaseEngineFactory<QCoreTextFontEngine>;
|
|||||||
template class QCoreTextFontDatabaseEngineFactory<QFontEngineFT>;
|
template class QCoreTextFontDatabaseEngineFactory<QFontEngineFT>;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QFont::StyleHint styleHintFromNSString(NSString *style)
|
QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family)
|
||||||
{
|
{
|
||||||
if ([style isEqual: @"sans-serif"])
|
if (family.isEmpty())
|
||||||
return QFont::SansSerif;
|
return QStringList();
|
||||||
else if ([style isEqual: @"monospace"])
|
|
||||||
return QFont::Monospace;
|
|
||||||
else if ([style isEqual: @"cursive"])
|
|
||||||
return QFont::Cursive;
|
|
||||||
else if ([style isEqual: @"serif"])
|
|
||||||
return QFont::Serif;
|
|
||||||
else if ([style isEqual: @"fantasy"])
|
|
||||||
return QFont::Fantasy;
|
|
||||||
else // if ([style isEqual: @"default"])
|
|
||||||
return QFont::AnyStyle;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef Q_OS_OSX
|
auto attributes = @{ id(kCTFontFamilyNameAttribute): family.toNSString() };
|
||||||
static QString familyNameFromPostScriptName(NSString *psName)
|
QCFType<CTFontDescriptorRef> fontDescriptor = CTFontDescriptorCreateWithAttributes(CFDictionaryRef(attributes));
|
||||||
{
|
if (!fontDescriptor) {
|
||||||
QCFType<CTFontDescriptorRef> fontDescriptor = (CTFontDescriptorRef) CTFontDescriptorCreateWithNameAndSize((CFStringRef)psName, 12.0);
|
qWarning() << "Failed to create fallback font descriptor for" << family;
|
||||||
QCFString familyName = (CFStringRef) CTFontDescriptorCopyAttribute(fontDescriptor, kCTFontFamilyNameAttribute);
|
return QStringList();
|
||||||
QString name = QString::fromCFString(familyName);
|
}
|
||||||
if (name.isEmpty())
|
|
||||||
qWarning() << "QCoreTextFontDatabase: Failed to resolve family name for PostScript name " << QString::fromCFString((CFStringRef)psName);
|
|
||||||
|
|
||||||
return name;
|
QCFType<CTFontRef> font = CTFontCreateWithFontDescriptor(fontDescriptor, 12.0, 0);
|
||||||
}
|
if (!font) {
|
||||||
#endif
|
qWarning() << "Failed to create fallback font for" << family;
|
||||||
|
return QStringList();
|
||||||
|
}
|
||||||
|
|
||||||
static void addExtraFallbacks(QStringList *fallbackList)
|
QCFType<CFArrayRef> cascadeList = CFArrayRef(CTFontCopyDefaultCascadeListForLanguages(font,
|
||||||
{
|
(CFArrayRef)[NSUserDefaults.standardUserDefaults stringArrayForKey:@"AppleLanguages"]));
|
||||||
#if defined(Q_OS_MACOS)
|
if (!cascadeList) {
|
||||||
// Since we are only returning a list of default fonts for the current language, we do not
|
qWarning() << "Failed to create fallback cascade list for" << family;
|
||||||
// cover all unicode completely. This was especially an issue for some of the common script
|
return QStringList();
|
||||||
// symbols such as mathematical symbols, currency or geometric shapes. To minimize the risk
|
}
|
||||||
// of missing glyphs, we add Arial Unicode MS as a final fail safe, since this covers most
|
|
||||||
// of Unicode 2.1.
|
QStringList fallbackList;
|
||||||
if (!fallbackList->contains(QStringLiteral("Arial Unicode MS")))
|
const int numCascades = CFArrayGetCount(cascadeList);
|
||||||
fallbackList->append(QStringLiteral("Arial Unicode MS"));
|
for (int i = 0; i < numCascades; ++i) {
|
||||||
// Since some symbols (specifically Braille) are not in Arial Unicode MS, we
|
CTFontDescriptorRef fontFallback = CTFontDescriptorRef(CFArrayGetValueAtIndex(cascadeList, i));
|
||||||
// add Apple Symbols to cover those too.
|
QCFString fallbackFamilyName = CFStringRef(CTFontDescriptorCopyAttribute(fontFallback, kCTFontFamilyNameAttribute));
|
||||||
if (!fallbackList->contains(QStringLiteral("Apple Symbols")))
|
fallbackList.append(QString::fromCFString(fallbackFamilyName));
|
||||||
fallbackList->append(QStringLiteral("Apple Symbols"));
|
}
|
||||||
#else
|
|
||||||
Q_UNUSED(fallbackList)
|
return fallbackList;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
|
QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(style);
|
Q_UNUSED(style);
|
||||||
Q_UNUSED(script);
|
|
||||||
|
|
||||||
QMacAutoReleasePool pool;
|
QMacAutoReleasePool pool;
|
||||||
|
|
||||||
static QHash<QString, QStringList> fallbackLists;
|
QStringList fallbackList = fallbacksForFamily(family);
|
||||||
|
|
||||||
if (!family.isEmpty()) {
|
if (fallbackList.isEmpty()) {
|
||||||
QCFType<CFMutableDictionaryRef> attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
|
// We were not able to find a fallback for the specific family,
|
||||||
CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, QCFString(family));
|
// or the family was empty, so we fall back to the style hint.
|
||||||
if (QCFType<CTFontDescriptorRef> fontDescriptor = CTFontDescriptorCreateWithAttributes(attributes)) {
|
QString styleFamily = [styleHint]{
|
||||||
if (QCFType<CTFontRef> font = CTFontCreateWithFontDescriptor(fontDescriptor, 12.0, 0)) {
|
switch (styleHint) {
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
case QFont::SansSerif: return QStringLiteral("Helvetica");
|
||||||
NSArray *languages = [defaults stringArrayForKey: @"AppleLanguages"];
|
case QFont::Serif: return QStringLiteral("Times New Roman");
|
||||||
|
case QFont::Monospace: return QStringLiteral("Menlo");
|
||||||
QCFType<CFArrayRef> cascadeList = (CFArrayRef) CTFontCopyDefaultCascadeListForLanguages(font, (CFArrayRef) languages);
|
#ifdef Q_OS_MACOS
|
||||||
if (cascadeList) {
|
case QFont::Cursive: return QStringLiteral("Apple Chancery");
|
||||||
QStringList fallbackList;
|
#endif
|
||||||
const int numCascades = CFArrayGetCount(cascadeList);
|
case QFont::Fantasy: return QStringLiteral("Zapfino");
|
||||||
for (int i = 0; i < numCascades; ++i) {
|
case QFont::TypeWriter: return QStringLiteral("American Typewriter");
|
||||||
CTFontDescriptorRef fontFallback = (CTFontDescriptorRef) CFArrayGetValueAtIndex(cascadeList, i);
|
case QFont::AnyStyle: Q_FALLTHROUGH();
|
||||||
QCFString fallbackFamilyName = (CFStringRef) CTFontDescriptorCopyAttribute(fontFallback, kCTFontFamilyNameAttribute);
|
case QFont::System: {
|
||||||
fallbackList.append(QString::fromCFString(fallbackFamilyName));
|
QCFType<CTFontRef> font = CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, 12.0, NULL);
|
||||||
}
|
return static_cast<QString>(QCFString(CTFontCopyFullName(font)));
|
||||||
|
|
||||||
addExtraFallbacks(&fallbackList);
|
|
||||||
extern QStringList qt_sort_families_by_writing_system(QChar::Script, const QStringList &);
|
|
||||||
fallbackList = qt_sort_families_by_writing_system(script, fallbackList);
|
|
||||||
|
|
||||||
return fallbackList;
|
|
||||||
}
|
}
|
||||||
|
default: return QString(); // No matching font on this platform
|
||||||
}
|
}
|
||||||
|
}();
|
||||||
|
if (!styleFamily.isEmpty()) {
|
||||||
|
fallbackList = fallbacksForFamily(styleFamily);
|
||||||
|
if (!fallbackList.contains(styleFamily))
|
||||||
|
fallbackList.prepend(styleFamily);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We were not able to find a fallback for the specific family,
|
if (fallbackList.isEmpty())
|
||||||
// so we fall back to the stylehint.
|
return fallbackList;
|
||||||
|
|
||||||
static const QString styleLookupKey = QString::fromLatin1(".QFontStyleHint_%1");
|
#if defined(Q_OS_MACOS)
|
||||||
|
// Since we are only returning a list of default fonts for the current language, we do not
|
||||||
static bool didPopulateStyleFallbacks = false;
|
// cover all Unicode completely. This was especially an issue for some of the common script
|
||||||
if (!didPopulateStyleFallbacks) {
|
// symbols such as mathematical symbols, currency or geometric shapes. To minimize the risk
|
||||||
#if defined(Q_OS_MACX)
|
// of missing glyphs, we add Arial Unicode MS as a final fail safe, since this covers most
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
// of Unicode 2.1.
|
||||||
NSArray<NSString *> *languages = [defaults stringArrayForKey:@"AppleLanguages"];
|
if (!fallbackList.contains(QStringLiteral("Arial Unicode MS")))
|
||||||
|
fallbackList.append(QStringLiteral("Arial Unicode MS"));
|
||||||
NSDictionary<NSString *, id> *fallbackDict = [NSDictionary<NSString *, id> dictionaryWithContentsOfFile:@"/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.plist"];
|
// Since some symbols (specifically Braille) are not in Arial Unicode MS, we
|
||||||
|
// add Apple Symbols to cover those too.
|
||||||
for (NSString *style in [fallbackDict allKeys]) {
|
if (!fallbackList.contains(QStringLiteral("Apple Symbols")))
|
||||||
NSArray *list = [fallbackDict valueForKey:style];
|
fallbackList.append(QStringLiteral("Apple Symbols"));
|
||||||
QFont::StyleHint fallbackStyleHint = styleHintFromNSString(style);
|
|
||||||
QStringList fallbackList;
|
|
||||||
for (id item in list) {
|
|
||||||
// sort the array based on system language preferences
|
|
||||||
if ([item isKindOfClass:[NSArray class]]) {
|
|
||||||
NSArray *langs = [reinterpret_cast<NSArray *>(item)
|
|
||||||
sortedArrayUsingFunction:languageMapSort context:languages];
|
|
||||||
for (NSArray<NSString *> *map in langs)
|
|
||||||
fallbackList.append(familyNameFromPostScriptName([map objectAtIndex:1]));
|
|
||||||
}
|
|
||||||
else if ([item isKindOfClass: [NSString class]])
|
|
||||||
fallbackList.append(familyNameFromPostScriptName(item));
|
|
||||||
}
|
|
||||||
|
|
||||||
fallbackList.append(QLatin1String("Apple Color Emoji"));
|
|
||||||
|
|
||||||
addExtraFallbacks(&fallbackList);
|
|
||||||
fallbackLists[styleLookupKey.arg(fallbackStyleHint)] = fallbackList;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
QStringList staticFallbackList;
|
|
||||||
staticFallbackList << QString::fromLatin1("Helvetica,Apple Color Emoji,Geeza Pro,Arial Hebrew,Thonburi,Kailasa"
|
|
||||||
"Hiragino Kaku Gothic ProN,.Heiti J,Apple SD Gothic Neo,.Heiti K,Heiti SC,Heiti TC"
|
|
||||||
"Bangla Sangam MN,Devanagari Sangam MN,Gujarati Sangam MN,Gurmukhi MN,Kannada Sangam MN"
|
|
||||||
"Malayalam Sangam MN,Oriya Sangam MN,Sinhala Sangam MN,Tamil Sangam MN,Telugu Sangam MN"
|
|
||||||
"Euphemia UCAS,.PhoneFallback").split(QLatin1String(","));
|
|
||||||
|
|
||||||
for (int i = QFont::Helvetica; i <= QFont::Fantasy; ++i)
|
|
||||||
fallbackLists[styleLookupKey.arg(i)] = staticFallbackList;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
didPopulateStyleFallbacks = true;
|
extern QStringList qt_sort_families_by_writing_system(QChar::Script, const QStringList &);
|
||||||
}
|
fallbackList = qt_sort_families_by_writing_system(script, fallbackList);
|
||||||
|
|
||||||
Q_ASSERT(!fallbackLists.isEmpty());
|
return fallbackList;
|
||||||
return fallbackLists[styleLookupKey.arg(styleHint)];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList QCoreTextFontDatabase::addApplicationFont(const QByteArray &fontData, const QString &fileName)
|
QStringList QCoreTextFontDatabase::addApplicationFont(const QByteArray &fontData, const QString &fileName)
|
||||||
|
@ -92,6 +92,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void populateFromDescriptor(CTFontDescriptorRef font, const QString &familyName = QString());
|
void populateFromDescriptor(CTFontDescriptorRef font, const QString &familyName = QString());
|
||||||
|
static QStringList fallbacksForFamily(const QString &family);
|
||||||
|
|
||||||
mutable QString defaultFontName;
|
mutable QString defaultFontName;
|
||||||
|
|
||||||
|
@ -1961,13 +1961,13 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, const Q
|
|||||||
} else {
|
} else {
|
||||||
HGDIOBJ oldFont = SelectObject(data->hdc, hfont);
|
HGDIOBJ oldFont = SelectObject(data->hdc, hfont);
|
||||||
|
|
||||||
|
const QFont::HintingPreference hintingPreference =
|
||||||
|
static_cast<QFont::HintingPreference>(request.hintingPreference);
|
||||||
|
bool useDw = useDirectWrite(hintingPreference, fam);
|
||||||
|
|
||||||
IDWriteFontFace *directWriteFontFace = NULL;
|
IDWriteFontFace *directWriteFontFace = NULL;
|
||||||
HRESULT hr = data->directWriteGdiInterop->CreateFontFaceFromHdc(data->hdc, &directWriteFontFace);
|
HRESULT hr = data->directWriteGdiInterop->CreateFontFaceFromHdc(data->hdc, &directWriteFontFace);
|
||||||
if (FAILED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
const QString errorString = qt_error_string(int(hr));
|
|
||||||
qWarning().noquote().nospace() << "DirectWrite: CreateFontFaceFromHDC() failed ("
|
|
||||||
<< errorString << ") for " << request << ' ' << lf << " dpi=" << dpi;
|
|
||||||
} else {
|
|
||||||
bool isColorFont = false;
|
bool isColorFont = false;
|
||||||
#if defined(QT_USE_DIRECTWRITE2)
|
#if defined(QT_USE_DIRECTWRITE2)
|
||||||
IDWriteFontFace2 *directWriteFontFace2 = nullptr;
|
IDWriteFontFace2 *directWriteFontFace2 = nullptr;
|
||||||
@ -1977,9 +1977,7 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, const Q
|
|||||||
isColorFont = directWriteFontFace2->GetPaletteEntryCount() > 0;
|
isColorFont = directWriteFontFace2->GetPaletteEntryCount() > 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
const QFont::HintingPreference hintingPreference =
|
useDw = useDw || useDirectWrite(hintingPreference, fam, isColorFont);
|
||||||
static_cast<QFont::HintingPreference>(request.hintingPreference);
|
|
||||||
const bool useDw = useDirectWrite(hintingPreference, fam, isColorFont);
|
|
||||||
qCDebug(lcQpaFonts) << __FUNCTION__ << request.family << request.pointSize
|
qCDebug(lcQpaFonts) << __FUNCTION__ << request.family << request.pointSize
|
||||||
<< "pt" << "hintingPreference=" << hintingPreference << "color=" << isColorFont
|
<< "pt" << "hintingPreference=" << hintingPreference << "color=" << isColorFont
|
||||||
<< dpi << "dpi" << "useDirectWrite=" << useDw;
|
<< dpi << "dpi" << "useDirectWrite=" << useDw;
|
||||||
@ -2001,6 +1999,10 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, const Q
|
|||||||
} else {
|
} else {
|
||||||
directWriteFontFace->Release();
|
directWriteFontFace->Release();
|
||||||
}
|
}
|
||||||
|
} else if (useDw) {
|
||||||
|
const QString errorString = qt_error_string(int(hr));
|
||||||
|
qWarning().noquote().nospace() << "DirectWrite: CreateFontFaceFromHDC() failed ("
|
||||||
|
<< errorString << ") for " << request << ' ' << lf << " dpi=" << dpi;
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectObject(data->hdc, oldFont);
|
SelectObject(data->hdc, oldFont);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2019 The Qt Company Ltd.
|
||||||
** Copyright (C) 2016 Jolla Ltd, author: <gunnar.sletta@jollamobile.com>
|
** Copyright (C) 2016 Jolla Ltd, author: <gunnar.sletta@jollamobile.com>
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
@ -74,7 +74,7 @@ Q_LOGGING_CATEGORY(qLcEvdevTouch, "qt.qpa.input")
|
|||||||
#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */
|
#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */
|
||||||
#endif
|
#endif
|
||||||
#ifndef ABS_MT_POSITION_X
|
#ifndef ABS_MT_POSITION_X
|
||||||
#define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */
|
#define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */
|
||||||
#endif
|
#endif
|
||||||
#ifndef ABS_MT_POSITION_Y
|
#ifndef ABS_MT_POSITION_Y
|
||||||
#define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */
|
#define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */
|
||||||
@ -88,6 +88,9 @@ Q_LOGGING_CATEGORY(qLcEvdevTouch, "qt.qpa.input")
|
|||||||
#ifndef ABS_MT_TRACKING_ID
|
#ifndef ABS_MT_TRACKING_ID
|
||||||
#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */
|
#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef ABS_MT_PRESSURE
|
||||||
|
#define ABS_MT_PRESSURE 0x3a
|
||||||
|
#endif
|
||||||
#ifndef SYN_MT_REPORT
|
#ifndef SYN_MT_REPORT
|
||||||
#define SYN_MT_REPORT 2
|
#define SYN_MT_REPORT 2
|
||||||
#endif
|
#endif
|
||||||
@ -570,6 +573,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
|||||||
m_lastTouchPoints = m_touchPoints;
|
m_lastTouchPoints = m_touchPoints;
|
||||||
m_touchPoints.clear();
|
m_touchPoints.clear();
|
||||||
Qt::TouchPointStates combinedStates;
|
Qt::TouchPointStates combinedStates;
|
||||||
|
bool hasPressure = false;
|
||||||
|
|
||||||
QMutableHashIterator<int, Contact> it(m_contacts);
|
QMutableHashIterator<int, Contact> it(m_contacts);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
@ -600,6 +604,9 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (contact.pressure)
|
||||||
|
hasPressure = true;
|
||||||
|
|
||||||
addTouchPoint(contact, &combinedStates);
|
addTouchPoint(contact, &combinedStates);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -646,7 +653,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
|||||||
m_contacts.clear();
|
m_contacts.clear();
|
||||||
|
|
||||||
|
|
||||||
if (!m_touchPoints.isEmpty() && combinedStates != Qt::TouchPointStationary)
|
if (!m_touchPoints.isEmpty() && (hasPressure || combinedStates != Qt::TouchPointStationary))
|
||||||
reportPoints();
|
reportPoints();
|
||||||
|
|
||||||
if (m_filtered)
|
if (m_filtered)
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qlibinputtouch_p.h"
|
#include "qlibinputtouch_p.h"
|
||||||
|
#include "qtouchoutputmapping_p.h"
|
||||||
#include <libinput.h>
|
#include <libinput.h>
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
#include <QtGui/QScreen>
|
#include <QtGui/QScreen>
|
||||||
@ -45,6 +46,8 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(qLcLibInput)
|
||||||
|
|
||||||
QWindowSystemInterface::TouchPoint *QLibInputTouch::DeviceState::point(int32_t slot)
|
QWindowSystemInterface::TouchPoint *QLibInputTouch::DeviceState::point(int32_t slot)
|
||||||
{
|
{
|
||||||
const int id = qMax(0, slot);
|
const int id = qMax(0, slot);
|
||||||
@ -62,12 +65,23 @@ QLibInputTouch::DeviceState *QLibInputTouch::deviceState(libinput_event_touch *e
|
|||||||
return &m_devState[dev];
|
return &m_devState[dev];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QPointF getPos(libinput_event_touch *e)
|
QPointF QLibInputTouch::getPos(libinput_event_touch *e)
|
||||||
{
|
{
|
||||||
// TODO Map to correct screen using QTouchOutputMapping.
|
DeviceState *state = deviceState(e);
|
||||||
// Perhaps investigate libinput_device_get_output_name as well.
|
|
||||||
// For now just use the primary screen.
|
|
||||||
QScreen *screen = QGuiApplication::primaryScreen();
|
QScreen *screen = QGuiApplication::primaryScreen();
|
||||||
|
if (!state->m_screenName.isEmpty()) {
|
||||||
|
if (!m_screen) {
|
||||||
|
const QList<QScreen *> screens = QGuiApplication::screens();
|
||||||
|
for (QScreen *s : screens) {
|
||||||
|
if (s->name() == state->m_screenName) {
|
||||||
|
m_screen = s;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (m_screen)
|
||||||
|
screen = m_screen;
|
||||||
|
}
|
||||||
const QRect geom = QHighDpi::toNativePixels(screen->geometry(), screen);
|
const QRect geom = QHighDpi::toNativePixels(screen->geometry(), screen);
|
||||||
const double x = libinput_event_touch_get_x_transformed(e, geom.width());
|
const double x = libinput_event_touch_get_x_transformed(e, geom.width());
|
||||||
const double y = libinput_event_touch_get_y_transformed(e, geom.height());
|
const double y = libinput_event_touch_get_y_transformed(e, geom.height());
|
||||||
@ -76,9 +90,25 @@ static inline QPointF getPos(libinput_event_touch *e)
|
|||||||
|
|
||||||
void QLibInputTouch::registerDevice(libinput_device *dev)
|
void QLibInputTouch::registerDevice(libinput_device *dev)
|
||||||
{
|
{
|
||||||
|
struct udev_device *udev_device;
|
||||||
|
udev_device = libinput_device_get_udev_device(dev);
|
||||||
|
QString devNode = QString::fromUtf8(udev_device_get_devnode(udev_device));
|
||||||
|
QString devName = QString::fromUtf8(libinput_device_get_name(dev));
|
||||||
|
|
||||||
|
qCDebug(qLcLibInput, "libinput: registerDevice %s - %s",
|
||||||
|
qPrintable(devNode), qPrintable(devName));
|
||||||
|
|
||||||
|
QTouchOutputMapping mapping;
|
||||||
|
if (mapping.load()) {
|
||||||
|
m_devState[dev].m_screenName = mapping.screenNameForDeviceNode(devNode);
|
||||||
|
if (!m_devState[dev].m_screenName.isEmpty())
|
||||||
|
qCDebug(qLcLibInput, "libinput: Mapping device %s to screen %s",
|
||||||
|
qPrintable(devNode), qPrintable(m_devState[dev].m_screenName));
|
||||||
|
}
|
||||||
|
|
||||||
QTouchDevice *&td = m_devState[dev].m_touchDevice;
|
QTouchDevice *&td = m_devState[dev].m_touchDevice;
|
||||||
td = new QTouchDevice;
|
td = new QTouchDevice;
|
||||||
td->setName(QString::fromUtf8(libinput_device_get_name(dev)));
|
td->setName(devName);
|
||||||
td->setType(QTouchDevice::TouchScreen);
|
td->setType(QTouchDevice::TouchScreen);
|
||||||
td->setCapabilities(QTouchDevice::Position | QTouchDevice::Area);
|
td->setCapabilities(QTouchDevice::Position | QTouchDevice::Area);
|
||||||
QWindowSystemInterface::registerTouchDevice(td);
|
QWindowSystemInterface::registerTouchDevice(td);
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
#include <QtCore/QHash>
|
#include <QtCore/QHash>
|
||||||
#include <QtCore/QList>
|
#include <QtCore/QList>
|
||||||
|
#include <QtCore/QPointer>
|
||||||
#include <qpa/qwindowsysteminterface.h>
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -60,6 +61,7 @@ struct libinput_device;
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class QScreen;
|
||||||
class QLibInputTouch
|
class QLibInputTouch
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -73,15 +75,18 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
struct DeviceState {
|
struct DeviceState {
|
||||||
DeviceState() : m_touchDevice(0) { }
|
DeviceState() : m_touchDevice(nullptr), m_screenName() { }
|
||||||
QWindowSystemInterface::TouchPoint *point(int32_t slot);
|
QWindowSystemInterface::TouchPoint *point(int32_t slot);
|
||||||
QList<QWindowSystemInterface::TouchPoint> m_points;
|
QList<QWindowSystemInterface::TouchPoint> m_points;
|
||||||
QTouchDevice *m_touchDevice;
|
QTouchDevice *m_touchDevice;
|
||||||
|
QString m_screenName;
|
||||||
};
|
};
|
||||||
|
|
||||||
DeviceState *deviceState(libinput_event_touch *e);
|
DeviceState *deviceState(libinput_event_touch *e);
|
||||||
|
QPointF getPos(libinput_event_touch *e);
|
||||||
|
|
||||||
QHash<libinput_device *, DeviceState> m_devState;
|
QHash<libinput_device *, DeviceState> m_devState;
|
||||||
|
mutable QPointer<QScreen> m_screen;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -522,10 +522,6 @@ QKmsDevice::QKmsDevice(QKmsScreenConfig *screenConfig, const QString &path)
|
|||||||
, m_path(path)
|
, m_path(path)
|
||||||
, m_dri_fd(-1)
|
, m_dri_fd(-1)
|
||||||
, m_has_atomic_support(false)
|
, m_has_atomic_support(false)
|
||||||
#if QT_CONFIG(drm_atomic)
|
|
||||||
, m_atomic_request(nullptr)
|
|
||||||
, m_previous_request(nullptr)
|
|
||||||
#endif
|
|
||||||
, m_crtc_allocator(0)
|
, m_crtc_allocator(0)
|
||||||
{
|
{
|
||||||
if (m_path.isEmpty()) {
|
if (m_path.isEmpty()) {
|
||||||
@ -541,7 +537,7 @@ QKmsDevice::QKmsDevice(QKmsScreenConfig *screenConfig, const QString &path)
|
|||||||
QKmsDevice::~QKmsDevice()
|
QKmsDevice::~QKmsDevice()
|
||||||
{
|
{
|
||||||
#if QT_CONFIG(drm_atomic)
|
#if QT_CONFIG(drm_atomic)
|
||||||
atomicReset();
|
threadLocalAtomicReset();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -881,39 +877,51 @@ bool QKmsDevice::hasAtomicSupport()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if QT_CONFIG(drm_atomic)
|
#if QT_CONFIG(drm_atomic)
|
||||||
drmModeAtomicReq * QKmsDevice::atomic_request()
|
drmModeAtomicReq *QKmsDevice::threadLocalAtomicRequest()
|
||||||
{
|
{
|
||||||
if (!m_atomic_request && m_has_atomic_support)
|
if (!m_has_atomic_support)
|
||||||
m_atomic_request = drmModeAtomicAlloc();
|
return nullptr;
|
||||||
|
|
||||||
return m_atomic_request;
|
AtomicReqs &a(m_atomicReqs.localData());
|
||||||
|
if (!a.request)
|
||||||
|
a.request = drmModeAtomicAlloc();
|
||||||
|
|
||||||
|
return a.request;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QKmsDevice::atomicCommit(void *user_data)
|
bool QKmsDevice::threadLocalAtomicCommit(void *user_data)
|
||||||
{
|
{
|
||||||
if (m_atomic_request) {
|
if (!m_has_atomic_support)
|
||||||
int ret = drmModeAtomicCommit(m_dri_fd, m_atomic_request,
|
return false;
|
||||||
DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_ALLOW_MODESET, user_data);
|
|
||||||
|
|
||||||
if (ret) {
|
AtomicReqs &a(m_atomicReqs.localData());
|
||||||
qWarning("Failed to commit atomic request (code=%d)", ret);
|
if (!a.request)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
m_previous_request = m_atomic_request;
|
int ret = drmModeAtomicCommit(m_dri_fd, a.request,
|
||||||
m_atomic_request = nullptr;
|
DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_ALLOW_MODESET,
|
||||||
|
user_data);
|
||||||
|
|
||||||
return true;
|
if (ret) {
|
||||||
|
qWarning("Failed to commit atomic request (code=%d)", ret);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
a.previous_request = a.request;
|
||||||
|
a.request = nullptr;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QKmsDevice::atomicReset()
|
void QKmsDevice::threadLocalAtomicReset()
|
||||||
{
|
{
|
||||||
if (m_previous_request) {
|
if (!m_has_atomic_support)
|
||||||
drmModeAtomicFree(m_previous_request);
|
return;
|
||||||
m_previous_request = nullptr;
|
|
||||||
|
AtomicReqs &a(m_atomicReqs.localData());
|
||||||
|
if (a.previous_request) {
|
||||||
|
drmModeAtomicFree(a.previous_request);
|
||||||
|
a.previous_request = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
#include <qpa/qplatformscreen.h>
|
#include <qpa/qplatformscreen.h>
|
||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
#include <QtCore/QVariant>
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtCore/QThreadStorage>
|
||||||
|
|
||||||
#include <xf86drm.h>
|
#include <xf86drm.h>
|
||||||
#include <xf86drmMode.h>
|
#include <xf86drmMode.h>
|
||||||
@ -238,10 +239,9 @@ public:
|
|||||||
bool hasAtomicSupport();
|
bool hasAtomicSupport();
|
||||||
|
|
||||||
#if QT_CONFIG(drm_atomic)
|
#if QT_CONFIG(drm_atomic)
|
||||||
bool atomicCommit(void *user_data);
|
drmModeAtomicReq *threadLocalAtomicRequest();
|
||||||
void atomicReset();
|
bool threadLocalAtomicCommit(void *user_data);
|
||||||
|
void threadLocalAtomicReset();
|
||||||
drmModeAtomicReq *atomic_request();
|
|
||||||
#endif
|
#endif
|
||||||
void createScreens();
|
void createScreens();
|
||||||
|
|
||||||
@ -281,8 +281,11 @@ protected:
|
|||||||
bool m_has_atomic_support;
|
bool m_has_atomic_support;
|
||||||
|
|
||||||
#if QT_CONFIG(drm_atomic)
|
#if QT_CONFIG(drm_atomic)
|
||||||
drmModeAtomicReq *m_atomic_request;
|
struct AtomicReqs {
|
||||||
drmModeAtomicReq *m_previous_request;
|
drmModeAtomicReq *request = nullptr;
|
||||||
|
drmModeAtomicReq *previous_request = nullptr;
|
||||||
|
};
|
||||||
|
QThreadStorage<AtomicReqs> m_atomicReqs;
|
||||||
#endif
|
#endif
|
||||||
quint32 m_crtc_allocator;
|
quint32 m_crtc_allocator;
|
||||||
|
|
||||||
|
@ -195,20 +195,6 @@ namespace QtAndroidInput
|
|||||||
angleDelta);
|
angleDelta);
|
||||||
}
|
}
|
||||||
|
|
||||||
void releaseMouse(int x, int y)
|
|
||||||
{
|
|
||||||
m_ignoreMouseEvents = true;
|
|
||||||
QPoint globalPos(x,y);
|
|
||||||
QWindow *tlw = topLevelWindowAt(globalPos);
|
|
||||||
QPoint localPos = tlw ? (globalPos-tlw->position()) : globalPos;
|
|
||||||
|
|
||||||
// Release left button
|
|
||||||
QWindowSystemInterface::handleMouseEvent(tlw,
|
|
||||||
localPos,
|
|
||||||
globalPos,
|
|
||||||
Qt::MouseButtons(Qt::NoButton));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void longPress(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y)
|
static void longPress(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y)
|
||||||
{
|
{
|
||||||
QAndroidInputContext *inputContext = QAndroidInputContext::androidInputContext();
|
QAndroidInputContext *inputContext = QAndroidInputContext::androidInputContext();
|
||||||
|
@ -61,8 +61,6 @@ namespace QtAndroidInput
|
|||||||
void updateHandles(int handleCount, QPoint editMenuPos = QPoint(), uint32_t editButtons = 0, QPoint cursor = QPoint(), QPoint anchor = QPoint(), bool rtl = false);
|
void updateHandles(int handleCount, QPoint editMenuPos = QPoint(), uint32_t editButtons = 0, QPoint cursor = QPoint(), QPoint anchor = QPoint(), bool rtl = false);
|
||||||
|
|
||||||
bool registerNatives(JNIEnv *env);
|
bool registerNatives(JNIEnv *env);
|
||||||
|
|
||||||
void releaseMouse(int x, int y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -827,9 +827,6 @@ void QAndroidInputContext::longPress(int x, int y)
|
|||||||
|
|
||||||
focusObjectStopComposing();
|
focusObjectStopComposing();
|
||||||
|
|
||||||
// Release left button, otherwise the following events will cancel the menu popup
|
|
||||||
QtAndroidInput::releaseMouse(x, y);
|
|
||||||
|
|
||||||
const double pixelDensity =
|
const double pixelDensity =
|
||||||
QGuiApplication::focusWindow()
|
QGuiApplication::focusWindow()
|
||||||
? QHighDpiScaling::factor(QGuiApplication::focusWindow())
|
? QHighDpiScaling::factor(QGuiApplication::focusWindow())
|
||||||
|
@ -464,7 +464,8 @@ QVariant QAndroidPlatformTheme::themeHint(ThemeHint hint) const
|
|||||||
return QStringList(QLatin1String("android"));
|
return QStringList(QLatin1String("android"));
|
||||||
}
|
}
|
||||||
return QStringList(QLatin1String("fusion"));
|
return QStringList(QLatin1String("fusion"));
|
||||||
|
case DialogButtonBoxLayout:
|
||||||
|
return QVariant(QPlatformDialogHelper::AndroidLayout);
|
||||||
case MouseDoubleClickDistance:
|
case MouseDoubleClickDistance:
|
||||||
{
|
{
|
||||||
int minimumDistance = qEnvironmentVariableIntValue("QT_ANDROID_MINIMUM_MOUSE_DOUBLE_CLICK_DISTANCE");
|
int minimumDistance = qEnvironmentVariableIntValue("QT_ANDROID_MINIMUM_MOUSE_DOUBLE_CLICK_DISTANCE");
|
||||||
@ -488,8 +489,6 @@ QVariant QAndroidPlatformTheme::themeHint(ThemeHint hint) const
|
|||||||
|
|
||||||
Q_FALLTHROUGH();
|
Q_FALLTHROUGH();
|
||||||
}
|
}
|
||||||
case DialogButtonBoxLayout:
|
|
||||||
return QVariant(QPlatformDialogHelper::AndroidLayout);
|
|
||||||
default:
|
default:
|
||||||
return QPlatformTheme::themeHint(hint);
|
return QPlatformTheme::themeHint(hint);
|
||||||
}
|
}
|
||||||
|
@ -54,8 +54,6 @@ class QCocoaBackingStore : public QRasterBackingStore
|
|||||||
protected:
|
protected:
|
||||||
QCocoaBackingStore(QWindow *window);
|
QCocoaBackingStore(QWindow *window);
|
||||||
QCFType<CGColorSpaceRef> colorSpace() const;
|
QCFType<CGColorSpaceRef> colorSpace() const;
|
||||||
QMacNotificationObserver m_backingPropertiesObserver;
|
|
||||||
virtual void backingPropertiesChanged() = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class QNSWindowBackingStore : public QCocoaBackingStore
|
class QNSWindowBackingStore : public QCocoaBackingStore
|
||||||
@ -71,7 +69,6 @@ private:
|
|||||||
bool windowHasUnifiedToolbar() const;
|
bool windowHasUnifiedToolbar() const;
|
||||||
QImage::Format format() const override;
|
QImage::Format format() const override;
|
||||||
void redrawRoundedBottomCorners(CGRect) const;
|
void redrawRoundedBottomCorners(CGRect) const;
|
||||||
void backingPropertiesChanged() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class QCALayerBackingStore : public QCocoaBackingStore
|
class QCALayerBackingStore : public QCocoaBackingStore
|
||||||
@ -118,7 +115,8 @@ private:
|
|||||||
bool recreateBackBufferIfNeeded();
|
bool recreateBackBufferIfNeeded();
|
||||||
bool prepareForFlush();
|
bool prepareForFlush();
|
||||||
|
|
||||||
void backingPropertiesChanged() override;
|
void backingPropertiesChanged();
|
||||||
|
QMacNotificationObserver m_backingPropertiesObserver;
|
||||||
|
|
||||||
std::list<std::unique_ptr<GraphicsBuffer>> m_buffers;
|
std::list<std::unique_ptr<GraphicsBuffer>> m_buffers;
|
||||||
};
|
};
|
||||||
|
@ -51,17 +51,6 @@ QT_BEGIN_NAMESPACE
|
|||||||
QCocoaBackingStore::QCocoaBackingStore(QWindow *window)
|
QCocoaBackingStore::QCocoaBackingStore(QWindow *window)
|
||||||
: QRasterBackingStore(window)
|
: QRasterBackingStore(window)
|
||||||
{
|
{
|
||||||
// Ideally this would be plumbed from the platform layer to QtGui, and
|
|
||||||
// the QBackingStore would be recreated, but we don't have that code yet,
|
|
||||||
// so at least make sure we invalidate our backingstore when the backing
|
|
||||||
// properties (color space e.g.) are changed.
|
|
||||||
NSView *view = static_cast<QCocoaWindow *>(window->handle())->view();
|
|
||||||
m_backingPropertiesObserver = QMacNotificationObserver(view.window,
|
|
||||||
NSWindowDidChangeBackingPropertiesNotification, [this]() {
|
|
||||||
qCDebug(lcQpaBackingStore) << "Backing properties for"
|
|
||||||
<< this->window() << "did change";
|
|
||||||
backingPropertiesChanged();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QCFType<CGColorSpaceRef> QCocoaBackingStore::colorSpace() const
|
QCFType<CGColorSpaceRef> QCocoaBackingStore::colorSpace() const
|
||||||
@ -341,11 +330,6 @@ void QNSWindowBackingStore::redrawRoundedBottomCorners(CGRect windowRect) const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QNSWindowBackingStore::backingPropertiesChanged()
|
|
||||||
{
|
|
||||||
m_image = QImage();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// https://stackoverflow.com/a/52722575/2761869
|
// https://stackoverflow.com/a/52722575/2761869
|
||||||
@ -365,6 +349,18 @@ QCALayerBackingStore::QCALayerBackingStore(QWindow *window)
|
|||||||
{
|
{
|
||||||
qCDebug(lcQpaBackingStore) << "Creating QCALayerBackingStore for" << window;
|
qCDebug(lcQpaBackingStore) << "Creating QCALayerBackingStore for" << window;
|
||||||
m_buffers.resize(1);
|
m_buffers.resize(1);
|
||||||
|
|
||||||
|
// Ideally this would be plumbed from the platform layer to QtGui, and
|
||||||
|
// the QBackingStore would be recreated, but we don't have that code yet,
|
||||||
|
// so at least make sure we update our backingstore when the backing
|
||||||
|
// properties (color space e.g.) are changed.
|
||||||
|
NSView *view = static_cast<QCocoaWindow *>(window->handle())->view();
|
||||||
|
m_backingPropertiesObserver = QMacNotificationObserver(view.window,
|
||||||
|
NSWindowDidChangeBackingPropertiesNotification, [this]() {
|
||||||
|
qCDebug(lcQpaBackingStore) << "Backing properties for"
|
||||||
|
<< this->window() << "did change";
|
||||||
|
backingPropertiesChanged();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QCALayerBackingStore::~QCALayerBackingStore()
|
QCALayerBackingStore::~QCALayerBackingStore()
|
||||||
@ -572,17 +568,26 @@ void QCALayerBackingStore::flush(QWindow *flushedWindow, const QRegion ®ion,
|
|||||||
flushedView.layer.contents = nil;
|
flushedView.layer.contents = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
qCInfo(lcQpaBackingStore) << "Flushing" << backBufferSurface
|
if (flushedView == backingStoreView) {
|
||||||
<< "to" << flushedView.layer << "of" << flushedView;
|
qCInfo(lcQpaBackingStore) << "Flushing" << backBufferSurface
|
||||||
|
<< "to" << flushedView.layer << "of" << flushedView;
|
||||||
|
flushedView.layer.contents = backBufferSurface;
|
||||||
|
} else {
|
||||||
|
auto subviewRect = [flushedView convertRect:flushedView.bounds toView:backingStoreView];
|
||||||
|
auto scale = flushedView.layer.contentsScale;
|
||||||
|
subviewRect = CGRectApplyAffineTransform(subviewRect, CGAffineTransformMakeScale(scale, scale));
|
||||||
|
|
||||||
flushedView.layer.contents = backBufferSurface;
|
// We make a copy of the image data up front, which means we don't
|
||||||
|
// need to mark the IOSurface as being in use. FIXME: Investigate
|
||||||
|
// if there's a cheaper way to get sub-image data to a layer.
|
||||||
|
m_buffers.back()->lock(QPlatformGraphicsBuffer::SWReadAccess);
|
||||||
|
QImage subImage = m_buffers.back()->asImage()->copy(QRectF::fromCGRect(subviewRect).toRect());
|
||||||
|
m_buffers.back()->unlock();
|
||||||
|
|
||||||
if (flushedView != backingStoreView) {
|
qCInfo(lcQpaBackingStore) << "Flushing" << subImage
|
||||||
const CGSize backingStoreSize = backingStoreView.bounds.size;
|
<< "to" << flushedView.layer << "of subview" << flushedView;
|
||||||
flushedView.layer.contentsRect = CGRectApplyAffineTransform(
|
QCFType<CGImageRef> cgImage = subImage.toCGImage();
|
||||||
[flushedView convertRect:flushedView.bounds toView:backingStoreView],
|
flushedView.layer.contents = (__bridge id)static_cast<CGImageRef>(cgImage);
|
||||||
// The contentsRect is in unit coordinate system
|
|
||||||
CGAffineTransformMakeScale(1.0 / backingStoreSize.width, 1.0 / backingStoreSize.height));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since we may receive multiple flushes before a new frame is started, we do not
|
// Since we may receive multiple flushes before a new frame is started, we do not
|
||||||
@ -623,8 +628,11 @@ QImage QCALayerBackingStore::toImage() const
|
|||||||
|
|
||||||
void QCALayerBackingStore::backingPropertiesChanged()
|
void QCALayerBackingStore::backingPropertiesChanged()
|
||||||
{
|
{
|
||||||
m_buffers.clear();
|
qCDebug(lcQpaBackingStore) << "Updating color space of existing buffers";
|
||||||
m_buffers.resize(1);
|
for (auto &buffer : m_buffers) {
|
||||||
|
if (buffer)
|
||||||
|
buffer->setColorSpace(colorSpace());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QPlatformGraphicsBuffer *QCALayerBackingStore::graphicsBuffer() const
|
QPlatformGraphicsBuffer *QCALayerBackingStore::graphicsBuffer() const
|
||||||
@ -701,10 +709,11 @@ bool QCALayerBackingStore::prepareForFlush()
|
|||||||
|
|
||||||
QCALayerBackingStore::GraphicsBuffer::GraphicsBuffer(const QSize &size, qreal devicePixelRatio,
|
QCALayerBackingStore::GraphicsBuffer::GraphicsBuffer(const QSize &size, qreal devicePixelRatio,
|
||||||
const QPixelFormat &format, QCFType<CGColorSpaceRef> colorSpace)
|
const QPixelFormat &format, QCFType<CGColorSpaceRef> colorSpace)
|
||||||
: QIOSurfaceGraphicsBuffer(size, format, colorSpace)
|
: QIOSurfaceGraphicsBuffer(size, format)
|
||||||
, dirtyRegion(0, 0, size.width() / devicePixelRatio, size.height() / devicePixelRatio)
|
, dirtyRegion(0, 0, size.width() / devicePixelRatio, size.height() / devicePixelRatio)
|
||||||
, m_devicePixelRatio(devicePixelRatio)
|
, m_devicePixelRatio(devicePixelRatio)
|
||||||
{
|
{
|
||||||
|
setColorSpace(colorSpace);
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage *QCALayerBackingStore::GraphicsBuffer::asImage()
|
QImage *QCALayerBackingStore::GraphicsBuffer::asImage()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2017 The Qt Company Ltd.
|
** Copyright (C) 2019 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the plugins of the Qt Toolkit.
|
** This file is part of the plugins of the Qt Toolkit.
|
||||||
@ -52,6 +52,8 @@
|
|||||||
@property (class, strong, readonly) NSColor *unemphasizedSelectedTextColor NS_AVAILABLE_MAC(10_14);
|
@property (class, strong, readonly) NSColor *unemphasizedSelectedTextColor NS_AVAILABLE_MAC(10_14);
|
||||||
@property (class, strong, readonly) NSColor *unemphasizedSelectedContentBackgroundColor NS_AVAILABLE_MAC(10_14);
|
@property (class, strong, readonly) NSColor *unemphasizedSelectedContentBackgroundColor NS_AVAILABLE_MAC(10_14);
|
||||||
@property (class, strong, readonly) NSArray<NSColor *> *alternatingContentBackgroundColors NS_AVAILABLE_MAC(10_14);
|
@property (class, strong, readonly) NSArray<NSColor *> *alternatingContentBackgroundColors NS_AVAILABLE_MAC(10_14);
|
||||||
|
// Missing from non-Mojave SDKs, even if introduced in 10.10
|
||||||
|
@property (class, strong, readonly) NSColor *linkColor NS_AVAILABLE_MAC(10_10);
|
||||||
@end
|
@end
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -111,6 +113,8 @@ QPalette * qt_mac_createSystemPalette()
|
|||||||
|
|
||||||
palette->setBrush(QPalette::ToolTipBase, qt_mac_toQBrush([NSColor controlColor]));
|
palette->setBrush(QPalette::ToolTipBase, qt_mac_toQBrush([NSColor controlColor]));
|
||||||
|
|
||||||
|
palette->setColor(QPalette::Normal, QPalette::Link, qt_mac_toQColor([NSColor linkColor]));
|
||||||
|
|
||||||
return palette;
|
return palette;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +48,11 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QIOSurfaceGraphicsBuffer : public QPlatformGraphicsBuffer
|
class QIOSurfaceGraphicsBuffer : public QPlatformGraphicsBuffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QIOSurfaceGraphicsBuffer(const QSize &size, const QPixelFormat &format, QCFType<CGColorSpaceRef> colorSpace);
|
QIOSurfaceGraphicsBuffer(const QSize &size, const QPixelFormat &format);
|
||||||
~QIOSurfaceGraphicsBuffer();
|
~QIOSurfaceGraphicsBuffer();
|
||||||
|
|
||||||
|
void setColorSpace(QCFType<CGColorSpaceRef> colorSpace);
|
||||||
|
|
||||||
const uchar *data() const override;
|
const uchar *data() const override;
|
||||||
uchar *data() override;
|
uchar *data() override;
|
||||||
int bytesPerLine() const override;
|
int bytesPerLine() const override;
|
||||||
|
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
Q_LOGGING_CATEGORY(lcQpaIOSurface, "qt.qpa.backingstore.iosurface");
|
Q_LOGGING_CATEGORY(lcQpaIOSurface, "qt.qpa.backingstore.iosurface");
|
||||||
|
|
||||||
QIOSurfaceGraphicsBuffer::QIOSurfaceGraphicsBuffer(const QSize &size, const QPixelFormat &format, QCFType<CGColorSpaceRef> colorSpace)
|
QIOSurfaceGraphicsBuffer::QIOSurfaceGraphicsBuffer(const QSize &size, const QPixelFormat &format)
|
||||||
: QPlatformGraphicsBuffer(size, format)
|
: QPlatformGraphicsBuffer(size, format)
|
||||||
{
|
{
|
||||||
const size_t width = size.width();
|
const size_t width = size.width();
|
||||||
@ -81,17 +81,26 @@ QIOSurfaceGraphicsBuffer::QIOSurfaceGraphicsBuffer(const QSize &size, const QPix
|
|||||||
|
|
||||||
Q_ASSERT(size_t(bytesPerLine()) == bytesPerRow);
|
Q_ASSERT(size_t(bytesPerLine()) == bytesPerRow);
|
||||||
Q_ASSERT(size_t(byteCount()) == totalBytes);
|
Q_ASSERT(size_t(byteCount()) == totalBytes);
|
||||||
|
|
||||||
if (colorSpace) {
|
|
||||||
IOSurfaceSetValue(m_surface, CFSTR("IOSurfaceColorSpace"),
|
|
||||||
QCFType<CFPropertyListRef>(CGColorSpaceCopyPropertyList(colorSpace)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QIOSurfaceGraphicsBuffer::~QIOSurfaceGraphicsBuffer()
|
QIOSurfaceGraphicsBuffer::~QIOSurfaceGraphicsBuffer()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QIOSurfaceGraphicsBuffer::setColorSpace(QCFType<CGColorSpaceRef> colorSpace)
|
||||||
|
{
|
||||||
|
static const auto kIOSurfaceColorSpace = CFSTR("IOSurfaceColorSpace");
|
||||||
|
|
||||||
|
qCDebug(lcQpaIOSurface) << "Tagging" << this << "with color space" << colorSpace;
|
||||||
|
|
||||||
|
if (colorSpace) {
|
||||||
|
IOSurfaceSetValue(m_surface, kIOSurfaceColorSpace,
|
||||||
|
QCFType<CFPropertyListRef>(CGColorSpaceCopyPropertyList(colorSpace)));
|
||||||
|
} else {
|
||||||
|
IOSurfaceRemoveValue(m_surface, kIOSurfaceColorSpace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const uchar *QIOSurfaceGraphicsBuffer::data() const
|
const uchar *QIOSurfaceGraphicsBuffer::data() const
|
||||||
{
|
{
|
||||||
return (const uchar *)IOSurfaceGetBaseAddress(m_surface);
|
return (const uchar *)IOSurfaceGetBaseAddress(m_surface);
|
||||||
|
@ -255,8 +255,8 @@ static bool isMouseEvent(NSEvent *ev)
|
|||||||
|
|
||||||
- (NSColor *)backgroundColor
|
- (NSColor *)backgroundColor
|
||||||
{
|
{
|
||||||
return self.styleMask & NSWindowStyleMaskTexturedBackground ?
|
return self.styleMask == NSWindowStyleMaskBorderless ?
|
||||||
[super backgroundColor] : [NSColor clearColor];
|
[NSColor clearColor] : [super backgroundColor];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)sendEvent:(NSEvent*)theEvent
|
- (void)sendEvent:(NSEvent*)theEvent
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#if QT_CONFIG(regularexpression)
|
#if QT_CONFIG(regularexpression)
|
||||||
|
# include <QFileInfo>
|
||||||
# include <QRegularExpression>
|
# include <QRegularExpression>
|
||||||
#endif
|
#endif
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
@ -144,7 +145,12 @@ int QEglFSDeviceIntegration::framebufferIndex() const
|
|||||||
int fbIndex = 0;
|
int fbIndex = 0;
|
||||||
#if QT_CONFIG(regularexpression)
|
#if QT_CONFIG(regularexpression)
|
||||||
QRegularExpression fbIndexRx(QLatin1String("fb(\\d+)"));
|
QRegularExpression fbIndexRx(QLatin1String("fb(\\d+)"));
|
||||||
QRegularExpressionMatch match = fbIndexRx.match(QString::fromLocal8Bit(fbDeviceName()));
|
QFileInfo fbinfo(QString::fromLocal8Bit(fbDeviceName()));
|
||||||
|
QRegularExpressionMatch match;
|
||||||
|
if (fbinfo.isSymLink())
|
||||||
|
match = fbIndexRx.match(fbinfo.symLinkTarget());
|
||||||
|
else
|
||||||
|
match = fbIndexRx.match(fbinfo.fileName());
|
||||||
if (match.hasMatch())
|
if (match.hasMatch())
|
||||||
fbIndex = match.captured(1).toInt();
|
fbIndex = match.captured(1).toInt();
|
||||||
#endif
|
#endif
|
||||||
|
@ -83,6 +83,8 @@ bool QEglFSKmsGbmDevice::open()
|
|||||||
|
|
||||||
setFd(fd);
|
setFd(fd);
|
||||||
|
|
||||||
|
m_eventReader.create(this);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,6 +92,8 @@ void QEglFSKmsGbmDevice::close()
|
|||||||
{
|
{
|
||||||
// Note: screens are gone at this stage.
|
// Note: screens are gone at this stage.
|
||||||
|
|
||||||
|
m_eventReader.destroy();
|
||||||
|
|
||||||
if (m_gbm_device) {
|
if (m_gbm_device) {
|
||||||
gbm_device_destroy(m_gbm_device);
|
gbm_device_destroy(m_gbm_device);
|
||||||
m_gbm_device = nullptr;
|
m_gbm_device = nullptr;
|
||||||
|
@ -54,8 +54,6 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
QMutex QEglFSKmsGbmScreen::m_waitForFlipMutex;
|
|
||||||
|
|
||||||
QEglFSKmsGbmIntegration::QEglFSKmsGbmIntegration()
|
QEglFSKmsGbmIntegration::QEglFSKmsGbmIntegration()
|
||||||
{
|
{
|
||||||
qCDebug(qLcEglfsKmsDebug, "New DRM/KMS via GBM integration created");
|
qCDebug(qLcEglfsKmsDebug, "New DRM/KMS via GBM integration created");
|
||||||
|
@ -110,7 +110,7 @@ QEglFSKmsGbmScreen::FrameBuffer *QEglFSKmsGbmScreen::framebufferForBufferObject(
|
|||||||
return fb.take();
|
return fb.take();
|
||||||
}
|
}
|
||||||
|
|
||||||
QEglFSKmsGbmScreen::QEglFSKmsGbmScreen(QKmsDevice *device, const QKmsOutput &output, bool headless)
|
QEglFSKmsGbmScreen::QEglFSKmsGbmScreen(QEglFSKmsDevice *device, const QKmsOutput &output, bool headless)
|
||||||
: QEglFSKmsScreen(device, output, headless)
|
: QEglFSKmsScreen(device, output, headless)
|
||||||
, m_gbm_surface(nullptr)
|
, m_gbm_surface(nullptr)
|
||||||
, m_gbm_bo_current(nullptr)
|
, m_gbm_bo_current(nullptr)
|
||||||
@ -243,7 +243,7 @@ void QEglFSKmsGbmScreen::ensureModeSet(uint32_t fb)
|
|||||||
|
|
||||||
if (device()->hasAtomicSupport()) {
|
if (device()->hasAtomicSupport()) {
|
||||||
#if QT_CONFIG(drm_atomic)
|
#if QT_CONFIG(drm_atomic)
|
||||||
drmModeAtomicReq *request = device()->atomic_request();
|
drmModeAtomicReq *request = device()->threadLocalAtomicRequest();
|
||||||
if (request) {
|
if (request) {
|
||||||
drmModeAtomicAddProperty(request, op.connector_id, op.crtcIdPropertyId, op.crtc_id);
|
drmModeAtomicAddProperty(request, op.connector_id, op.crtcIdPropertyId, op.crtc_id);
|
||||||
drmModeAtomicAddProperty(request, op.crtc_id, op.modeIdPropertyId, op.mode_blob_id);
|
drmModeAtomicAddProperty(request, op.crtc_id, op.modeIdPropertyId, op.mode_blob_id);
|
||||||
@ -276,19 +276,15 @@ void QEglFSKmsGbmScreen::waitForFlip()
|
|||||||
if (!m_gbm_bo_next)
|
if (!m_gbm_bo_next)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QMutexLocker lock(&m_waitForFlipMutex);
|
m_flipMutex.lock();
|
||||||
while (m_gbm_bo_next) {
|
device()->eventReader()->startWaitFlip(this, &m_flipMutex, &m_flipCond);
|
||||||
drmEventContext drmEvent;
|
m_flipCond.wait(&m_flipMutex);
|
||||||
memset(&drmEvent, 0, sizeof(drmEvent));
|
m_flipMutex.unlock();
|
||||||
drmEvent.version = 2;
|
|
||||||
drmEvent.vblank_handler = nullptr;
|
flipFinished();
|
||||||
drmEvent.page_flip_handler = pageFlipHandler;
|
|
||||||
drmHandleEvent(device()->fd(), &drmEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if QT_CONFIG(drm_atomic)
|
#if QT_CONFIG(drm_atomic)
|
||||||
if (device()->hasAtomicSupport())
|
device()->threadLocalAtomicReset();
|
||||||
device()->atomicReset();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,16 +320,16 @@ void QEglFSKmsGbmScreen::flip()
|
|||||||
|
|
||||||
if (device()->hasAtomicSupport()) {
|
if (device()->hasAtomicSupport()) {
|
||||||
#if QT_CONFIG(drm_atomic)
|
#if QT_CONFIG(drm_atomic)
|
||||||
drmModeAtomicReq *request = device()->atomic_request();
|
drmModeAtomicReq *request = device()->threadLocalAtomicRequest();
|
||||||
if (request) {
|
if (request) {
|
||||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->framebufferPropertyId, fb->fb);
|
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->framebufferPropertyId, fb->fb);
|
||||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcPropertyId, op.crtc_id);
|
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcPropertyId, op.crtc_id);
|
||||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcwidthPropertyId,
|
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcwidthPropertyId,
|
||||||
output().size.width() << 16);
|
op.size.width() << 16);
|
||||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcXPropertyId, 0);
|
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcXPropertyId, 0);
|
||||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcYPropertyId, 0);
|
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcYPropertyId, 0);
|
||||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcheightPropertyId,
|
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->srcheightPropertyId,
|
||||||
output().size.height() << 16);
|
op.size.height() << 16);
|
||||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcXPropertyId, 0);
|
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcXPropertyId, 0);
|
||||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcYPropertyId, 0);
|
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcYPropertyId, 0);
|
||||||
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcwidthPropertyId,
|
drmModeAtomicAddProperty(request, op.eglfs_plane->id, op.eglfs_plane->crtcwidthPropertyId,
|
||||||
@ -368,7 +364,7 @@ void QEglFSKmsGbmScreen::flip()
|
|||||||
|
|
||||||
if (device()->hasAtomicSupport()) {
|
if (device()->hasAtomicSupport()) {
|
||||||
#if QT_CONFIG(drm_atomic)
|
#if QT_CONFIG(drm_atomic)
|
||||||
drmModeAtomicReq *request = device()->atomic_request();
|
drmModeAtomicReq *request = device()->threadLocalAtomicRequest();
|
||||||
if (request) {
|
if (request) {
|
||||||
drmModeAtomicAddProperty(request, d.screen->output().eglfs_plane->id,
|
drmModeAtomicAddProperty(request, d.screen->output().eglfs_plane->id,
|
||||||
d.screen->output().eglfs_plane->framebufferPropertyId, fb->fb);
|
d.screen->output().eglfs_plane->framebufferPropertyId, fb->fb);
|
||||||
@ -391,22 +387,10 @@ void QEglFSKmsGbmScreen::flip()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if QT_CONFIG(drm_atomic)
|
#if QT_CONFIG(drm_atomic)
|
||||||
if (device()->hasAtomicSupport())
|
device()->threadLocalAtomicCommit(this);
|
||||||
device()->atomicCommit(this);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QEglFSKmsGbmScreen::pageFlipHandler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data)
|
|
||||||
{
|
|
||||||
Q_UNUSED(fd);
|
|
||||||
Q_UNUSED(sequence);
|
|
||||||
Q_UNUSED(tv_sec);
|
|
||||||
Q_UNUSED(tv_usec);
|
|
||||||
|
|
||||||
QEglFSKmsGbmScreen *screen = static_cast<QEglFSKmsGbmScreen *>(user_data);
|
|
||||||
screen->flipFinished();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QEglFSKmsGbmScreen::flipFinished()
|
void QEglFSKmsGbmScreen::flipFinished()
|
||||||
{
|
{
|
||||||
if (m_cloneSource) {
|
if (m_cloneSource) {
|
||||||
|
@ -43,7 +43,8 @@
|
|||||||
#define QEGLFSKMSGBMSCREEN_H
|
#define QEGLFSKMSGBMSCREEN_H
|
||||||
|
|
||||||
#include "qeglfskmsscreen.h"
|
#include "qeglfskmsscreen.h"
|
||||||
#include <QtCore/QMutex>
|
#include <QMutex>
|
||||||
|
#include <QWaitCondition>
|
||||||
|
|
||||||
#include <gbm.h>
|
#include <gbm.h>
|
||||||
|
|
||||||
@ -54,7 +55,7 @@ class QEglFSKmsGbmCursor;
|
|||||||
class QEglFSKmsGbmScreen : public QEglFSKmsScreen
|
class QEglFSKmsGbmScreen : public QEglFSKmsScreen
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QEglFSKmsGbmScreen(QKmsDevice *device, const QKmsOutput &output, bool headless);
|
QEglFSKmsGbmScreen(QEglFSKmsDevice *device, const QKmsOutput &output, bool headless);
|
||||||
~QEglFSKmsGbmScreen();
|
~QEglFSKmsGbmScreen();
|
||||||
|
|
||||||
QPlatformCursor *cursor() const override;
|
QPlatformCursor *cursor() const override;
|
||||||
@ -75,18 +76,15 @@ private:
|
|||||||
void cloneDestFlipFinished(QEglFSKmsGbmScreen *cloneDestScreen);
|
void cloneDestFlipFinished(QEglFSKmsGbmScreen *cloneDestScreen);
|
||||||
void updateFlipStatus();
|
void updateFlipStatus();
|
||||||
|
|
||||||
static void pageFlipHandler(int fd,
|
|
||||||
unsigned int sequence,
|
|
||||||
unsigned int tv_sec,
|
|
||||||
unsigned int tv_usec,
|
|
||||||
void *user_data);
|
|
||||||
|
|
||||||
gbm_surface *m_gbm_surface;
|
gbm_surface *m_gbm_surface;
|
||||||
|
|
||||||
gbm_bo *m_gbm_bo_current;
|
gbm_bo *m_gbm_bo_current;
|
||||||
gbm_bo *m_gbm_bo_next;
|
gbm_bo *m_gbm_bo_next;
|
||||||
bool m_flipPending;
|
bool m_flipPending;
|
||||||
|
|
||||||
|
QMutex m_flipMutex;
|
||||||
|
QWaitCondition m_flipCond;
|
||||||
|
|
||||||
QScopedPointer<QEglFSKmsGbmCursor> m_cursor;
|
QScopedPointer<QEglFSKmsGbmCursor> m_cursor;
|
||||||
|
|
||||||
struct FrameBuffer {
|
struct FrameBuffer {
|
||||||
@ -101,8 +99,6 @@ private:
|
|||||||
bool cloneFlipPending = false;
|
bool cloneFlipPending = false;
|
||||||
};
|
};
|
||||||
QVector<CloneDestination> m_cloneDests;
|
QVector<CloneDestination> m_cloneDests;
|
||||||
|
|
||||||
static QMutex m_waitForFlipMutex;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user