Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
This commit is contained in:
commit
5bfac9d653
686
LICENSE.GPLv3
Normal file
686
LICENSE.GPLv3
Normal file
@ -0,0 +1,686 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
|
||||
Contact: http://www.qt.io/licensing/
|
||||
|
||||
You may use, distribute and copy the Qt GUI Toolkit under the terms of
|
||||
GNU Lesser General Public License version 3. That license references
|
||||
the General Public License version 3, that is displayed below. Other
|
||||
portions of the Qt Toolkit may be licensed directly other this license.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
@ -4,7 +4,9 @@
|
||||
Contact: http://www.qt.io/licensing/
|
||||
|
||||
You may use, distribute and copy the Qt GUI Toolkit under the terms of
|
||||
GNU Lesser General Public License version 3, which is displayed below.
|
||||
GNU Lesser General Public License version 3, which is displayed
|
||||
below. This license makes reference to the version 3 of the GNU General
|
||||
Public License, which you can find in the LICENSE.GPLv3 file.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
@ -37,7 +37,7 @@ set QTDIR=%CD%
|
||||
if not exist %QTSRC%.gitignore goto sconf
|
||||
echo Please wait while bootstrapping configure ...
|
||||
|
||||
for %%C in (cl.exe icl.exe g++.exe perl.exe) do set %%C=%%~$PATH:C
|
||||
for %%C in (cl.exe icl.exe g++.exe perl.exe jom.exe) do set %%C=%%~$PATH:C
|
||||
|
||||
if "%perl.exe%" == "" (
|
||||
echo Perl not found in PATH. Aborting. >&2
|
||||
@ -57,6 +57,9 @@ if not exist tools\configure (
|
||||
cd tools\configure
|
||||
if errorlevel 1 goto exit
|
||||
|
||||
set make=nmake
|
||||
if not "%jom.exe%" == "" set make=jom
|
||||
|
||||
echo #### Generated by configure.bat - DO NOT EDIT! ####> Makefile
|
||||
echo/>> Makefile
|
||||
for /f "tokens=3 usebackq" %%V in (`findstr QT_VERSION_STR %QTSRC%src\corelib\global\qglobal.h`) do @echo QTVERSION = %%~V>> Makefile
|
||||
@ -66,14 +69,12 @@ if not "%icl.exe%" == "" (
|
||||
rem This must have a trailing space.
|
||||
echo QTSRC = %QTSRC% >> Makefile
|
||||
set tmpl=win32
|
||||
set make=nmake
|
||||
) else if not "%cl.exe%" == "" (
|
||||
echo CXX = cl>>Makefile
|
||||
echo EXTRA_CXXFLAGS =>>Makefile
|
||||
rem This must have a trailing space.
|
||||
echo QTSRC = %QTSRC% >> Makefile
|
||||
set tmpl=win32
|
||||
set make=nmake
|
||||
) else if not "%g++.exe%" == "" (
|
||||
echo CXX = g++>>Makefile
|
||||
echo EXTRA_CXXFLAGS =>>Makefile
|
||||
|
@ -157,4 +157,5 @@ Cpp.ignoredirectives += \
|
||||
QT_WARNING_DISABLE_GCC \
|
||||
QT_WARNING_DISABLE_INTEL \
|
||||
QT_WARNING_DISABLE_MSVC \
|
||||
Q_ATTRIBUTE_FORMAT_PRINTF
|
||||
Q_ATTRIBUTE_FORMAT_PRINTF \
|
||||
Q_MV_IOS
|
||||
|
@ -141,7 +141,7 @@ greaterThan(MSC_VER, 1899) {
|
||||
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
|
||||
QMAKE_CFLAGS_AVX2 = -arch:AVX2
|
||||
QMAKE_CXXFLAGS += -Zc:strictStrings
|
||||
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458
|
||||
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577
|
||||
}
|
||||
|
||||
unset(MSC_VER)
|
||||
|
@ -41,24 +41,24 @@ macx-xcode {
|
||||
|
||||
# Set up default 4-inch iPhone/iPod launch image so that our apps
|
||||
# support the full screen resolution of those devices.
|
||||
launch_image = Default-568h@2x.png
|
||||
copy_image.input = $$QMAKESPEC/$$launch_image
|
||||
copy_image.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_image
|
||||
copy_image.CONFIG = verbatim
|
||||
QMAKE_SUBSTITUTES += copy_image
|
||||
launch_images.files = $$copy_image.output
|
||||
QMAKE_BUNDLE_DATA += launch_images
|
||||
qmake_launch_image = Default-568h@2x.png
|
||||
qmake_copy_image.input = $$QMAKESPEC/$$qmake_launch_image
|
||||
qmake_copy_image.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_image
|
||||
qmake_copy_image.CONFIG = verbatim
|
||||
QMAKE_SUBSTITUTES += qmake_copy_image
|
||||
qmake_launch_images.files = $$qmake_copy_image.output
|
||||
QMAKE_BUNDLE_DATA += qmake_launch_images
|
||||
|
||||
lessThan(QMAKE_XCODE_VERSION, "6.0") {
|
||||
warning("You need to update Xcode to version 6 or newer to fully support iPhone6/6+")
|
||||
} else {
|
||||
# Set up default LaunchScreen to support iPhone6/6+
|
||||
launch_screen = LaunchScreen.xib
|
||||
copy_launch_screen.input = $$QMAKESPEC/$$launch_screen
|
||||
copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_screen
|
||||
QMAKE_SUBSTITUTES += copy_launch_screen
|
||||
launch_screens.files = $$copy_launch_screen.output
|
||||
QMAKE_BUNDLE_DATA += launch_screens
|
||||
qmake_launch_screen = LaunchScreen.xib
|
||||
qmake_copy_launch_screen.input = $$QMAKESPEC/$$qmake_launch_screen
|
||||
qmake_copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_screen
|
||||
QMAKE_SUBSTITUTES += qmake_copy_launch_screen
|
||||
qmake_launch_screens.files = $$qmake_copy_launch_screen.output
|
||||
QMAKE_BUNDLE_DATA += qmake_launch_screens
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2197,6 +2197,10 @@
|
||||
|
||||
\snippet code/doc_src_qmake-manual.pro 47
|
||||
|
||||
If your project is a \QD plugin, use the value \c uiplugin to specify that
|
||||
the project is to be built as a library, but with specific plugin support
|
||||
for \QD. For more information, see \l {Building and Installing the Plugin}.
|
||||
|
||||
\section1 QTPLUGIN
|
||||
|
||||
Specifies a list of names of static Qt plugins that are to be
|
||||
|
10
src/3rdparty/forkfd/forkfd.c
vendored
10
src/3rdparty/forkfd/forkfd.c
vendored
@ -44,11 +44,13 @@
|
||||
|
||||
#ifdef __linux__
|
||||
# define HAVE_WAIT4 1
|
||||
# if (defined(__GLIBC__) && (__GLIBC__ << 16) + __GLIBC_MINOR__ >= 0x207) || defined(__BIONIC__)
|
||||
# if defined(__BIONIC__) || (defined(__GLIBC__) && (__GLIBC__ << 8) + __GLIBC_MINOR__ >= 0x207 && \
|
||||
(!defined(__UCLIBC__) || ((__UCLIBC_MAJOR__ << 16) + (__UCLIBC_MINOR__ << 8) + __UCLIBC_SUBLEVEL__ > 0x921)))
|
||||
# include <sys/eventfd.h>
|
||||
# define HAVE_EVENTFD 1
|
||||
# endif
|
||||
# if (defined(__GLIBC__) && (__GLIBC__ << 16) + __GLIBC_MINOR__ >= 0x209) || defined(__BIONIC__)
|
||||
# if defined(__BIONIC__) || (defined(__GLIBC__) && (__GLIBC__ << 8) + __GLIBC_MINOR__ >= 0x209 && \
|
||||
(!defined(__UCLIBC__) || ((__UCLIBC_MAJOR__ << 16) + (__UCLIBC_MINOR__ << 8) + __UCLIBC_SUBLEVEL__ > 0x921)))
|
||||
# define HAVE_PIPE2 1
|
||||
# endif
|
||||
#endif
|
||||
@ -56,6 +58,10 @@
|
||||
#if _POSIX_VERSION-0 >= 200809L || _XOPEN_VERSION-0 >= 500
|
||||
# define HAVE_WAITID 1
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
# define HAVE_PIPE2 1
|
||||
#endif
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) || \
|
||||
defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
||||
# define HAVE_WAIT4 1
|
||||
|
2
src/3rdparty/md5/md5.cpp
vendored
2
src/3rdparty/md5/md5.cpp
vendored
@ -36,7 +36,7 @@ static void
|
||||
byteSwap(UWORD32 *buf, unsigned words)
|
||||
{
|
||||
const quint32 byteOrderTest = 0x1;
|
||||
if (((char *)&byteOrderTest)[0] == 0) {
|
||||
if (((const char *)&byteOrderTest)[0] == 0) {
|
||||
md5byte *p = (md5byte *)buf;
|
||||
|
||||
do {
|
||||
|
@ -760,12 +760,6 @@ public class QtActivityDelegate
|
||||
|
||||
if (null == m_surfaces)
|
||||
onCreate(null);
|
||||
String nativeLibraryDir = QtNativeLibrariesDir.nativeLibrariesDir(m_activity);
|
||||
QtNative.startApplication(m_applicationParameters,
|
||||
m_environmentVariables,
|
||||
m_mainLib,
|
||||
nativeLibraryDir);
|
||||
m_started = true;
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -781,14 +775,26 @@ public class QtActivityDelegate
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
m_quitApp = true;
|
||||
Runnable startApplication = null;
|
||||
if (null == savedInstanceState) {
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
m_activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
QtNative.setApplicationDisplayMetrics(metrics.widthPixels, metrics.heightPixels,
|
||||
0, 0,
|
||||
metrics.xdpi, metrics.ydpi, metrics.scaledDensity);
|
||||
startApplication = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
String nativeLibraryDir = QtNativeLibrariesDir.nativeLibrariesDir(m_activity);
|
||||
QtNative.startApplication(m_applicationParameters,
|
||||
m_environmentVariables,
|
||||
m_mainLib,
|
||||
nativeLibraryDir);
|
||||
m_started = true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
m_activity.finish();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
m_layout = new QtLayout(m_activity);
|
||||
m_layout = new QtLayout(m_activity, startApplication);
|
||||
m_editText = new QtEditText(m_activity, this);
|
||||
m_imm = (InputMethodManager)m_activity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
m_surfaces = new HashMap<Integer, QtSurface>();
|
||||
|
@ -43,9 +43,11 @@ import android.view.ViewGroup;
|
||||
|
||||
public class QtLayout extends ViewGroup
|
||||
{
|
||||
public QtLayout(Context context)
|
||||
private Runnable m_startApplicationRunnable;
|
||||
public QtLayout(Context context, Runnable startRunnable)
|
||||
{
|
||||
super(context);
|
||||
m_startApplicationRunnable = startRunnable;
|
||||
}
|
||||
|
||||
public QtLayout(Context context, AttributeSet attrs)
|
||||
@ -65,6 +67,10 @@ public class QtLayout extends ViewGroup
|
||||
((Activity) getContext()).getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
QtNative.setApplicationDisplayMetrics(metrics.widthPixels,
|
||||
metrics.heightPixels, w, h, metrics.xdpi, metrics.ydpi, metrics.scaledDensity);
|
||||
if (m_startApplicationRunnable != null) {
|
||||
m_startApplicationRunnable.run();
|
||||
m_startApplicationRunnable = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -328,10 +328,10 @@ template <typename X> struct QAtomicOps
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef ATOMIC_VAR_INIT
|
||||
# define Q_BASIC_ATOMIC_INITIALIZER(a) { ATOMIC_VAR_INIT(a) }
|
||||
#if defined(Q_COMPILER_CONSTEXPR) && defined(Q_COMPILER_DEFAULT_MEMBERS) && defined(Q_COMPILER_DELETE_MEMBERS)
|
||||
# define Q_BASIC_ATOMIC_INITIALIZER(a) { a }
|
||||
#else
|
||||
# define Q_BASIC_ATOMIC_INITIALIZER(a) { {a} }
|
||||
# define Q_BASIC_ATOMIC_INITIALIZER(a) { ATOMIC_VAR_INIT(a) }
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -51,8 +51,8 @@ static inline bool simdEncodeAscii(uchar *&dst, const ushort *&nextAscii, const
|
||||
{
|
||||
// do sixteen characters at a time
|
||||
for ( ; end - src >= 16; src += 16, dst += 16) {
|
||||
__m128i data1 = _mm_loadu_si128((__m128i*)src);
|
||||
__m128i data2 = _mm_loadu_si128(1+(__m128i*)src);
|
||||
__m128i data1 = _mm_loadu_si128((const __m128i*)src);
|
||||
__m128i data2 = _mm_loadu_si128(1+(const __m128i*)src);
|
||||
|
||||
|
||||
// check if everything is ASCII
|
||||
@ -90,7 +90,7 @@ static inline bool simdDecodeAscii(ushort *&dst, const uchar *&nextAscii, const
|
||||
{
|
||||
// do sixteen characters at a time
|
||||
for ( ; end - src >= 16; src += 16, dst += 16) {
|
||||
__m128i data = _mm_loadu_si128((__m128i*)src);
|
||||
__m128i data = _mm_loadu_si128((const __m128i*)src);
|
||||
|
||||
#ifdef __AVX2__
|
||||
const int BitSpacing = 2;
|
||||
@ -390,7 +390,7 @@ QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::Converte
|
||||
*dst++ = QChar::ReplacementCharacter;
|
||||
}
|
||||
|
||||
result.truncate(dst - (ushort *)result.unicode());
|
||||
result.truncate(dst - (const ushort *)result.unicode());
|
||||
if (state) {
|
||||
state->invalidChars += invalid;
|
||||
if (headerdone)
|
||||
@ -469,7 +469,7 @@ QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::Convert
|
||||
endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
|
||||
|
||||
QString result(len, Qt::Uninitialized); // worst case
|
||||
QChar *qch = (QChar *)result.unicode();
|
||||
QChar *qch = (QChar *)result.data();
|
||||
while (len--) {
|
||||
if (half) {
|
||||
QChar ch;
|
||||
@ -600,7 +600,7 @@ QString QUtf32::convertToUnicode(const char *chars, int len, QTextCodec::Convert
|
||||
|
||||
QString result;
|
||||
result.resize((num + len) >> 2 << 1); // worst case
|
||||
QChar *qch = (QChar *)result.unicode();
|
||||
QChar *qch = (QChar *)result.data();
|
||||
|
||||
const char *end = chars + len;
|
||||
while (chars < end) {
|
||||
|
@ -572,6 +572,9 @@
|
||||
# if _MSC_VER < 1900
|
||||
// ICC disables unicode string support when compatibility mode with MSVC 2013 or lower is active
|
||||
# undef Q_COMPILER_UNICODE_STRINGS
|
||||
// Disable constexpr unless the MS headers have constexpr in all the right places too
|
||||
// (like std::numeric_limits<T>::max())
|
||||
# undef Q_COMPILER_CONSTEXPR
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
@ -1140,7 +1143,7 @@
|
||||
# define QT_WARNING_DISABLE_GCC(text) QT_DO_PRAGMA(GCC diagnostic ignored text) // GCC directives work in Clang too
|
||||
# define QT_WARNING_DISABLE_INTEL(number)
|
||||
# define QT_WARNING_DISABLE_MSVC(number)
|
||||
#elif defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 405)
|
||||
#elif defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
|
||||
# define QT_WARNING_PUSH QT_DO_PRAGMA(GCC diagnostic push)
|
||||
# define QT_WARNING_POP QT_DO_PRAGMA(GCC diagnostic pop)
|
||||
# define QT_WARNING_DISABLE_GCC(text) QT_DO_PRAGMA(GCC diagnostic ignored text)
|
||||
|
@ -1178,7 +1178,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
||||
\relates <QtGlobal>
|
||||
|
||||
Defined on Darwin-based operating systems distributed by Apple, which
|
||||
currently includes OS X and iOS, but not the open source version.
|
||||
currently includes OS X and iOS, but not the open source versions of Darwin.
|
||||
*/
|
||||
|
||||
/*!
|
||||
@ -1200,7 +1200,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
||||
\relates <QtGlobal>
|
||||
|
||||
Defined on all supported versions of Windows. That is, if
|
||||
\l Q_OS_WIN32, \l Q_OS_WIN64 or \l Q_OS_WINCE is defined.
|
||||
\l Q_OS_WIN32, \l Q_OS_WIN64, \l Q_OS_WINCE or \l Q_OS_WINRT is defined.
|
||||
*/
|
||||
|
||||
/*!
|
||||
@ -2046,8 +2046,6 @@ QSysInfo::WinVersion QSysInfo::windowsVersion()
|
||||
} else if (osver.dwMajorVersion == 10 && osver.dwMinorVersion == 0) {
|
||||
winver = QSysInfo::WV_WINDOWS10;
|
||||
} else {
|
||||
qWarning("Qt: Untested Windows version %d.%d detected!",
|
||||
int(osver.dwMajorVersion), int(osver.dwMinorVersion));
|
||||
winver = QSysInfo::WV_NT_based;
|
||||
}
|
||||
}
|
||||
|
@ -425,7 +425,7 @@ qint64 QBuffer::writeData(const char *data, qint64 len)
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(d->buf->data() + pos(), (uchar *)data, int(len));
|
||||
memcpy(d->buf->data() + pos(), data, int(len));
|
||||
|
||||
#ifndef QT_NO_QOBJECT
|
||||
d->writtenSinceLastEmit += len;
|
||||
|
@ -174,6 +174,16 @@ void QDebug::putUcs4(uint ucs4)
|
||||
maybeQuote('\'');
|
||||
}
|
||||
|
||||
// These two functions return true if the character should be printed by QDebug.
|
||||
// For QByteArray, this is technically identical to US-ASCII isprint();
|
||||
// for QString, we use QChar::isPrint, which requires a full UCS-4 decode.
|
||||
static inline bool isPrintable(uint ucs4)
|
||||
{ return QChar::isPrint(ucs4); }
|
||||
static inline bool isPrintable(ushort uc)
|
||||
{ return QChar::isPrint(uc); }
|
||||
static inline bool isPrintable(uchar c)
|
||||
{ return c >= ' ' && c < 0x7f; }
|
||||
|
||||
template <typename Char>
|
||||
static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, int length, bool isUnicode = true)
|
||||
{
|
||||
@ -194,22 +204,23 @@ static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, in
|
||||
}
|
||||
|
||||
if (sizeof(Char) == sizeof(QChar)) {
|
||||
// Surrogate characters are category Cs (Other_Surrogate), so isPrintable = false for them
|
||||
int runLength = 0;
|
||||
while (p + runLength != end &&
|
||||
p[runLength] < 0x7f && p[runLength] >= 0x20 && p[runLength] != '\\' && p[runLength] != '"')
|
||||
isPrintable(p[runLength]) && p[runLength] != '\\' && p[runLength] != '"')
|
||||
++runLength;
|
||||
if (runLength) {
|
||||
d->write(reinterpret_cast<const QChar *>(p), runLength);
|
||||
p += runLength - 1;
|
||||
continue;
|
||||
}
|
||||
} else if (*p < 0x7f && *p >= 0x20 && *p != '\\' && *p != '"') {
|
||||
} else if (isPrintable(*p) && *p != '\\' && *p != '"') {
|
||||
QChar c = QLatin1Char(*p);
|
||||
d->write(&c, 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
// print as an escape sequence
|
||||
// print as an escape sequence (maybe, see below for surrogate pairs)
|
||||
int buflen = 2;
|
||||
ushort buf[sizeof "\\U12345678" - 1];
|
||||
buf[0] = '\\';
|
||||
@ -248,17 +259,23 @@ static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, in
|
||||
if ((p + 1) != end && QChar::isLowSurrogate(p[1])) {
|
||||
// properly-paired surrogates
|
||||
uint ucs4 = QChar::surrogateToUcs4(*p, p[1]);
|
||||
if (isPrintable(ucs4)) {
|
||||
buf[0] = *p;
|
||||
buf[1] = p[1];
|
||||
buflen = 2;
|
||||
} else {
|
||||
buf[1] = 'U';
|
||||
buf[2] = '0'; // toHexUpper(ucs4 >> 32);
|
||||
buf[3] = '0'; // toHexUpper(ucs4 >> 28);
|
||||
buf[4] = toHexUpper(ucs4 >> 20);
|
||||
buf[5] = toHexUpper(ucs4 >> 16);
|
||||
buf[6] = toHexUpper(ucs4 >> 12);
|
||||
buf[7] = toHexUpper(ucs4 >> 8);
|
||||
buf[8] = toHexUpper(ucs4 >> 4);
|
||||
buf[9] = toHexUpper(ucs4);
|
||||
buflen = 10;
|
||||
}
|
||||
++p;
|
||||
buf[1] = 'U';
|
||||
buf[2] = '0'; // toHexUpper(ucs4 >> 32);
|
||||
buf[3] = '0'; // toHexUpper(ucs4 >> 28);
|
||||
buf[4] = toHexUpper(ucs4 >> 20);
|
||||
buf[5] = toHexUpper(ucs4 >> 16);
|
||||
buf[6] = toHexUpper(ucs4 >> 12);
|
||||
buf[7] = toHexUpper(ucs4 >> 8);
|
||||
buf[8] = toHexUpper(ucs4 >> 4);
|
||||
buf[9] = toHexUpper(ucs4);
|
||||
buflen = 10;
|
||||
break;
|
||||
}
|
||||
// improperly-paired surrogates, fall through
|
||||
@ -409,6 +426,9 @@ QDebug &QDebug::resetFormat()
|
||||
Disables automatic insertion of quotation characters around QChar, QString and QByteArray
|
||||
contents and returns a reference to the stream.
|
||||
|
||||
When quoting is disabled, these types are printed without quotation
|
||||
characters and without escaping of non-printable characters.
|
||||
|
||||
\sa quote(), maybeQuote()
|
||||
*/
|
||||
|
||||
@ -454,7 +474,11 @@ QDebug &QDebug::resetFormat()
|
||||
\fn QDebug &QDebug::operator<<(QChar t)
|
||||
|
||||
Writes the character, \a t, to the stream and returns a reference to the
|
||||
stream.
|
||||
stream. Normally, QDebug prints control characters and non-US-ASCII
|
||||
characters as their C escape sequences or their Unicode value (\\u1234). To
|
||||
print non-printable characters without transformation, enable the noquote()
|
||||
functionality, but note that some QDebug backends may not be 8-bit clean
|
||||
and may not be able to represent \c t.
|
||||
*/
|
||||
|
||||
/*!
|
||||
@ -545,34 +569,114 @@ QDebug &QDebug::resetFormat()
|
||||
\fn QDebug &QDebug::operator<<(const char *s)
|
||||
|
||||
Writes the '\\0'-terminated string, \a s, to the stream and returns a
|
||||
reference to the stream.
|
||||
reference to the stream. The string is never quoted nor transformed to the
|
||||
output, but note that some QDebug backends might not be 8-bit clean.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QDebug &QDebug::operator<<(const QString &s)
|
||||
|
||||
Writes the string, \a s, to the stream and returns a reference to the stream.
|
||||
Writes the string, \a s, to the stream and returns a reference to the
|
||||
stream. Normally, QDebug prints the string inside quotes and transforms
|
||||
non-printable characters to their Unicode values (\\u1234).
|
||||
|
||||
To print non-printable characters without transformation, enable the
|
||||
noquote() functionality. Note that some QDebug backends might not be 8-bit
|
||||
clean.
|
||||
|
||||
Output examples:
|
||||
\code
|
||||
QString s;
|
||||
|
||||
s = "a";
|
||||
qDebug().noquote() << s; // prints: a
|
||||
qDebug() << s; // prints: "a"
|
||||
|
||||
s = "\"a\r\n\"";
|
||||
qDebug() << s; // prints: "\"a\r\n\""
|
||||
|
||||
s = "\033"; // escape character
|
||||
qDebug() << s; // prints: "\u001B"
|
||||
|
||||
s = "\u00AD"; // SOFT HYPHEN
|
||||
qDebug() << s; // prints: "\u00AD"
|
||||
|
||||
s = "\u00E1"; // LATIN SMALL LETTER A WITH ACUTE
|
||||
qDebug() << s; // prints: "á"
|
||||
|
||||
s = "a\u0301"; // "a" followed by COMBINING ACUTE ACCENT
|
||||
qDebug() << s; // prints: "á";
|
||||
|
||||
s = "\u0430\u0301"; // CYRILLIC SMALL LETTER A followed by COMBINING ACUTE ACCENT
|
||||
qDebug() << s; // prints: "а́"
|
||||
\endcode
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QDebug &QDebug::operator<<(const QStringRef &s)
|
||||
|
||||
Writes the string reference, \a s, to the stream and returns a reference to
|
||||
the stream.
|
||||
Writes the string, \a s, to the stream and returns a reference to the
|
||||
stream. Normally, QDebug prints the string inside quotes and transforms
|
||||
non-printable characters to their Unicode values (\\u1234).
|
||||
|
||||
To print non-printable characters without transformation, enable the
|
||||
noquote() functionality. Note that some QDebug backends might not be 8-bit
|
||||
clean.
|
||||
|
||||
See the QString overload for examples.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QDebug &QDebug::operator<<(QLatin1String s)
|
||||
|
||||
Writes the Latin1-encoded string, \a s, to the stream and returns a reference
|
||||
to the stream.
|
||||
Writes the string, \a s, to the stream and returns a reference to the
|
||||
stream. Normally, QDebug prints the string inside quotes and transforms
|
||||
non-printable characters to their Unicode values (\\u1234).
|
||||
|
||||
To print non-printable characters without transformation, enable the
|
||||
noquote() functionality. Note that some QDebug backends might not be 8-bit
|
||||
clean.
|
||||
|
||||
See the QString overload for examples.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QDebug &QDebug::operator<<(const QByteArray &b)
|
||||
|
||||
Writes the byte array, \a b, to the stream and returns a reference to the
|
||||
stream.
|
||||
stream. Normally, QDebug prints the array inside quotes and transforms
|
||||
control or non-US-ASCII characters to their C escape sequences (\\xAB). This
|
||||
way, the output is always 7-bit clean and the string can be copied from the
|
||||
output and pasted back into C++ sources, if necessary.
|
||||
|
||||
To print non-printable characters without transformation, enable the
|
||||
noquote() functionality. Note that some QDebug backends might not be 8-bit
|
||||
clean.
|
||||
|
||||
Output examples:
|
||||
\code
|
||||
QByteArray ba;
|
||||
|
||||
ba = "a";
|
||||
qDebug().noquote() << ba; // prints: a
|
||||
qDebug() << ba; // prints: "a"
|
||||
|
||||
ba = "\"a\r\n\"";
|
||||
qDebug() << ba; // prints: "\"a\r\n\""
|
||||
|
||||
ba = "\033"; // escape character
|
||||
qDebug() << ba; // prints: "\x1B"
|
||||
|
||||
ba = "\xC3\xA1";
|
||||
qDebug() << ba; // prints: "\xC3\xA1"
|
||||
|
||||
ba = QByteArray("a\0b", 3);
|
||||
qDebug() << ba // prints: "\a\x00""b"
|
||||
\endcode
|
||||
|
||||
Note how QDebug needed to close and reopen the string in the way C and C++
|
||||
languages concatenate string literals so that the letter 'b' is not
|
||||
interpreted as part of the previous hexadecimal escape sequence.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -293,7 +293,7 @@ template <class T>
|
||||
inline typename QtPrivate::QEnableIf<
|
||||
QtPrivate::IsQEnumHelper<T>::Value || QtPrivate::IsQEnumHelper<QFlags<T> >::Value,
|
||||
QDebug>::Type
|
||||
operator<<(QDebug debug, const QFlags<T> &flags)
|
||||
qt_QMetaEnum_flagDebugOperator_helper(QDebug debug, const QFlags<T> &flags)
|
||||
{
|
||||
const QMetaObject *obj = qt_getEnumMetaObject(T());
|
||||
const char *name = qt_getEnumName(T());
|
||||
@ -304,10 +304,10 @@ template <class T>
|
||||
inline typename QtPrivate::QEnableIf<
|
||||
!QtPrivate::IsQEnumHelper<T>::Value && !QtPrivate::IsQEnumHelper<QFlags<T> >::Value,
|
||||
QDebug>::Type
|
||||
operator<<(QDebug debug, const QFlags<T> &flags)
|
||||
qt_QMetaEnum_flagDebugOperator_helper(QDebug debug, const QFlags<T> &flags)
|
||||
#else // !QT_NO_QOBJECT
|
||||
template <class T>
|
||||
inline QDebug operator<<(QDebug debug, const QFlags<T> &flags)
|
||||
inline QDebug qt_QMetaEnum_flagDebugOperator_helper(QDebug debug, const QFlags<T> &flags)
|
||||
#endif
|
||||
{
|
||||
QDebugStateSaver saver(debug);
|
||||
@ -327,6 +327,14 @@ inline QDebug operator<<(QDebug debug, const QFlags<T> &flags)
|
||||
return debug;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline QDebug operator<<(QDebug debug, const QFlags<T> &flags)
|
||||
{
|
||||
// We have to use an indirection otherwise specialisation of some other overload of the
|
||||
// operator<< the compiler would try to instantiate QFlags<T> for the QEnableIf
|
||||
return qt_QMetaEnum_flagDebugOperator_helper(debug, flags);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
|
||||
// We provide QDebug stream operators for commonly used Core Foundation
|
||||
|
@ -819,13 +819,13 @@ bool QFSFileEngine::extension(Extension extension, const ExtensionOption *option
|
||||
return feof(d->fh);
|
||||
|
||||
if (extension == MapExtension) {
|
||||
const MapExtensionOption *options = (MapExtensionOption*)(option);
|
||||
const MapExtensionOption *options = (const MapExtensionOption*)(option);
|
||||
MapExtensionReturn *returnValue = static_cast<MapExtensionReturn*>(output);
|
||||
returnValue->address = d->map(options->offset, options->size, options->flags);
|
||||
return (returnValue->address != 0);
|
||||
}
|
||||
if (extension == UnMapExtension) {
|
||||
UnMapExtensionOption *options = (UnMapExtensionOption*)option;
|
||||
const UnMapExtensionOption *options = (const UnMapExtensionOption*)option;
|
||||
return d->unmap(options->address);
|
||||
}
|
||||
|
||||
|
@ -398,10 +398,12 @@ void QLoggingRegistry::defaultCategoryFilter(QLoggingCategory *cat)
|
||||
Q_ASSERT(reg->categories.contains(cat));
|
||||
QtMsgType enableForLevel = reg->categories.value(cat);
|
||||
|
||||
// NB: note that the numeric values of the Qt*Msg constants are
|
||||
// not in severity order.
|
||||
bool debug = (enableForLevel == QtDebugMsg);
|
||||
bool info = (enableForLevel <= QtInfoMsg);
|
||||
bool warning = (enableForLevel <= QtWarningMsg);
|
||||
bool critical = (enableForLevel <= QtCriticalMsg);
|
||||
bool info = debug || (enableForLevel == QtInfoMsg);
|
||||
bool warning = info || (enableForLevel == QtWarningMsg);
|
||||
bool critical = warning || (enableForLevel == QtCriticalMsg);
|
||||
|
||||
// hard-wired implementation of
|
||||
// qt.*.debug=false
|
||||
|
@ -2122,6 +2122,13 @@ void QProcess::start(const QString &program, const QStringList &arguments, OpenM
|
||||
qWarning("QProcess::start: Process is already running");
|
||||
return;
|
||||
}
|
||||
if (program.isEmpty()) {
|
||||
Q_D(QProcess);
|
||||
d->processError = QProcess::FailedToStart;
|
||||
setErrorString(tr("No program defined"));
|
||||
emit error(d->processError);
|
||||
return;
|
||||
}
|
||||
|
||||
d->program = program;
|
||||
d->arguments = arguments;
|
||||
@ -2146,7 +2153,10 @@ void QProcess::start(OpenMode mode)
|
||||
return;
|
||||
}
|
||||
if (d->program.isEmpty()) {
|
||||
qWarning("QProcess::start: program not set");
|
||||
Q_D(QProcess);
|
||||
d->processError = QProcess::FailedToStart;
|
||||
setErrorString(tr("No program defined"));
|
||||
emit error(d->processError);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -956,7 +956,7 @@ public:
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
delete [] (uchar *)mappingBuffer();
|
||||
delete [] mappingBuffer();
|
||||
}
|
||||
}
|
||||
QString mappingFile() const { return fileName; }
|
||||
@ -1450,13 +1450,13 @@ bool QResourceFileEngine::extension(Extension extension, const ExtensionOption *
|
||||
{
|
||||
Q_D(QResourceFileEngine);
|
||||
if (extension == MapExtension) {
|
||||
const MapExtensionOption *options = (MapExtensionOption*)(option);
|
||||
const MapExtensionOption *options = (const MapExtensionOption*)(option);
|
||||
MapExtensionReturn *returnValue = static_cast<MapExtensionReturn*>(output);
|
||||
returnValue->address = d->map(options->offset, options->size, options->flags);
|
||||
return (returnValue->address != 0);
|
||||
}
|
||||
if (extension == UnMapExtension) {
|
||||
UnMapExtensionOption *options = (UnMapExtensionOption*)option;
|
||||
const UnMapExtensionOption *options = (const UnMapExtensionOption*)option;
|
||||
return d->unmap(options->address);
|
||||
}
|
||||
return false;
|
||||
|
@ -1744,13 +1744,19 @@ const QItemSelection QItemSelectionModel::selection() const
|
||||
|
||||
\property QItemSelectionModel::selectedIndexes
|
||||
*/
|
||||
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
\property QItemSelectionModel::selection
|
||||
\internal
|
||||
*/
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
\property QItemSelectionModel::model
|
||||
\internal
|
||||
*/
|
||||
|
||||
/*!
|
||||
\since 5.5
|
||||
|
||||
|
@ -2725,7 +2725,7 @@ bool QSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &
|
||||
The default implementation returns \c true if the value held by the relevant item
|
||||
matches the filter string, wildcard string or regular expression.
|
||||
|
||||
\note By default, the Qt::DisplayRole is used to determine if the row
|
||||
\note By default, the Qt::DisplayRole is used to determine if the column
|
||||
should be accepted or not. This can be changed by setting the \l
|
||||
filterRole property.
|
||||
|
||||
|
@ -441,7 +441,7 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
|
||||
static const char *const empty = "";
|
||||
if (argc == 0 || argv == 0) {
|
||||
argc = 0;
|
||||
argv = (char **)∅
|
||||
argv = const_cast<char **>(&empty);
|
||||
}
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
if (!isArgvModified(argc, argv)) {
|
||||
|
@ -1532,6 +1532,29 @@ bool QMetaObject::invokeMethod(QObject *obj,
|
||||
ignores return values.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QMetaObject::Connection::Connection(const Connection &other)
|
||||
|
||||
Constructs a copy of \a other.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QMetaObject::Connection::Connection &operator=(const Connection &other)
|
||||
|
||||
Assigns \a other to this connection and returns a reference to this connection.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QMetaObject::Connection &QMetaObject::Connection::operator=(Connection &&other)
|
||||
|
||||
Move-assigns \a other to this object.
|
||||
*/
|
||||
/*!
|
||||
\fn QMetaObject::Connection::Connection(Connection &&o)
|
||||
|
||||
Move-constructs a Connection instance, making it point to the same object that \a o was pointing to.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QMetaMethod
|
||||
\inmodule QtCore
|
||||
|
@ -420,6 +420,16 @@ struct DefinedTypesFilter {
|
||||
\sa QMetaType::create()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void *QMetaType::construct(int type, const void *copy)
|
||||
\deprecated
|
||||
|
||||
Constructs a value of the given type which is a copy of \a copy.
|
||||
The default value for \a copy is 0.
|
||||
|
||||
Deprecated, use the static function QMetaType::create(int type,
|
||||
const void *copy) instead.
|
||||
*/
|
||||
/*!
|
||||
\fn void *QMetaType::construct(void *where, const void *copy = 0) const
|
||||
\since 5.0
|
||||
@ -1834,7 +1844,8 @@ public:
|
||||
void delegate(const T *where) { DestructorImpl<T>::Destruct(m_type, const_cast<T*>(where)); }
|
||||
void delegate(const void *) {}
|
||||
void delegate(const QMetaTypeSwitcher::UnknownType*) {}
|
||||
void delegate(const QMetaTypeSwitcher::NotBuiltinType *where) { customTypeDestructor(m_type, (void*)where); }
|
||||
void delegate(const QMetaTypeSwitcher::NotBuiltinType *where)
|
||||
{ customTypeDestructor(m_type, const_cast<void *>(static_cast<const void *>(where))); }
|
||||
|
||||
private:
|
||||
static void customTypeDestructor(const int type, void *where)
|
||||
|
@ -4103,7 +4103,7 @@ QDebug operator<<(QDebug dbg, const QObject *o)
|
||||
QDebugStateSaver saver(dbg);
|
||||
if (!o)
|
||||
return dbg << "QObject(0x0)";
|
||||
dbg.nospace() << o->metaObject()->className() << '(' << (void *)o;
|
||||
dbg.nospace() << o->metaObject()->className() << '(' << (const void *)o;
|
||||
if (!o->objectName().isEmpty())
|
||||
dbg << ", name = " << o->objectName();
|
||||
dbg << ')';
|
||||
@ -4908,8 +4908,15 @@ QMetaObject::Connection& QMetaObject::Connection::operator=(const QMetaObject::C
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*!
|
||||
Creates a Connection instance.
|
||||
*/
|
||||
|
||||
QMetaObject::Connection::Connection() : d_ptr(0) {}
|
||||
|
||||
/*!
|
||||
Destructor for QMetaObject::Connection.
|
||||
*/
|
||||
QMetaObject::Connection::~Connection()
|
||||
{
|
||||
if (d_ptr)
|
||||
|
@ -722,7 +722,7 @@ static QString find_translation(const QLocale & locale,
|
||||
|
||||
For example, an application running in the \a locale with the following
|
||||
\l{QLocale::uiLanguages()}{ui languages} - "es", "fr-CA", "de" might call
|
||||
load(QLocale::system(), "foo", ".", "/opt/foolib", ".qm"). load() would
|
||||
load(QLocale(), "foo", ".", "/opt/foolib", ".qm"). load() would
|
||||
replace '-' (dash) with '_' (underscore) in the ui language and then try to
|
||||
open the first existing readable file from this list:
|
||||
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
raw += strlen("QTMETADATA ");
|
||||
// the size of the embedded JSON object can be found 8 bytes into the data (see qjson_p.h),
|
||||
// but doesn't include the size of the header (8 bytes)
|
||||
QByteArray json(raw, qFromLittleEndian<uint>(*(uint *)(raw + 8)) + 8);
|
||||
QByteArray json(raw, qFromLittleEndian<uint>(*(const uint *)(raw + 8)) + 8);
|
||||
return QJsonDocument::fromBinaryData(json);
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin);
|
||||
# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS, PLUGINCLASSNAME) \
|
||||
static QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance_##PLUGINCLASSNAME() \
|
||||
Q_PLUGIN_INSTANCE(PLUGINCLASS) \
|
||||
static const char *qt_plugin_query_metadata_##PLUGINCLASSNAME() { return (const char *)qt_pluginMetaData; } \
|
||||
static const char *qt_plugin_query_metadata_##PLUGINCLASSNAME() { return reinterpret_cast<const char *>(qt_pluginMetaData); } \
|
||||
const QT_PREPEND_NAMESPACE(QStaticPlugin) qt_static_plugin_##PLUGINCLASSNAME() { \
|
||||
QT_PREPEND_NAMESPACE(QStaticPlugin) plugin = { qt_plugin_instance_##PLUGINCLASSNAME, qt_plugin_query_metadata_##PLUGINCLASSNAME}; \
|
||||
return plugin; \
|
||||
@ -123,7 +123,7 @@ void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin);
|
||||
# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS, PLUGINCLASSNAME) \
|
||||
Q_EXTERN_C Q_DECL_EXPORT \
|
||||
const char *qt_plugin_query_metadata() \
|
||||
{ return (const char *)qt_pluginMetaData; } \
|
||||
{ return reinterpret_cast<const char *>(qt_pluginMetaData); } \
|
||||
Q_EXTERN_C Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance() \
|
||||
Q_PLUGIN_INSTANCE(PLUGINCLASS)
|
||||
|
||||
|
@ -543,7 +543,7 @@ QUuid QUuid::fromRfc4122(const QByteArray &bytes)
|
||||
QString QUuid::toString() const
|
||||
{
|
||||
QString result(38, Qt::Uninitialized);
|
||||
ushort *data = (ushort *)result.unicode();
|
||||
ushort *data = (ushort *)result.data();
|
||||
|
||||
_q_uuidToHex(data, data1, data2, data3, data4);
|
||||
|
||||
|
@ -136,11 +136,27 @@ void QReadWriteLock::lockForRead()
|
||||
{
|
||||
QMutexLocker lock(&d->mutex);
|
||||
|
||||
Qt::HANDLE self = 0;
|
||||
if (d->recursive) {
|
||||
self = QThread::currentThreadId();
|
||||
|
||||
QHash<Qt::HANDLE, int>::iterator it = d->currentReaders.find(self);
|
||||
if (it != d->currentReaders.end()) {
|
||||
++it.value();
|
||||
++d->accessCount;
|
||||
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::lockForRead()",
|
||||
"Overflow in lock counter");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
while (d->accessCount < 0 || d->waitingWriters) {
|
||||
++d->waitingReaders;
|
||||
d->readerWait.wait(&d->mutex);
|
||||
--d->waitingReaders;
|
||||
}
|
||||
if (d->recursive)
|
||||
d->currentReaders.insert(self, 1);
|
||||
|
||||
++d->accessCount;
|
||||
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::lockForRead()", "Overflow in lock counter");
|
||||
@ -166,8 +182,24 @@ bool QReadWriteLock::tryLockForRead()
|
||||
{
|
||||
QMutexLocker lock(&d->mutex);
|
||||
|
||||
Qt::HANDLE self = 0;
|
||||
if (d->recursive) {
|
||||
self = QThread::currentThreadId();
|
||||
|
||||
QHash<Qt::HANDLE, int>::iterator it = d->currentReaders.find(self);
|
||||
if (it != d->currentReaders.end()) {
|
||||
++it.value();
|
||||
++d->accessCount;
|
||||
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::tryLockForRead()",
|
||||
"Overflow in lock counter");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (d->accessCount < 0)
|
||||
return false;
|
||||
if (d->recursive)
|
||||
d->currentReaders.insert(self, 1);
|
||||
|
||||
++d->accessCount;
|
||||
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::tryLockForRead()", "Overflow in lock counter");
|
||||
@ -198,6 +230,20 @@ bool QReadWriteLock::tryLockForRead(int timeout)
|
||||
{
|
||||
QMutexLocker lock(&d->mutex);
|
||||
|
||||
Qt::HANDLE self = 0;
|
||||
if (d->recursive) {
|
||||
self = QThread::currentThreadId();
|
||||
|
||||
QHash<Qt::HANDLE, int>::iterator it = d->currentReaders.find(self);
|
||||
if (it != d->currentReaders.end()) {
|
||||
++it.value();
|
||||
++d->accessCount;
|
||||
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::tryLockForRead()",
|
||||
"Overflow in lock counter");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
while (d->accessCount < 0 || d->waitingWriters) {
|
||||
++d->waitingReaders;
|
||||
bool success = d->readerWait.wait(&d->mutex, timeout < 0 ? ULONG_MAX : ulong(timeout));
|
||||
@ -205,6 +251,8 @@ bool QReadWriteLock::tryLockForRead(int timeout)
|
||||
if (!success)
|
||||
return false;
|
||||
}
|
||||
if (d->recursive)
|
||||
d->currentReaders.insert(self, 1);
|
||||
|
||||
++d->accessCount;
|
||||
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::tryLockForRead()", "Overflow in lock counter");
|
||||
@ -364,6 +412,15 @@ void QReadWriteLock::unlock()
|
||||
bool unlocked = false;
|
||||
if (d->accessCount > 0) {
|
||||
// releasing a read lock
|
||||
if (d->recursive) {
|
||||
Qt::HANDLE self = QThread::currentThreadId();
|
||||
QHash<Qt::HANDLE, int>::iterator it = d->currentReaders.find(self);
|
||||
if (it != d->currentReaders.end()) {
|
||||
if (--it.value() <= 0)
|
||||
d->currentReaders.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
unlocked = --d->accessCount == 0;
|
||||
} else if (d->accessCount < 0 && ++d->accessCount == 0) {
|
||||
// released a write lock
|
||||
|
@ -69,6 +69,7 @@ struct QReadWriteLockPrivate
|
||||
|
||||
bool recursive;
|
||||
Qt::HANDLE currentWriter;
|
||||
QHash<Qt::HANDLE, int> currentReaders;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -511,7 +511,7 @@ QByteArray qCompress(const uchar* data, int nbytes, int compressionLevel)
|
||||
int res;
|
||||
do {
|
||||
bazip.resize(len + 4);
|
||||
res = ::compress2((uchar*)bazip.data()+4, &len, (uchar*)data, nbytes, compressionLevel);
|
||||
res = ::compress2((uchar*)bazip.data()+4, &len, data, nbytes, compressionLevel);
|
||||
|
||||
switch (res) {
|
||||
case Z_OK:
|
||||
@ -602,7 +602,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
|
||||
d->size = 0; // Shut up valgrind "uninitialized variable" warning
|
||||
|
||||
int res = ::uncompress((uchar*)d->data(), &len,
|
||||
(uchar*)data+4, nbytes-4);
|
||||
data+4, nbytes-4);
|
||||
|
||||
switch (res) {
|
||||
case Z_OK:
|
||||
@ -2186,9 +2186,9 @@ QByteArray &QByteArray::replace(const char *before, int bsize, const char *after
|
||||
}
|
||||
|
||||
if (a != after)
|
||||
::free((char *)a);
|
||||
::free(const_cast<char *>(a));
|
||||
if (b != before)
|
||||
::free((char *)b);
|
||||
::free(const_cast<char *>(b));
|
||||
|
||||
|
||||
return *this;
|
||||
|
@ -87,7 +87,7 @@ QCollator::QCollator(const QCollator &other)
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor for QCollator.
|
||||
Destroys the collator.
|
||||
*/
|
||||
QCollator::~QCollator()
|
||||
{
|
||||
|
@ -109,7 +109,7 @@
|
||||
\endcode
|
||||
|
||||
Swap overloads are found in namespace \c std as well as via
|
||||
argument-dependent lookup (ADL) in \c{T}'s namespace.
|
||||
argument-dependent lookup (ADL) in the namespace of \c{T} .
|
||||
*/
|
||||
|
||||
/*!
|
||||
@ -136,8 +136,7 @@
|
||||
\fn QPair::QPair(QPair<TT1, TT2> &&p)
|
||||
\since 5.2
|
||||
|
||||
Move-constructs a QPair instance, making it point to the same object that
|
||||
\a p was pointing to.
|
||||
Move-constructs a QPair instance, making it point to the same object that \a p was pointing to.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -36,6 +36,10 @@
|
||||
#include <QByteArray>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
# include "../testlib/3rdparty/valgrind_p.h"
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
# if defined(Q_OS_WINCE)
|
||||
# include <qt_windows.h>
|
||||
@ -256,8 +260,12 @@ static inline uint detectProcessorFeatures()
|
||||
|
||||
uint features = 0;
|
||||
int cpuidLevel = maxBasicCpuidSupported();
|
||||
#if Q_PROCESSOR_X86 < 5
|
||||
if (cpuidLevel < 1)
|
||||
return 0;
|
||||
#else
|
||||
Q_ASSERT(cpuidLevel >= 1);
|
||||
#endif
|
||||
|
||||
uint cpuid01ECX = 0, cpuid01EDX = 0;
|
||||
cpuidFeatures01(cpuid01ECX, cpuid01EDX);
|
||||
@ -497,8 +505,7 @@ static const int features_indices[] = {
|
||||
static const int features_count = (sizeof features_indices - 1) / (sizeof features_indices[0]);
|
||||
|
||||
// record what CPU features were enabled by default in this Qt build
|
||||
// don't define for HLE, since the HLE prefix can be run on older CPUs
|
||||
static const uint minFeature = qCompilerCpuFeatures & ~HLE;
|
||||
static const uint minFeature = qCompilerCpuFeatures;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if defined(Q_CC_GNU)
|
||||
@ -554,7 +561,12 @@ void qDetectCpuFeatures()
|
||||
}
|
||||
}
|
||||
|
||||
if (minFeature != 0 && (f & minFeature) != minFeature) {
|
||||
#ifdef RUNNING_ON_VALGRIND
|
||||
bool runningOnValgrind = RUNNING_ON_VALGRIND;
|
||||
#else
|
||||
bool runningOnValgrind = false;
|
||||
#endif
|
||||
if (!runningOnValgrind && (minFeature != 0 && (f & minFeature) != minFeature)) {
|
||||
uint missing = minFeature & ~f;
|
||||
fprintf(stderr, "Incompatible processor. This Qt build requires the following features:\n ");
|
||||
for (int i = 0; i < features_count; ++i) {
|
||||
|
@ -265,9 +265,6 @@ static const uint qCompilerCpuFeatures = 0
|
||||
#if defined __RTM__
|
||||
| RTM
|
||||
#endif
|
||||
#if defined __HLE__
|
||||
| HLE
|
||||
#endif
|
||||
#if defined __AVX2__
|
||||
| AVX2
|
||||
#endif
|
||||
|
@ -215,7 +215,7 @@ void qt_from_latin1(ushort *dst, const char *str, size_t size)
|
||||
|
||||
// we're going to read str[offset..offset+15] (16 bytes)
|
||||
for ( ; str + offset + 15 < e; offset += 16) {
|
||||
const __m128i chunk = _mm_loadu_si128((__m128i*)(str + offset)); // load
|
||||
const __m128i chunk = _mm_loadu_si128((const __m128i*)(str + offset)); // load
|
||||
#ifdef __AVX2__
|
||||
// zero extend to an YMM register
|
||||
const __m256i extended = _mm256_cvtepu8_epi16(chunk);
|
||||
@ -316,10 +316,10 @@ static void qt_to_latin1(uchar *dst, const ushort *src, int length)
|
||||
|
||||
// we're going to write to dst[offset..offset+15] (16 bytes)
|
||||
for ( ; dst + offset + 15 < e; offset += 16) {
|
||||
__m128i chunk1 = _mm_loadu_si128((__m128i*)(src + offset)); // load
|
||||
__m128i chunk1 = _mm_loadu_si128((const __m128i*)(src + offset)); // load
|
||||
chunk1 = mergeQuestionMarks(chunk1);
|
||||
|
||||
__m128i chunk2 = _mm_loadu_si128((__m128i*)(src + offset + 8)); // load
|
||||
__m128i chunk2 = _mm_loadu_si128((const __m128i*)(src + offset + 8)); // load
|
||||
chunk2 = mergeQuestionMarks(chunk2);
|
||||
|
||||
// pack the two vector to 16 x 8bits elements
|
||||
@ -458,8 +458,8 @@ static int ucstrncmp(const QChar *a, const QChar *b, int l)
|
||||
|
||||
// we're going to read ptr[0..15] (16 bytes)
|
||||
for ( ; ptr + 15 < reinterpret_cast<const char *>(a); ptr += 16) {
|
||||
__m128i a_data = _mm_loadu_si128((__m128i*)ptr);
|
||||
__m128i b_data = _mm_loadu_si128((__m128i*)(ptr + distance));
|
||||
__m128i a_data = _mm_loadu_si128((const __m128i*)ptr);
|
||||
__m128i b_data = _mm_loadu_si128((const __m128i*)(ptr + distance));
|
||||
__m128i result = _mm_cmpeq_epi16(a_data, b_data);
|
||||
uint mask = ~_mm_movemask_epi8(result);
|
||||
if (ushort(mask)) {
|
||||
@ -541,14 +541,14 @@ static int ucstrncmp(const QChar *a, const uchar *c, int l)
|
||||
for ( ; uc + offset + 15 < e; offset += 16) {
|
||||
// similar to fromLatin1_helper:
|
||||
// load 16 bytes of Latin 1 data
|
||||
__m128i chunk = _mm_loadu_si128((__m128i*)(c + offset));
|
||||
__m128i chunk = _mm_loadu_si128((const __m128i*)(c + offset));
|
||||
|
||||
# ifdef __AVX2__
|
||||
// expand Latin 1 data via zero extension
|
||||
__m256i ldata = _mm256_cvtepu8_epi16(chunk);
|
||||
|
||||
// load UTF-16 data and compare
|
||||
__m256i ucdata = _mm256_loadu_si256((__m256i*)(uc + offset));
|
||||
__m256i ucdata = _mm256_loadu_si256((const __m256i*)(uc + offset));
|
||||
__m256i result = _mm256_cmpeq_epi16(ldata, ucdata);
|
||||
|
||||
uint mask = ~_mm256_movemask_epi8(result);
|
||||
@ -558,8 +558,8 @@ static int ucstrncmp(const QChar *a, const uchar *c, int l)
|
||||
__m128i secondHalf = _mm_unpackhi_epi8(chunk, nullmask);
|
||||
|
||||
// load UTF-16 data and compare
|
||||
__m128i ucdata1 = _mm_loadu_si128((__m128i*)(uc + offset));
|
||||
__m128i ucdata2 = _mm_loadu_si128((__m128i*)(uc + offset + 8));
|
||||
__m128i ucdata1 = _mm_loadu_si128((const __m128i*)(uc + offset));
|
||||
__m128i ucdata2 = _mm_loadu_si128((const __m128i*)(uc + offset + 8));
|
||||
__m128i result1 = _mm_cmpeq_epi16(firstHalf, ucdata1);
|
||||
__m128i result2 = _mm_cmpeq_epi16(secondHalf, ucdata2);
|
||||
|
||||
@ -577,10 +577,10 @@ static int ucstrncmp(const QChar *a, const uchar *c, int l)
|
||||
// we'll read uc[offset..offset+7] (16 bytes) and c[offset..offset+7] (8 bytes)
|
||||
if (uc + offset + 7 < e) {
|
||||
// same, but we're using an 8-byte load
|
||||
__m128i chunk = _mm_cvtsi64_si128(*(long long *)(c + offset));
|
||||
__m128i chunk = _mm_cvtsi64_si128(*(const long long *)(c + offset));
|
||||
__m128i secondHalf = _mm_unpacklo_epi8(chunk, nullmask);
|
||||
|
||||
__m128i ucdata = _mm_loadu_si128((__m128i*)(uc + offset));
|
||||
__m128i ucdata = _mm_loadu_si128((const __m128i*)(uc + offset));
|
||||
__m128i result = _mm_cmpeq_epi16(secondHalf, ucdata);
|
||||
uint mask = ~_mm_movemask_epi8(result);
|
||||
if (ushort(mask)) {
|
||||
@ -672,7 +672,7 @@ static int findChar(const QChar *str, int len, QChar ch, int from,
|
||||
|
||||
// we're going to read n[0..7] (16 bytes)
|
||||
for (const ushort *next = n + 8; next <= e; n = next, next += 8) {
|
||||
__m128i data = _mm_loadu_si128((__m128i*)n);
|
||||
__m128i data = _mm_loadu_si128((const __m128i*)n);
|
||||
__m128i result = _mm_cmpeq_epi16(data, mch);
|
||||
uint mask = _mm_movemask_epi8(result);
|
||||
if (ushort(mask)) {
|
||||
@ -2744,7 +2744,7 @@ bool operator<(const QString &s1, const QString &s2)
|
||||
*/
|
||||
bool QString::operator<(QLatin1String other) const
|
||||
{
|
||||
const uchar *c = (uchar *) other.latin1();
|
||||
const uchar *c = (const uchar *) other.latin1();
|
||||
if (!c || *c == 0)
|
||||
return false;
|
||||
|
||||
@ -2849,7 +2849,7 @@ bool QString::operator<(QLatin1String other) const
|
||||
*/
|
||||
bool QString::operator>(QLatin1String other) const
|
||||
{
|
||||
const uchar *c = (uchar *) other.latin1();
|
||||
const uchar *c = (const uchar *) other.latin1();
|
||||
if (!c || *c == '\0')
|
||||
return !isEmpty();
|
||||
|
||||
@ -5392,7 +5392,7 @@ int QString::compare_helper(const QChar *data1, int length1, QLatin1String s2,
|
||||
{
|
||||
const ushort *uc = reinterpret_cast<const ushort *>(data1);
|
||||
const ushort *uce = uc + length1;
|
||||
const uchar *c = (uchar *)s2.latin1();
|
||||
const uchar *c = (const uchar *)s2.latin1();
|
||||
|
||||
if (!c)
|
||||
return length1;
|
||||
|
@ -389,12 +389,19 @@ static int parsePosixOffset(const QByteArray &timeRule)
|
||||
// Format "[+|-]hh[:mm[:ss]]"
|
||||
QList<QByteArray> parts = timeRule.split(':');
|
||||
int count = parts.count();
|
||||
if (count == 3)
|
||||
return (parts.at(0).toInt() * -60 * 60) + (parts.at(1).toInt() * 60) + parts.at(2).toInt();
|
||||
else if (count == 2)
|
||||
return (parts.at(0).toInt() * -60 * 60) + (parts.at(1).toInt() * 60);
|
||||
else if (count == 1)
|
||||
return (parts.at(0).toInt() * -60 * 60);
|
||||
if (count == 3) {
|
||||
int hour = parts.at(0).toInt();
|
||||
int sign = hour >= 0 ? -1 : 1;
|
||||
return sign * ((qAbs(hour) * 60 * 60) + (parts.at(1).toInt() * 60) + parts.at(2).toInt());
|
||||
} else if (count == 2) {
|
||||
int hour = parts.at(0).toInt();
|
||||
int sign = hour >= 0 ? -1 : 1;
|
||||
return sign * ((qAbs(hour) * 60 * 60) + (parts.at(1).toInt() * 60));
|
||||
} else if (count == 1) {
|
||||
int hour = parts.at(0).toInt();
|
||||
int sign = hour >= 0 ? -1 : 1;
|
||||
return sign * (qAbs(hour) * 60 * 60);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2395,6 +2395,12 @@ QXmlStreamAttribute& QXmlStreamAttribute::operator=(const QXmlStreamAttribute &o
|
||||
\ingroup xml-tools
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QXmlStreamAttributes::QXmlStreamAttributes()
|
||||
|
||||
A constructor for QXmlStreamAttributes.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\typedef QXmlStreamNotationDeclarations
|
||||
\relates QXmlStreamNotationDeclaration
|
||||
|
@ -174,7 +174,7 @@ QDBusUnixFileDescriptor &QDBusUnixFileDescriptor::operator=(const QDBusUnixFileD
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QDBusUnixFileDescriptor &operator=(QDBusUnixFileDescriptor &&other)
|
||||
\fn QDBusUnixFileDescriptor &QDBusUnixFileDescriptor::operator=(QDBusUnixFileDescriptor &&other)
|
||||
|
||||
Move-assigns \a other to this QDBusUnixFileDescriptor.
|
||||
*/
|
||||
|
@ -1387,10 +1387,18 @@ QAccessible::Id QAccessibleEvent::uniqueId() const
|
||||
*/
|
||||
|
||||
/*! \fn QAccessibleValueChangeEvent::QAccessibleValueChangeEvent(QObject *object, const QVariant &value)
|
||||
|
||||
Constructs a new QAccessibleValueChangeEvent for \a object.
|
||||
The event contains the new \a value.
|
||||
*/
|
||||
/*! \fn QAccessibleValueChangeEvent::QAccessibleValueChangeEvent(QAccessibleInterface *iface, const QVariant &val)
|
||||
|
||||
Constructs a new QAccessibleValueChangeEvent for \a iface.
|
||||
The event contains the new value \a val.
|
||||
*/
|
||||
|
||||
/*! \fn void QAccessibleValueChangeEvent::setValue(const QVariant & value)
|
||||
|
||||
Sets the new \a value for this event.
|
||||
*/
|
||||
/*!
|
||||
@ -1419,11 +1427,13 @@ QAccessibleValueChangeEvent::~QAccessibleValueChangeEvent()
|
||||
\sa QAccessibleInterface::state()
|
||||
*/
|
||||
/*! \fn QAccessibleStateChangeEvent::QAccessibleStateChangeEvent(QObject *object, QAccessible::State state)
|
||||
|
||||
Constructs a new QAccessibleStateChangeEvent for \a object.
|
||||
The difference to the object's previous state is in \a state.
|
||||
*/
|
||||
/*!
|
||||
\fn QAccessibleStateChangeEvent::QAccessibleStateChangeEvent(QAccessibleInterface *iface, QAccessible::State state)
|
||||
|
||||
Constructs a new QAccessibleStateChangeEvent.
|
||||
\a iface is the interface associated with the event
|
||||
\a state is the state of the accessible object.
|
||||
@ -1432,8 +1442,8 @@ QAccessibleValueChangeEvent::~QAccessibleValueChangeEvent()
|
||||
\fn QAccessible::State QAccessibleStateChangeEvent::changedStates() const
|
||||
\brief Returns the states that have been changed.
|
||||
|
||||
Be aware that the returned states are the ones that have changed,
|
||||
to find out about the state of an object, use QAccessibleInterface::state().
|
||||
Keep in mind that the returned states are the ones that have changed.
|
||||
To find out about the state of an object, use QAccessibleInterface::state().
|
||||
|
||||
For example, if an object used to have the focus but loses it,
|
||||
the object's state will have focused set to \c false. This event on the
|
||||
@ -1462,7 +1472,7 @@ QAccessibleStateChangeEvent::~QAccessibleStateChangeEvent()
|
||||
*/
|
||||
|
||||
/*! \enum QAccessibleTableModelChangeEvent::ModelChangeType
|
||||
This enum describes different types of changes in the table model.
|
||||
This enum describes the different types of changes in the table model.
|
||||
\value ModelReset The model has been reset, all previous knowledge about the model is now invalid.
|
||||
\value DataChanged No cells have been added or removed, but the data of the specified cell range is invalid.
|
||||
\value RowsInserted New rows have been inserted.
|
||||
@ -1471,38 +1481,55 @@ QAccessibleStateChangeEvent::~QAccessibleStateChangeEvent()
|
||||
\value ColumnsRemoved Columns have been removed.
|
||||
*/
|
||||
/*! \fn QAccessibleTableModelChangeEvent::QAccessibleTableModelChangeEvent(QObject *object, ModelChangeType changeType)
|
||||
|
||||
Constructs a new QAccessibleTableModelChangeEvent for \a object of with \a changeType.
|
||||
*/
|
||||
/*! \fn int QAccessibleTableModelChangeEvent::firstColumn() const
|
||||
|
||||
Returns the first changed column.
|
||||
*/
|
||||
/*! \fn int QAccessibleTableModelChangeEvent::firstRow() const
|
||||
|
||||
Returns the first changed row.
|
||||
*/
|
||||
/*! \fn int QAccessibleTableModelChangeEvent::lastColumn() const
|
||||
|
||||
Returns the last changed column.
|
||||
*/
|
||||
/*! \fn int QAccessibleTableModelChangeEvent::lastRow() const
|
||||
|
||||
Returns the last changed row.
|
||||
*/
|
||||
/*! \fn QAccessibleTableModelChangeEvent::ModelChangeType QAccessibleTableModelChangeEvent::modelChangeType() const
|
||||
|
||||
Returns the type of change.
|
||||
*/
|
||||
/*! \fn void QAccessibleTableModelChangeEvent::setFirstColumn(int column)
|
||||
|
||||
Sets the first changed \a column.
|
||||
*/
|
||||
/*! \fn void QAccessibleTableModelChangeEvent::setFirstRow(int row)
|
||||
|
||||
Sets the first changed \a row.
|
||||
*/
|
||||
/*! \fn void QAccessibleTableModelChangeEvent::setLastColumn(int column)
|
||||
|
||||
Sets the last changed \a column.
|
||||
*/
|
||||
/*! \fn void QAccessibleTableModelChangeEvent::setLastRow(int row)
|
||||
|
||||
Sets the last changed \a row.
|
||||
*/
|
||||
/*! \fn void QAccessibleTableModelChangeEvent::setModelChangeType(ModelChangeType changeType)
|
||||
|
||||
Sets the type of change to \a changeType.
|
||||
*/
|
||||
/*!
|
||||
\fn QAccessibleTableModelChangeEvent::QAccessibleTableModelChangeEvent(QAccessibleInterface *iface, ModelChangeType changeType)
|
||||
|
||||
Constructs a new QAccessibleTableModelChangeEvent for interface \a iface with a model
|
||||
change type \a changeType.
|
||||
*/
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
@ -1510,8 +1537,6 @@ QAccessibleTableModelChangeEvent::~QAccessibleTableModelChangeEvent()
|
||||
{
|
||||
// must be empty until ### Qt 6
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\class QAccessibleTextCursorEvent
|
||||
\ingroup accessibility
|
||||
@ -1521,14 +1546,17 @@ QAccessibleTableModelChangeEvent::~QAccessibleTableModelChangeEvent()
|
||||
|
||||
This class is used with \l QAccessible::updateAccessibility().
|
||||
*/
|
||||
/*! \fn QAccessibleTextCursorEvent::QAccessibleTextCursorEvent(QObject *object, int cursorPosition)
|
||||
/*! \fn QAccessibleTextCursorEvent::QAccessibleTextCursorEvent(QObject *object, int cursorPos)
|
||||
|
||||
Create a new QAccessibleTextCursorEvent for \a object.
|
||||
The \a cursorPosition is the new cursor position.
|
||||
The \a cursorPos is the new cursor position.
|
||||
*/
|
||||
/*! \fn int QAccessibleTextCursorEvent::cursorPosition() const
|
||||
|
||||
Returns the cursor position.
|
||||
*/
|
||||
/*! \fn void QAccessibleTextCursorEvent::setCursorPosition(int position)
|
||||
|
||||
Sets the cursor \a position for this event.
|
||||
*/
|
||||
/*!
|
||||
@ -1540,6 +1568,13 @@ QAccessibleTextCursorEvent::~QAccessibleTextCursorEvent()
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\fn QAccessibleTextCursorEvent(QAccessibleInterface *iface, int cursorPos)
|
||||
|
||||
Create a new QAccessibleTextCursorEvent for \a iface,
|
||||
The \a cursorPos is the new cursor position.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QAccessibleTextInsertEvent
|
||||
\ingroup accessibility
|
||||
@ -1550,6 +1585,7 @@ QAccessibleTextCursorEvent::~QAccessibleTextCursorEvent()
|
||||
This class is used with \l QAccessible::updateAccessibility().
|
||||
*/
|
||||
/*! \fn QAccessibleTextInsertEvent::QAccessibleTextInsertEvent(QObject *object, int position, const QString &text)
|
||||
|
||||
Constructs a new QAccessibleTextInsertEvent event for \a object.
|
||||
The \a text has been inserted at \a position.
|
||||
By default, it is assumed that the cursor has moved to the end
|
||||
@ -1557,9 +1593,11 @@ QAccessibleTextCursorEvent::~QAccessibleTextCursorEvent()
|
||||
set it with \l QAccessibleTextCursorEvent::setCursorPosition() for this event.
|
||||
*/
|
||||
/*! \fn int QAccessibleTextInsertEvent::changePosition() const
|
||||
|
||||
Returns the position where the text was inserted.
|
||||
*/
|
||||
/*! \fn QString QAccessibleTextInsertEvent::textInserted() const
|
||||
|
||||
Returns the text that has been inserted.
|
||||
*/
|
||||
/*!
|
||||
@ -1581,17 +1619,28 @@ QAccessibleTextInsertEvent::~QAccessibleTextInsertEvent()
|
||||
This class is used with \l QAccessible::updateAccessibility().
|
||||
*/
|
||||
/*! \fn QAccessibleTextRemoveEvent::QAccessibleTextRemoveEvent(QObject *object, int position, const QString &text)
|
||||
|
||||
Constructs a new QAccessibleTextRemoveEvent event for \a object.
|
||||
The \a text has been removed at \a position.
|
||||
By default it is assumed that the cursor has moved to \a position.
|
||||
If that is not the case, one needs to manually
|
||||
set it with \l QAccessibleTextCursorEvent::setCursorPosition() for this event.
|
||||
*/
|
||||
/*! \fn QAccessibleTextRemoveEvent::QAccessibleTextRemoveEvent(QAccessibleInterface *iface, int position, const QString &text)
|
||||
|
||||
Constructs a new QAccessibleTextRemoveEvent event for \a iface.
|
||||
The \a text has been removed at \a position.
|
||||
By default it is assumed that the cursor has moved to \a position.
|
||||
If that is not the case, one needs to manually
|
||||
set it with \l QAccessibleTextCursorEvent::setCursorPosition() for this event.
|
||||
*/
|
||||
|
||||
/*! \fn int QAccessibleTextRemoveEvent::changePosition() const
|
||||
|
||||
Returns the position where the text was removed.
|
||||
*/
|
||||
/*! \fn QString QAccessibleTextRemoveEvent::textRemoved() const
|
||||
|
||||
Returns the text that has been removed.
|
||||
*/
|
||||
/*!
|
||||
@ -1602,6 +1651,31 @@ QAccessibleTextRemoveEvent::~QAccessibleTextRemoveEvent()
|
||||
// must be empty until ### Qt 6
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QAccessibleTextSelectionEvent::QAccessibleTextSelectionEvent(QAccessibleInterface *iface, int start, int end)
|
||||
|
||||
Constructs a new QAccessibleTextSelectionEvent for \a iface. The new selection this
|
||||
event notifies about is from position \a start to \a end.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QAccessibleTextInsertEvent::QAccessibleTextInsertEvent(QAccessibleInterface *iface, int position, const QString &text)
|
||||
|
||||
Constructs a new QAccessibleTextInsertEvent event for \a iface. The text has been inserted at
|
||||
\a position.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn inline QAccessibleTextUpdateEvent::QAccessibleTextUpdateEvent(QAccessibleInterface *iface, int position, const QString &oldText,
|
||||
const QString &text)
|
||||
|
||||
Constructs a new QAccessibleTextUpdateEvent for \a iface. The text change takes place at
|
||||
\a position where the \a oldText was removed and \a text inserted instead.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
\class QAccessibleTextUpdateEvent
|
||||
\ingroup accessibility
|
||||
@ -1615,16 +1689,20 @@ QAccessibleTextRemoveEvent::~QAccessibleTextRemoveEvent()
|
||||
This class is used with \l QAccessible::updateAccessibility().
|
||||
*/
|
||||
/*! \fn QAccessibleTextUpdateEvent::QAccessibleTextUpdateEvent(QObject *object, int position, const QString &oldText, const QString &text)
|
||||
|
||||
Constructs a new QAccessibleTextUpdateEvent for \a object.
|
||||
The text change takes place at \a position where the \a oldText was removed and \a text inserted instead.
|
||||
*/
|
||||
/*! \fn int QAccessibleTextUpdateEvent::changePosition() const
|
||||
|
||||
Returns where the change took place.
|
||||
*/
|
||||
/*! \fn QString QAccessibleTextUpdateEvent::textInserted() const
|
||||
|
||||
Returns the inserted text.
|
||||
*/
|
||||
/*! \fn QString QAccessibleTextUpdateEvent::textRemoved() const
|
||||
|
||||
Returns the removed text.
|
||||
*/
|
||||
/*!
|
||||
@ -1646,16 +1724,20 @@ QAccessibleTextUpdateEvent::~QAccessibleTextUpdateEvent()
|
||||
This class is used with \l QAccessible::updateAccessibility().
|
||||
*/
|
||||
/*! \fn QAccessibleTextSelectionEvent::QAccessibleTextSelectionEvent(QObject *object, int start, int end)
|
||||
|
||||
Constructs a new QAccessibleTextSelectionEvent for \a object.
|
||||
The new selection this event notifies about is from position \a start to \a end.
|
||||
*/
|
||||
/*! \fn int QAccessibleTextSelectionEvent::selectionEnd() const
|
||||
|
||||
Returns the position of the last selected character.
|
||||
*/
|
||||
/*! \fn int QAccessibleTextSelectionEvent::selectionStart() const
|
||||
|
||||
Returns the position of the first selected character.
|
||||
*/
|
||||
/*! \fn void QAccessibleTextSelectionEvent::setSelection(int start, int end)
|
||||
|
||||
Sets the selection for this event from position \a start to \a end.
|
||||
*/
|
||||
/*!
|
||||
@ -1903,6 +1985,7 @@ QDebug operator<<(QDebug d, const QAccessibleEvent &ev)
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
||||
Destroys the QAccessibleTextInterface.
|
||||
*/
|
||||
QAccessibleTextInterface::~QAccessibleTextInterface()
|
||||
@ -1912,6 +1995,7 @@ QAccessibleTextInterface::~QAccessibleTextInterface()
|
||||
|
||||
/*!
|
||||
\fn void QAccessibleTextInterface::addSelection(int startOffset, int endOffset)
|
||||
|
||||
Select the text from \a startOffset to \a endOffset.
|
||||
The \a startOffset is the first character that will be selected.
|
||||
The \a endOffset is the first character that will not be selected.
|
||||
@ -1924,6 +2008,7 @@ QAccessibleTextInterface::~QAccessibleTextInterface()
|
||||
|
||||
/*!
|
||||
\fn QString QAccessibleTextInterface::attributes(int offset, int *startOffset, int *endOffset) const
|
||||
|
||||
Returns the text attributes at the position \a offset.
|
||||
In addition the range of the attributes is returned in \a startOffset and \a endOffset.
|
||||
*/
|
||||
@ -1936,6 +2021,7 @@ QAccessibleTextInterface::~QAccessibleTextInterface()
|
||||
|
||||
/*!
|
||||
\fn QRect QAccessibleTextInterface::characterRect(int offset) const
|
||||
|
||||
Returns the position and size of the character at position \a offset in screen coordinates.
|
||||
*/
|
||||
|
||||
@ -2288,6 +2374,7 @@ QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible::TextBoun
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
||||
Destroys the QAccessibleEditableTextInterface.
|
||||
*/
|
||||
QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface()
|
||||
@ -2333,6 +2420,7 @@ QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface()
|
||||
|
||||
/*!
|
||||
Destroys the QAccessibleValueInterface.
|
||||
|
||||
*/
|
||||
QAccessibleValueInterface::~QAccessibleValueInterface()
|
||||
{
|
||||
@ -2415,6 +2503,7 @@ QAccessibleImageInterface::~QAccessibleImageInterface()
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
||||
Destroys the QAccessibleTableCellInterface.
|
||||
*/
|
||||
QAccessibleTableCellInterface::~QAccessibleTableCellInterface()
|
||||
@ -2424,41 +2513,49 @@ QAccessibleTableCellInterface::~QAccessibleTableCellInterface()
|
||||
|
||||
/*!
|
||||
\fn virtual int QAccessibleTableCellInterface::columnExtent() const
|
||||
|
||||
Returns the number of columns occupied by this cell accessible.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QList<QAccessibleInterface*> QAccessibleTableCellInterface::columnHeaderCells() const
|
||||
|
||||
Returns the column headers as an array of cell accessibles.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual int QAccessibleTableCellInterface::columnIndex() const
|
||||
|
||||
Translates this cell accessible into the corresponding column index.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual int QAccessibleTableCellInterface::rowExtent() const
|
||||
|
||||
Returns the number of rows occupied by this cell accessible.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QList<QAccessibleInterface*> QAccessibleTableCellInterface::rowHeaderCells() const
|
||||
|
||||
Returns the row headers as an array of cell accessibles.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual int QAccessibleTableCellInterface::rowIndex() const
|
||||
|
||||
Translates this cell accessible into the corresponding row index.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual bool QAccessibleTableCellInterface::isSelected() const
|
||||
|
||||
Returns a boolean value indicating whether this cell is selected.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QAccessibleInterface *QAccessibleTableCellInterface::table() const
|
||||
|
||||
Returns the QAccessibleInterface of the table containing this cell.
|
||||
*/
|
||||
|
||||
@ -2474,6 +2571,7 @@ QAccessibleTableCellInterface::~QAccessibleTableCellInterface()
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
||||
Destroys the QAccessibleTableInterface.
|
||||
*/
|
||||
QAccessibleTableInterface::~QAccessibleTableInterface()
|
||||
@ -2483,100 +2581,119 @@ QAccessibleTableInterface::~QAccessibleTableInterface()
|
||||
|
||||
/*!
|
||||
\fn virtual QAccessibleInterface *QAccessibleTableInterface::cellAt(int row, int column) const
|
||||
|
||||
Returns the cell at the specified \a row and \a column in the table.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QAccessibleInterface *QAccessibleTableInterface::caption() const
|
||||
|
||||
Returns the caption for the table.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QString QAccessibleTableInterface::columnDescription(int column) const
|
||||
|
||||
Returns the description text of the specified \a column in the table.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual int QAccessibleTableInterface::columnCount() const
|
||||
|
||||
Returns the total number of columns in table.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual int QAccessibleTableInterface::rowCount() const
|
||||
|
||||
Returns the total number of rows in table.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual int QAccessibleTableInterface::selectedCellCount() const
|
||||
|
||||
Returns the total number of selected cells.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual int QAccessibleTableInterface::selectedColumnCount() const
|
||||
|
||||
Returns the total number of selected columns.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual int QAccessibleTableInterface::selectedRowCount() const
|
||||
|
||||
Returns the total number of selected rows.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QString QAccessibleTableInterface::rowDescription(int row) const
|
||||
|
||||
Returns the description text of the specified \a row in the table.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QList<int> QAccessibleTableInterface::selectedCells() const
|
||||
|
||||
Returns the list of selected cell (by their index as \l QAccessibleInterface::child() accepts).
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QList<int> QAccessibleTableInterface::selectedColumns() const
|
||||
|
||||
Returns the list of currently selected columns.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QList<int> QAccessibleTableInterface::selectedRows() const
|
||||
|
||||
Returns the list of currently selected columns.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual QAccessibleInterface *QAccessibleTableInterface::summary() const
|
||||
|
||||
Returns a QAccessibleInterface that represents a summary of the table.
|
||||
This function may return 0 if no such interface exists.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual bool QAccessibleTableInterface::isColumnSelected(int column) const
|
||||
|
||||
Returns a boolean value indicating whether the specified \a column is completely selected.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual bool QAccessibleTableInterface::isRowSelected(int row) const
|
||||
|
||||
Returns a boolean value indicating whether the specified \a row is completely selected.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual bool QAccessibleTableInterface::selectRow(int row)
|
||||
|
||||
Selects \a row. This function might unselect all previously selected rows.
|
||||
Returns \c true if the selection was successful.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual bool QAccessibleTableInterface::selectColumn(int column)
|
||||
|
||||
Selects \a column. This function might unselect all previously selected columns.
|
||||
Returns \c true if the selection was successful.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual bool QAccessibleTableInterface::unselectRow(int row)
|
||||
|
||||
Unselects \a row, leaving other selected rows selected (if any).
|
||||
Returns \c true if the selection was successful.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn virtual bool QAccessibleTableInterface::unselectColumn(int column)
|
||||
|
||||
Unselects \a column, leaving other selected columns selected (if any).
|
||||
Returns \c true if the selection was successful.
|
||||
*/
|
||||
@ -2630,6 +2747,7 @@ QAccessibleTableInterface::~QAccessibleTableInterface()
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
||||
Destroys the QAccessibleActionInterface.
|
||||
*/
|
||||
QAccessibleActionInterface::~QAccessibleActionInterface()
|
||||
|
@ -1,4 +1,3 @@
|
||||
# common to plugin and built-in forms
|
||||
INCLUDEPATH *= $$PWD
|
||||
HEADERS += $$PWD/qgifhandler_p.h
|
||||
SOURCES += $$PWD/qgifhandler.cpp
|
||||
|
@ -628,6 +628,13 @@ QIcon::QIcon(const QIcon &other)
|
||||
d->ref.ref();
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QIcon::QIcon(QIcon &&other)
|
||||
|
||||
Move-constructs a QIcon instance, making it point to the same object
|
||||
that \a other was pointing to.
|
||||
*/
|
||||
|
||||
/*!
|
||||
Constructs an icon from the file with the given \a fileName. The
|
||||
file will be loaded on demand.
|
||||
|
@ -572,12 +572,13 @@ bool QImageData::checkForAlphaPixels() const
|
||||
|
||||
\endtable
|
||||
|
||||
\target qimage-legalese
|
||||
\section1 Legal Information
|
||||
|
||||
For smooth scaling, the transformed() functions use code based on
|
||||
smooth scaling algorithm by Daniel M. Duley.
|
||||
|
||||
\legalese
|
||||
\badcode
|
||||
Copyright (C) 2004, 2005 Daniel M. Duley
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -600,7 +601,7 @@ bool QImageData::checkForAlphaPixels() const
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
\endlegalese
|
||||
\endcode
|
||||
|
||||
\sa QImageReader, QImageWriter, QPixmap, QSvgRenderer, {Image Composition Example},
|
||||
{Image Viewer Example}, {Scribble Example}, {Pixelator Example}
|
||||
@ -4359,6 +4360,10 @@ int QImage::bitPlaneCount() const
|
||||
return bpc;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns a smoothly scaled copy of the image. The returned image has a size
|
||||
of width \a w by height \a h pixels.
|
||||
*/
|
||||
QImage QImage::smoothScaled(int w, int h) const {
|
||||
QImage src = *this;
|
||||
switch (src.format()) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
# common to plugin and built-in forms
|
||||
INCLUDEPATH *= $$PWD
|
||||
HEADERS += $$PWD/qjpeghandler_p.h
|
||||
SOURCES += $$PWD/qjpeghandler.cpp
|
||||
contains(QT_CONFIG, system-jpeg) {
|
||||
|
@ -659,4 +659,18 @@ int QPixmapCache::totalUsed()
|
||||
return (pm_cache()->totalCost()+1023) / 1024;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QPixmapCache::KeyData::KeyData()
|
||||
|
||||
\internal
|
||||
*/
|
||||
/*!
|
||||
\fn QPixmapCache::KeyData::KeyData(const KeyData &other)
|
||||
\internal
|
||||
*/
|
||||
/*!
|
||||
\fn QPixmapCache::KeyData::~KeyData()
|
||||
|
||||
\internal
|
||||
*/
|
||||
QT_END_NAMESPACE
|
||||
|
@ -1,4 +1,3 @@
|
||||
INCLUDEPATH *= $$PWD
|
||||
HEADERS += $$PWD/qpnghandler_p.h
|
||||
SOURCES += $$PWD/qpnghandler.cpp
|
||||
contains(QT_CONFIG, system-png) {
|
||||
|
@ -82,6 +82,52 @@ QEnterEvent::~QEnterEvent()
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QPoint QEnterEvent::globalPos() const
|
||||
|
||||
Returns the global position of the widget \e{at the time of the event}.
|
||||
*/
|
||||
/*!
|
||||
\fn int QEnterEvent::globalX() const
|
||||
|
||||
Returns the global position on the X-axis of the mouse cursor relative to the the widget.
|
||||
*/
|
||||
/*!
|
||||
\fn int QEnterEvent::globalY() const
|
||||
|
||||
Returns the global position on the Y-axis of the mouse cursor relative to the the widget.
|
||||
*/
|
||||
/*!
|
||||
\fn QPoint QEnterEvent::localPos() const
|
||||
|
||||
Returns the mouse cursor's position relative to the receiving widget.
|
||||
*/
|
||||
/*!
|
||||
\fn QPoint QEnterEvent::pos() const
|
||||
|
||||
Returns the position of the mouse cursor in global screen coordinates.
|
||||
*/
|
||||
/*!
|
||||
\fn QPoint QEnterEvent::screenPos() const
|
||||
|
||||
Returns the position of the mouse cursor relative to the receiving screen.
|
||||
*/
|
||||
/*!
|
||||
\fn QPoint QEnterEvent::windowPos() const
|
||||
|
||||
Returns the position of the mouse cursor relative to the receiving window.
|
||||
*/
|
||||
/*!
|
||||
\fn int QEnterEvent::x() const
|
||||
|
||||
Returns the x position of the mouse cursor relative to the receiving widget.
|
||||
*/
|
||||
/*!
|
||||
\fn int QEnterEvent::y() const
|
||||
|
||||
Returns the y position of the mouse cursor relative to the receiving widget.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QInputEvent
|
||||
\ingroup events
|
||||
@ -4196,6 +4242,12 @@ QTouchEvent::~QTouchEvent()
|
||||
\sa QTouchDevice::type(), QTouchEvent::device()
|
||||
*/
|
||||
|
||||
/*! \fn QTouchEvent::TouchPoint::TouchPoint(TouchPoint &&other)
|
||||
|
||||
Move-constructs a TouchPoint instance, making it point to the same
|
||||
object that \a other was pointing to.
|
||||
*/
|
||||
|
||||
/*! \fn Qt::TouchPointStates QTouchEvent::touchPointStates() const
|
||||
|
||||
Returns a bitwise OR of all the touch point states for this event.
|
||||
@ -4722,6 +4774,10 @@ void QTouchEvent::TouchPoint::setFlags(InfoFlags flags)
|
||||
\internal
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn TouchPoint &TouchPoint::operator=(TouchPoint &&other)
|
||||
\internal
|
||||
*/
|
||||
/*!
|
||||
\fn void QTouchEvent::TouchPoint::swap(TouchPoint &other);
|
||||
\internal
|
||||
|
@ -1898,8 +1898,14 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
|
||||
#if !defined(Q_OS_OSX)
|
||||
// On OS X the shortcut override is checked earlier, see: QWindowSystemInterface::handleKeyEvent()
|
||||
const bool checkShortcut = e->keyType == QEvent::KeyPress && window != 0;
|
||||
if (checkShortcut && QWindowSystemInterface::tryHandleShortcutEvent(window, e->timestamp, e->key, e->modifiers, e->unicode, e->repeat, e->repeatCount))
|
||||
return;
|
||||
if (checkShortcut) {
|
||||
QKeyEvent override(QEvent::ShortcutOverride, e->key, e->modifiers,
|
||||
e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers,
|
||||
e->unicode, e->repeat, e->repeatCount);
|
||||
override.setTimestamp(e->timestamp);
|
||||
if (QWindowSystemInterface::tryHandleShortcutOverrideEvent(window, &override))
|
||||
return;
|
||||
}
|
||||
#endif // Q_OS_OSX
|
||||
|
||||
QKeyEvent ev(e->keyType, e->key, e->modifiers,
|
||||
|
@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
|
||||
\class QSessionManager
|
||||
\brief The QSessionManager class provides access to the session manager.
|
||||
|
||||
\inmodule QtWidgets
|
||||
\inmodule QtGui
|
||||
|
||||
A session manager in a desktop environment (in which Qt GUI applications
|
||||
live) keeps track of a session, which is a group of running applications,
|
||||
|
@ -227,6 +227,22 @@ bool QWindowSystemInterface::tryHandleShortcutEvent(QWindow *w, ulong timestamp,
|
||||
#endif
|
||||
}
|
||||
|
||||
bool QWindowSystemInterface::tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev)
|
||||
{
|
||||
#ifndef QT_NO_SHORTCUT
|
||||
Q_ASSERT(ev->type() == QKeyEvent::ShortcutOverride);
|
||||
|
||||
QObject *focus = w->focusObject();
|
||||
if (!focus)
|
||||
focus = w;
|
||||
return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(focus, ev);
|
||||
#else
|
||||
Q_UNUSED(w)
|
||||
Q_UNUSED(ev)
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// used by QTestLib to directly send shortcuts to objects
|
||||
bool QWindowSystemInterface::tryHandleShortcutEventToObject(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods,
|
||||
const QString &text, bool autorep, ushort count)
|
||||
|
@ -78,6 +78,8 @@ public:
|
||||
Qt::KeyboardModifiers mods = Qt::NoModifier,
|
||||
Qt::MouseEventSource source = Qt::MouseEventNotSynthesized);
|
||||
|
||||
static bool tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev);
|
||||
|
||||
static bool tryHandleShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
|
||||
const QString & text = QString(), bool autorep = false, ushort count = 1);
|
||||
static bool tryHandleShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods,
|
||||
|
@ -68,12 +68,6 @@ QT_BEGIN_NAMESPACE
|
||||
Constructs a NxM matrix without initializing the contents.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QGenericMatrix::QGenericMatrix(const QGenericMatrix<N, M, T>& other)
|
||||
|
||||
Constructs a copy of \a other.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QGenericMatrix::QGenericMatrix(const T *values)
|
||||
|
||||
|
@ -915,6 +915,12 @@ QOpenGLDebugMessage &QOpenGLDebugMessage::operator=(const QOpenGLDebugMessage &d
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QOpenGLDebugMessage &QOpenGLDebugMessage::operator=(QOpenGLDebugMessage &&debugMessage)
|
||||
|
||||
Move-assigns \a debugMessage to this object.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QOpenGLDebugMessage::swap(QOpenGLDebugMessage &debugMessage)
|
||||
|
||||
|
@ -179,8 +179,9 @@ void QOpenGLTexturePrivate::destroy()
|
||||
// not created or already destroyed
|
||||
return;
|
||||
}
|
||||
if (QOpenGLContext::currentContext() != context) {
|
||||
qWarning("Requires a valid current OpenGL context.\n"
|
||||
QOpenGLContext *currentContext = QOpenGLContext::currentContext();
|
||||
if (!currentContext || !QOpenGLContext::areSharing(currentContext, context)) {
|
||||
qWarning("Texture is not valid in the current context.\n"
|
||||
"Texture has not been destroyed");
|
||||
return;
|
||||
}
|
||||
|
@ -186,11 +186,17 @@ void QAbstractOpenGLFunctionsPrivate::removeExternalFunctions(QOpenGLContext *co
|
||||
|
||||
\sa QOpenGLContext::versionFunctions()
|
||||
*/
|
||||
/*!
|
||||
Constructs a QAbstractOpenGLFunctions object.
|
||||
*/
|
||||
QAbstractOpenGLFunctions::QAbstractOpenGLFunctions()
|
||||
: d_ptr(new QAbstractOpenGLFunctionsPrivate)
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Destroys a QAbstractOpenGLFunctions object.
|
||||
*/
|
||||
QAbstractOpenGLFunctions::~QAbstractOpenGLFunctions()
|
||||
{
|
||||
Q_D(QAbstractOpenGLFunctions);
|
||||
@ -228,12 +234,16 @@ bool QAbstractOpenGLFunctions::isInitialized() const
|
||||
return d->initialized;
|
||||
}
|
||||
|
||||
/*! \internal
|
||||
*/
|
||||
void QAbstractOpenGLFunctions::setOwningContext(const QOpenGLContext *context)
|
||||
{
|
||||
Q_D(QAbstractOpenGLFunctions);
|
||||
d->owningContext = const_cast<QOpenGLContext*>(context);
|
||||
}
|
||||
|
||||
/*! \internal
|
||||
*/
|
||||
QOpenGLContext *QAbstractOpenGLFunctions::owningContext() const
|
||||
{
|
||||
Q_D(const QAbstractOpenGLFunctions);
|
||||
|
@ -235,16 +235,27 @@ bool QBackingStore::scroll(const QRegion &area, int dx, int dy)
|
||||
return d_ptr->platformBackingStore->scroll(QHighDpi::toNativeLocalRegion(area, d_ptr->window), QHighDpi::toNativePixels(dx, d_ptr->window), QHighDpi::toNativePixels(dy, d_ptr->window));
|
||||
}
|
||||
|
||||
/*!
|
||||
Set \a region as the static contents of this window.
|
||||
*/
|
||||
void QBackingStore::setStaticContents(const QRegion ®ion)
|
||||
{
|
||||
d_ptr->staticContents = region;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns a pointer to the QRegion that has the static contents
|
||||
of this window.
|
||||
*/
|
||||
QRegion QBackingStore::staticContents() const
|
||||
{
|
||||
return d_ptr->staticContents;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns a boolean indicating if this window
|
||||
has static contents or not.
|
||||
*/
|
||||
bool QBackingStore::hasStaticContents() const
|
||||
{
|
||||
return !d_ptr->staticContents.isEmpty();
|
||||
@ -297,6 +308,9 @@ void Q_GUI_EXPORT qt_scrollRectInImage(QImage &img, const QRect &rect, const QPo
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns a pointer to the QPlatformBackingStore implementation
|
||||
*/
|
||||
QPlatformBackingStore *QBackingStore::handle() const
|
||||
{
|
||||
return d_ptr->platformBackingStore;
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "qpixmap.h"
|
||||
#include "qbitmap.h"
|
||||
#include "qpixmapcache.h"
|
||||
#include "qplatformpixmap.h"
|
||||
#include <qpa/qplatformpixmap.h>
|
||||
#include "qdatastream.h"
|
||||
#include "qvariant.h"
|
||||
#include "qline.h"
|
||||
|
@ -3277,6 +3277,10 @@ bool QRasterPaintEngine::requiresPretransformedGlyphPositions(QFontEngine *fontE
|
||||
return QPaintEngineEx::requiresPretransformedGlyphPositions(fontEngine, m);
|
||||
}
|
||||
|
||||
/*!
|
||||
Indicates whether glyph caching is supported by the font engine
|
||||
\a fontEngine with the given transform \a m applied.
|
||||
*/
|
||||
bool QRasterPaintEngine::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const
|
||||
{
|
||||
// The raster engine does not support projected cached glyph drawing
|
||||
|
@ -2012,8 +2012,8 @@ int QPdfEnginePrivate::createShadingFunction(const QGradient *gradient, int from
|
||||
if (reflect && step % 2) {
|
||||
for (int i = stops.size() - 1; i > 0; --i) {
|
||||
QGradientBound b;
|
||||
b.start = step + 1 - qBound(0., stops.at(i).first, 1.);
|
||||
b.stop = step + 1 - qBound(0., stops.at(i - 1).first, 1.);
|
||||
b.start = step + 1 - qBound(qreal(0.), stops.at(i).first, qreal(1.));
|
||||
b.stop = step + 1 - qBound(qreal(0.), stops.at(i - 1).first, qreal(1.));
|
||||
b.function = functions.at(i - 1);
|
||||
b.reverse = true;
|
||||
gradientBounds << b;
|
||||
@ -2021,8 +2021,8 @@ int QPdfEnginePrivate::createShadingFunction(const QGradient *gradient, int from
|
||||
} else {
|
||||
for (int i = 0; i < stops.size() - 1; ++i) {
|
||||
QGradientBound b;
|
||||
b.start = step + qBound(0., stops.at(i).first, 1.);
|
||||
b.stop = step + qBound(0., stops.at(i + 1).first, 1.);
|
||||
b.start = step + qBound(qreal(0.), stops.at(i).first, qreal(1.));
|
||||
b.stop = step + qBound(qreal(0.), stops.at(i + 1).first, qreal(1.));
|
||||
b.function = functions.at(i);
|
||||
b.reverse = false;
|
||||
gradientBounds << b;
|
||||
|
@ -72,12 +72,14 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
#define SMOOTH_SCALABLE 0xffff
|
||||
|
||||
#if defined(QT_BUILD_INTERNAL)
|
||||
bool qt_enable_test_font = false;
|
||||
|
||||
Q_AUTOTEST_EXPORT void qt_setQtEnableTestFont(bool value)
|
||||
{
|
||||
qt_enable_test_font = value;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int getFontWeight(const QString &weightString)
|
||||
{
|
||||
@ -756,7 +758,47 @@ QString qt_resolveFontFamilyAlias(const QString &alias)
|
||||
return alias;
|
||||
}
|
||||
|
||||
static QStringList fallbackFamilies(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
|
||||
QStringList QPlatformFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
|
||||
{
|
||||
Q_UNUSED(family);
|
||||
Q_UNUSED(styleHint);
|
||||
|
||||
QStringList retList;
|
||||
|
||||
size_t writingSystem = std::find(scriptForWritingSystem,
|
||||
scriptForWritingSystem + QFontDatabase::WritingSystemsCount,
|
||||
script) - scriptForWritingSystem;
|
||||
if (writingSystem >= QFontDatabase::WritingSystemsCount)
|
||||
writingSystem = QFontDatabase::Any;
|
||||
|
||||
QFontDatabasePrivate *db = privateDb();
|
||||
for (int i = 0; i < db->count; ++i) {
|
||||
QtFontFamily *f = db->families[i];
|
||||
|
||||
f->ensurePopulated();
|
||||
|
||||
if (writingSystem > QFontDatabase::Any && f->writingSystems[writingSystem] != QtFontFamily::Supported)
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < f->count; ++j) {
|
||||
QtFontFoundry *foundry = f->foundries[j];
|
||||
|
||||
for (int k = 0; k < foundry->count; ++k) {
|
||||
if (style == foundry->styles[k]->key.style) {
|
||||
if (foundry->name.isEmpty())
|
||||
retList.append(f->name);
|
||||
else
|
||||
retList.append(f->name + QLatin1String(" [") + foundry->name + QLatin1Char(']'));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return retList;
|
||||
}
|
||||
|
||||
QStringList qt_fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
|
||||
{
|
||||
// make sure that the db has all fallback families
|
||||
QStringList retList = QGuiApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(family,style,styleHint,script);
|
||||
@ -884,17 +926,19 @@ QFontEngine *loadEngine(int script, const QFontDef &request,
|
||||
QFontEngine *engine = loadSingleEngine(script, request, family, foundry, style, size);
|
||||
Q_ASSERT(!engine || engine->type() != QFontEngine::Multi);
|
||||
if (engine && !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol) {
|
||||
QStringList fallbacks = request.fallBackFamilies;
|
||||
|
||||
QFont::StyleHint styleHint = QFont::StyleHint(request.styleHint);
|
||||
if (styleHint == QFont::AnyStyle && request.fixedPitch)
|
||||
styleHint = QFont::TypeWriter;
|
||||
|
||||
fallbacks += fallbackFamilies(family->name, QFont::Style(style->key.style), styleHint, QChar::Script(script));
|
||||
|
||||
QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
|
||||
QFontEngineMulti *pfMultiEngine = pfdb->fontEngineMulti(engine, QChar::Script(script));
|
||||
pfMultiEngine->setFallbackFamiliesList(fallbacks);
|
||||
if (!request.fallBackFamilies.isEmpty()) {
|
||||
QStringList fallbacks = request.fallBackFamilies;
|
||||
|
||||
QFont::StyleHint styleHint = QFont::StyleHint(request.styleHint);
|
||||
if (styleHint == QFont::AnyStyle && request.fixedPitch)
|
||||
styleHint = QFont::TypeWriter;
|
||||
|
||||
fallbacks += qt_fallbacksForFamily(family->name, QFont::Style(style->key.style), styleHint, QChar::Script(script));
|
||||
|
||||
pfMultiEngine->setFallbackFamiliesList(fallbacks);
|
||||
}
|
||||
engine = pfMultiEngine;
|
||||
|
||||
// Cache Multi font engine as well in case we got the single
|
||||
@ -2527,6 +2571,15 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
|
||||
|
||||
QFontEngine *engine;
|
||||
|
||||
#if defined(QT_BUILD_INTERNAL)
|
||||
// For testing purpose only, emulates an exact-matching monospace font
|
||||
if (qt_enable_test_font && request.family == QLatin1String("__Qt__Box__Engine__")) {
|
||||
engine = new QTestFontEngine(request.pixelSize);
|
||||
engine->fontDef = request;
|
||||
return engine;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Until we specifically asked not to, try looking for Multi font engine
|
||||
// first, the last '1' indicates that we want Multi font engine instead
|
||||
// of single ones
|
||||
@ -2542,12 +2595,6 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
|
||||
|
||||
parseFontName(request.family, foundry_name, family_name);
|
||||
|
||||
if (qt_enable_test_font && request.family == QLatin1String("__Qt__Box__Engine__")) {
|
||||
engine =new QTestFontEngine(request.pixelSize);
|
||||
engine->fontDef = request;
|
||||
return engine;
|
||||
}
|
||||
|
||||
QtFontDesc desc;
|
||||
QList<int> blackListed;
|
||||
int index = match(script, request, family_name, foundry_name, &desc, blackListed);
|
||||
@ -2568,10 +2615,10 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
|
||||
styleHint = QFont::TypeWriter;
|
||||
|
||||
QStringList fallbacks = request.fallBackFamilies
|
||||
+ fallbackFamilies(request.family,
|
||||
QFont::Style(request.style),
|
||||
styleHint,
|
||||
QChar::Script(script));
|
||||
+ qt_fallbacksForFamily(request.family,
|
||||
QFont::Style(request.style),
|
||||
styleHint,
|
||||
QChar::Script(script));
|
||||
if (script > QChar::Script_Common)
|
||||
fallbacks += QString(); // Find the first font matching the specified script.
|
||||
|
||||
|
@ -1590,15 +1590,15 @@ QFontEngineMulti::~QFontEngineMulti()
|
||||
}
|
||||
}
|
||||
|
||||
QStringList qt_fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script);
|
||||
|
||||
void QFontEngineMulti::ensureFallbackFamiliesQueried()
|
||||
{
|
||||
if (QPlatformIntegration *integration = QGuiApplicationPrivate::platformIntegration()) {
|
||||
const QStringList fallbackFamilies = integration->fontDatabase()->fallbacksForFamily(fontDef.family,
|
||||
QFont::Style(fontDef.style),
|
||||
QFont::AnyStyle,
|
||||
QChar::Script(m_script));
|
||||
setFallbackFamiliesList(fallbackFamilies);
|
||||
}
|
||||
QFont::StyleHint styleHint = QFont::StyleHint(fontDef.styleHint);
|
||||
if (styleHint == QFont::AnyStyle && fontDef.fixedPitch)
|
||||
styleHint = QFont::TypeWriter;
|
||||
|
||||
setFallbackFamiliesList(qt_fallbacksForFamily(fontDef.family, QFont::Style(fontDef.style), styleHint, QChar::Script(m_script)));
|
||||
}
|
||||
|
||||
void QFontEngineMulti::setFallbackFamiliesList(const QStringList &fallbackFamilies)
|
||||
|
@ -208,6 +208,11 @@ QFontMetrics &QFontMetrics::operator=(const QFontMetrics &fm)
|
||||
|
||||
\since 5.2
|
||||
*/
|
||||
/*!
|
||||
\fn QFontMetricsF &QFontMetricsF::operator=(QFontMetricsF &&other)
|
||||
|
||||
Move-assigns \a other to this QFontMetricsF instance.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QFontMetrics::swap(QFontMetrics &other)
|
||||
|
@ -346,17 +346,15 @@ QFontEngine *QPlatformFontDatabase::fontEngine(const QByteArray &fontData, qreal
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QStringList QPlatformFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
|
||||
|
||||
Returns a list of alternative fonts for the specified \a family and
|
||||
\a style and \a script using the \a styleHint given.
|
||||
|
||||
Default implementation returns a list of fonts for which \a style and \a script support
|
||||
has been reported during the font database population.
|
||||
*/
|
||||
QStringList QPlatformFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
|
||||
{
|
||||
Q_UNUSED(family);
|
||||
Q_UNUSED(style);
|
||||
Q_UNUSED(styleHint);
|
||||
Q_UNUSED(script);
|
||||
return QStringList();
|
||||
}
|
||||
// implemented in qfontdatabase.cpp
|
||||
|
||||
/*!
|
||||
Adds an application font described by the font contained supplied \a fontData
|
||||
|
@ -135,9 +135,8 @@ bool Qt::mightBeRichText(const QString& text)
|
||||
return false;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QString Qt::convertFromPlainText(const QString &plain, WhiteSpaceMode mode)
|
||||
|
||||
/*!
|
||||
Converts the plain text string \a plain to an HTML-formatted
|
||||
paragraph while preserving most of its look.
|
||||
|
||||
|
@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
#define RSA_ENCRYPTION_OID QByteArrayLiteral("1.2.840.113549.1.1.1")
|
||||
#define DSA_ENCRYPTION_OID QByteArrayLiteral("1.2.840.10040.4.1")
|
||||
#define EC_ENCRYPTION_OID QByteArrayLiteral("1.2.840.10045.2.1")
|
||||
|
||||
class Q_AUTOTEST_EXPORT QAsn1Element
|
||||
{
|
||||
@ -80,6 +81,7 @@ public:
|
||||
|
||||
// context specific
|
||||
Context0Type = 0xA0,
|
||||
Context1Type = 0xA1,
|
||||
Context3Type = 0xA3
|
||||
};
|
||||
|
||||
|
@ -366,8 +366,10 @@ bool QSslCertificatePrivate::parse(const QByteArray &data)
|
||||
const QByteArray oid = elem.toObjectId();
|
||||
if (oid == RSA_ENCRYPTION_OID)
|
||||
publicKeyAlgorithm = QSsl::Rsa;
|
||||
else if (oid == RSA_ENCRYPTION_OID)
|
||||
else if (oid == DSA_ENCRYPTION_OID)
|
||||
publicKeyAlgorithm = QSsl::Dsa;
|
||||
else if (oid == EC_ENCRYPTION_OID)
|
||||
publicKeyAlgorithm = QSsl::Ec;
|
||||
else
|
||||
publicKeyAlgorithm = QSsl::Opaque;
|
||||
|
||||
|
@ -59,6 +59,47 @@ static const quint8 bits_table[256] = {
|
||||
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
|
||||
};
|
||||
|
||||
// OIDs of named curves allowed in TLS as per RFCs 4492 and 7027,
|
||||
// see also https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8
|
||||
|
||||
typedef QMap<QByteArray, int> OidLengthMap;
|
||||
static OidLengthMap createOidMap()
|
||||
{
|
||||
OidLengthMap oids;
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.2.840.10045.3.1.1"), 192); // secp192r1 a.k.a prime192v1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.2.840.10045.3.1.7"), 256); // secp256r1 a.k.a prime256v1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.1"), 193); // sect193r2
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.10"), 256); // secp256k1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.16"), 283); // sect283k1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.17"), 283); // sect283r1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.26"), 233); // sect233k1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.27"), 233); // sect233r1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.3"), 239); // sect239k1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.30"), 160); // secp160r2
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.31"), 192); // secp192k1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.32"), 224); // secp224k1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.33"), 224); // secp224r1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.34"), 384); // secp384r1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.35"), 521); // secp521r1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.36"), 409); // sect409k1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.37"), 409); // sect409r1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.38"), 571); // sect571k1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.39"), 571); // sect571r1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.8"), 160); // secp160r1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.132.0.9"), 160); // secp160k1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.36.3.3.2.8.1.1.11"), 384); // brainpoolP384r1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.36.3.3.2.8.1.1.13"), 521); // brainpoolP512r1
|
||||
oids.insert(oids.cend(), QByteArrayLiteral("1.3.36.3.3.2.8.1.1.7"), 256); // brainpoolP256r1
|
||||
return oids;
|
||||
}
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(OidLengthMap, oidLengthMap, (createOidMap()))
|
||||
|
||||
static int curveBits(const QByteArray &oid)
|
||||
{
|
||||
const int length = oidLengthMap->value(oid);
|
||||
return length ? length : -1;
|
||||
}
|
||||
|
||||
static int numberOfBits(const QByteArray &modulus)
|
||||
{
|
||||
int bits = modulus.size() * 8;
|
||||
@ -146,6 +187,12 @@ void QSslKeyPrivate::decodeDer(const QByteArray &der, bool deepClear)
|
||||
if (params.isEmpty() || params[0].type() != QAsn1Element::IntegerType)
|
||||
return;
|
||||
keyLength = numberOfBits(params[0].value());
|
||||
} else if (algorithm == QSsl::Ec) {
|
||||
if (infoItems[0].toObjectId() != EC_ENCRYPTION_OID)
|
||||
return;
|
||||
if (infoItems[1].type() != QAsn1Element::ObjectIdentifierType)
|
||||
return;
|
||||
keyLength = curveBits(infoItems[1].toObjectId());
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -154,17 +201,35 @@ void QSslKeyPrivate::decodeDer(const QByteArray &der, bool deepClear)
|
||||
return;
|
||||
|
||||
// version
|
||||
if (items[0].type() != QAsn1Element::IntegerType || items[0].value().toHex() != "00")
|
||||
if (items[0].type() != QAsn1Element::IntegerType)
|
||||
return;
|
||||
const QByteArray versionHex = items[0].value().toHex();
|
||||
|
||||
if (algorithm == QSsl::Rsa) {
|
||||
if (versionHex != "00")
|
||||
return;
|
||||
if (items.size() != 9 || items[1].type() != QAsn1Element::IntegerType)
|
||||
return;
|
||||
keyLength = numberOfBits(items[1].value());
|
||||
} else if (algorithm == QSsl::Dsa) {
|
||||
if (versionHex != "00")
|
||||
return;
|
||||
if (items.size() != 6 || items[1].type() != QAsn1Element::IntegerType)
|
||||
return;
|
||||
keyLength = numberOfBits(items[1].value());
|
||||
} else if (algorithm == QSsl::Ec) {
|
||||
if (versionHex != "01")
|
||||
return;
|
||||
if (items.size() != 4
|
||||
|| items[1].type() != QAsn1Element::OctetStringType
|
||||
|| items[2].type() != QAsn1Element::Context0Type
|
||||
|| items[3].type() != QAsn1Element::Context1Type)
|
||||
return;
|
||||
QAsn1Element oidElem;
|
||||
if (!oidElem.read(items[2].value())
|
||||
|| oidElem.type() != QAsn1Element::ObjectIdentifierType)
|
||||
return;
|
||||
keyLength = curveBits(oidElem.toObjectId());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -500,6 +500,7 @@ bool QSslSocket::setSocketDescriptor(qintptr socketDescriptor, SocketState state
|
||||
bool retVal = d->plainSocket->setSocketDescriptor(socketDescriptor, state, openMode);
|
||||
d->cachedSocketDescriptor = d->plainSocket->socketDescriptor();
|
||||
setSocketError(d->plainSocket->error());
|
||||
setErrorString(d->plainSocket->errorString());
|
||||
setSocketState(state);
|
||||
setOpenMode(openMode);
|
||||
setLocalPort(d->plainSocket->localPort());
|
||||
|
@ -380,12 +380,9 @@ bool QSslSocketBackendPrivate::initSslContext()
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((configuration.protocol == QSsl::TlsV1SslV3 ||
|
||||
configuration.protocol == QSsl::TlsV1_0 ||
|
||||
configuration.protocol == QSsl::TlsV1_1 ||
|
||||
configuration.protocol == QSsl::TlsV1_2 ||
|
||||
configuration.protocol == QSsl::SecureProtocols ||
|
||||
configuration.protocol == QSsl::AnyProtocol) &&
|
||||
if (configuration.protocol != QSsl::SslV2 &&
|
||||
configuration.protocol != QSsl::SslV3 &&
|
||||
configuration.protocol != QSsl::UnknownProtocol &&
|
||||
mode == QSslSocket::SslClientMode && q_SSLeay() >= 0x00090806fL) {
|
||||
// Set server hostname on TLS extension. RFC4366 section 3.1 requires it in ACE format.
|
||||
QString tlsHostName = verificationPeerName.isEmpty() ? q->peerName() : verificationPeerName;
|
||||
|
@ -424,11 +424,10 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS
|
||||
if (!inCache)
|
||||
shaderCache.store(newProg->program, QGLContext::currentContext());
|
||||
} else {
|
||||
QLatin1String none("none");
|
||||
QLatin1String br("\n");
|
||||
QString error;
|
||||
error = QLatin1String("Shader program failed to link,");
|
||||
#if defined(QT_DEBUG)
|
||||
QLatin1String br("\n");
|
||||
error += QLatin1String("\n Shaders Used:\n");
|
||||
for (int i = 0; i < newProg->program->shaders().count(); ++i) {
|
||||
QGLShader *shader = newProg->program->shaders().at(i);
|
||||
|
@ -2168,6 +2168,9 @@ QGLContext::QGLContext(QOpenGLContext *context)
|
||||
d->setupSharing();
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the OpenGL context handle.
|
||||
*/
|
||||
QOpenGLContext *QGLContext::contextHandle() const
|
||||
{
|
||||
Q_D(const QGLContext);
|
||||
@ -2175,7 +2178,7 @@ QOpenGLContext *QGLContext::contextHandle() const
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns a OpenGL context for the window context specified by the \a context
|
||||
Returns an OpenGL context for the window context specified by the \a context
|
||||
parameter.
|
||||
*/
|
||||
QGLContext *QGLContext::fromOpenGLContext(QOpenGLContext *context)
|
||||
@ -4355,7 +4358,7 @@ void QGLWidget::resizeOverlayGL(int, int)
|
||||
}
|
||||
|
||||
/*!\reimp
|
||||
*/
|
||||
*/
|
||||
bool QGLWidget::event(QEvent *e)
|
||||
{
|
||||
Q_D(QGLWidget);
|
||||
|
@ -208,3 +208,4 @@
|
||||
Returns the unsigned integer result of calling the function or
|
||||
UINT_MAX if the function was not found.
|
||||
*/
|
||||
|
||||
|
@ -55,23 +55,24 @@ QT_BEGIN_NAMESPACE
|
||||
void QBasicFontDatabase::populateFontDatabase()
|
||||
{
|
||||
QString fontpath = fontDir();
|
||||
QDir dir(fontpath);
|
||||
|
||||
if(!QFile::exists(fontpath)) {
|
||||
if (!dir.exists()) {
|
||||
qWarning("QFontDatabase: Cannot find font directory %s - is Qt installed correctly?",
|
||||
qPrintable(fontpath));
|
||||
return;
|
||||
}
|
||||
|
||||
QDir dir(fontpath);
|
||||
dir.setNameFilters(QStringList() << QLatin1String("*.ttf")
|
||||
<< QLatin1String("*.ttc") << QLatin1String("*.pfa")
|
||||
<< QLatin1String("*.pfb")
|
||||
<< QLatin1String("*.otf"));
|
||||
dir.refresh();
|
||||
for (int i = 0; i < int(dir.count()); ++i) {
|
||||
const QByteArray file = QFile::encodeName(dir.absoluteFilePath(dir[i]));
|
||||
// qDebug() << "looking at" << file;
|
||||
addTTFile(QByteArray(), file);
|
||||
QStringList nameFilters;
|
||||
nameFilters << QLatin1String("*.ttf")
|
||||
<< QLatin1String("*.ttc")
|
||||
<< QLatin1String("*.pfa")
|
||||
<< QLatin1String("*.pfb")
|
||||
<< QLatin1String("*.otf");
|
||||
|
||||
foreach (const QFileInfo &fi, dir.entryInfoList(nameFilters, QDir::Files)) {
|
||||
const QByteArray file = QFile::encodeName(fi.absoluteFilePath());
|
||||
QBasicFontDatabase::addTTFile(QByteArray(), file);
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,18 +177,9 @@ QFontEngine *QBasicFontDatabase::fontEngine(const QByteArray &fontData, qreal pi
|
||||
return fe;
|
||||
}
|
||||
|
||||
QStringList QBasicFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
|
||||
{
|
||||
Q_UNUSED(family);
|
||||
Q_UNUSED(style);
|
||||
Q_UNUSED(script);
|
||||
Q_UNUSED(styleHint);
|
||||
return QStringList();
|
||||
}
|
||||
|
||||
QStringList QBasicFontDatabase::addApplicationFont(const QByteArray &fontData, const QString &fileName)
|
||||
{
|
||||
return addTTFile(fontData,fileName.toLocal8Bit());
|
||||
return QBasicFontDatabase::addTTFile(fontData, fileName.toLocal8Bit());
|
||||
}
|
||||
|
||||
void QBasicFontDatabase::releaseHandle(void *handle)
|
||||
@ -198,7 +190,7 @@ void QBasicFontDatabase::releaseHandle(void *handle)
|
||||
|
||||
extern FT_Library qt_getFreetype();
|
||||
|
||||
QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByteArray &file, QSupportedWritingSystems *supportedWritingSystems)
|
||||
QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByteArray &file)
|
||||
{
|
||||
FT_Library library = qt_getFreetype();
|
||||
|
||||
@ -237,8 +229,6 @@ QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByt
|
||||
if (cm->encoding == FT_ENCODING_ADOBE_CUSTOM
|
||||
|| cm->encoding == FT_ENCODING_MS_SYMBOL) {
|
||||
writingSystems.setSupported(QFontDatabase::Symbol);
|
||||
if (supportedWritingSystems)
|
||||
supportedWritingSystems->setSupported(QFontDatabase::Symbol);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -257,8 +247,6 @@ QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByt
|
||||
};
|
||||
|
||||
writingSystems = QPlatformFontDatabase::writingSystemsFromTrueTypeBits(unicodeRange, codePageRange);
|
||||
if (supportedWritingSystems)
|
||||
*supportedWritingSystems = writingSystems;
|
||||
|
||||
if (os2->usWeightClass) {
|
||||
weight = QPlatformFontDatabase::weightFromInteger(os2->usWeightClass);
|
||||
|
@ -63,11 +63,10 @@ public:
|
||||
void populateFontDatabase() Q_DECL_OVERRIDE;
|
||||
QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) Q_DECL_OVERRIDE;
|
||||
QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference) Q_DECL_OVERRIDE;
|
||||
QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const Q_DECL_OVERRIDE;
|
||||
QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName) Q_DECL_OVERRIDE;
|
||||
void releaseHandle(void *handle) Q_DECL_OVERRIDE;
|
||||
|
||||
static QStringList addTTFile(const QByteArray &fontData, const QByteArray &file, QSupportedWritingSystems *supportedWritingSystems = 0);
|
||||
static QStringList addTTFile(const QByteArray &fontData, const QByteArray &file);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -5,6 +5,7 @@ PLUGIN_CLASS_NAME = QGifPlugin
|
||||
load(qt_plugin)
|
||||
|
||||
include(../../../gui/image/qgifhandler.pri)
|
||||
INCLUDEPATH += ../../../gui/image
|
||||
SOURCES += $$PWD/main.cpp
|
||||
HEADERS += $$PWD/main.h
|
||||
OTHER_FILES += gif.json
|
||||
|
@ -9,6 +9,7 @@ QT += core-private
|
||||
QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)"
|
||||
|
||||
include(../../../gui/image/qjpeghandler.pri)
|
||||
INCLUDEPATH += ../../../gui/image
|
||||
SOURCES += main.cpp
|
||||
HEADERS += main.h
|
||||
OTHER_FILES += jpeg.json
|
||||
|
@ -443,6 +443,11 @@ static void *startMainMethod(void */*data*/)
|
||||
if (m_applicationClass)
|
||||
QJNIObjectPrivate::callStaticMethod<void>(m_applicationClass, "quitApp", "()V");
|
||||
|
||||
// All attached threads should be detached before returning from this function.
|
||||
JavaVM *vm = QtAndroidPrivate::javaVM();
|
||||
if (vm != 0)
|
||||
vm->DetachCurrentThread();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -45,26 +45,20 @@ QString QAndroidPlatformFontDatabase::fontDir() const
|
||||
void QAndroidPlatformFontDatabase::populateFontDatabase()
|
||||
{
|
||||
QString fontpath = fontDir();
|
||||
QDir dir(fontpath);
|
||||
|
||||
if (!QFile::exists(fontpath)) {
|
||||
if (!dir.exists()) {
|
||||
qFatal("QFontDatabase: Cannot find font directory %s - is Qt installed correctly?",
|
||||
qPrintable(fontpath));
|
||||
}
|
||||
|
||||
QDir dir(fontpath);
|
||||
QList<QFileInfo> entries = dir.entryInfoList(QStringList() << QStringLiteral("*.ttf") << QStringLiteral("*.otf"), QDir::Files);
|
||||
for (int i = 0; i < int(entries.count()); ++i) {
|
||||
const QByteArray file = QFile::encodeName(entries.at(i).absoluteFilePath());
|
||||
QSupportedWritingSystems supportedWritingSystems;
|
||||
QStringList families = addTTFile(QByteArray(), file, &supportedWritingSystems);
|
||||
QStringList nameFilters;
|
||||
nameFilters << QLatin1String("*.ttf")
|
||||
<< QLatin1String("*.otf");
|
||||
|
||||
extern int qt_script_for_writing_system(QFontDatabase::WritingSystem writingSystem);
|
||||
for (int i = 0; i < QFontDatabase::WritingSystemsCount; ++i) {
|
||||
if (i == QFontDatabase::Any || supportedWritingSystems.supported(QFontDatabase::WritingSystem(i))) {
|
||||
QChar::Script script = QChar::Script(qt_script_for_writing_system(QFontDatabase::WritingSystem(i)));
|
||||
m_fallbacks[script] += families;
|
||||
}
|
||||
}
|
||||
foreach (const QFileInfo &fi, dir.entryInfoList(nameFilters, QDir::Files)) {
|
||||
const QByteArray file = QFile::encodeName(fi.absoluteFilePath());
|
||||
QBasicFontDatabase::addTTFile(QByteArray(), file);
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,15 +67,16 @@ QStringList QAndroidPlatformFontDatabase::fallbacksForFamily(const QString &fami
|
||||
QFont::StyleHint styleHint,
|
||||
QChar::Script script) const
|
||||
{
|
||||
Q_UNUSED(family);
|
||||
Q_UNUSED(style);
|
||||
|
||||
QStringList result;
|
||||
if (styleHint == QFont::Monospace || styleHint == QFont::Courier)
|
||||
return QString(qgetenv("QT_ANDROID_FONTS_MONOSPACE")).split(";") + m_fallbacks[script];
|
||||
result.append(QString(qgetenv("QT_ANDROID_FONTS_MONOSPACE")).split(";"));
|
||||
else if (styleHint == QFont::Serif)
|
||||
return QString(qgetenv("QT_ANDROID_FONTS_SERIF")).split(";") + m_fallbacks[script];
|
||||
result.append(QString(qgetenv("QT_ANDROID_FONTS_SERIF")).split(";"));
|
||||
else
|
||||
result.append(QString(qgetenv("QT_ANDROID_FONTS")).split(";"));
|
||||
result.append(QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script));
|
||||
|
||||
return QString(qgetenv("QT_ANDROID_FONTS")).split(";") + m_fallbacks[script];
|
||||
return result;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -47,9 +47,6 @@ public:
|
||||
QFont::Style style,
|
||||
QFont::StyleHint styleHint,
|
||||
QChar::Script script) const;
|
||||
|
||||
private:
|
||||
QHash<QChar::Script, QStringList> m_fallbacks;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -1435,8 +1435,12 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
||||
|
||||
if (eventType == QEvent::KeyPress) {
|
||||
|
||||
if (m_composingText.isEmpty())
|
||||
m_sendKeyEvent = !QWindowSystemInterface::tryHandleShortcutEvent(focusWindow, timestamp, keyCode, modifiers, text, [nsevent isARepeat], 1);
|
||||
if (m_composingText.isEmpty()) {
|
||||
QKeyEvent override(QEvent::ShortcutOverride, keyCode, modifiers,
|
||||
nativeScanCode, nativeVirtualKey, nativeModifiers, text, [nsevent isARepeat], 1);
|
||||
override.setTimestamp(timestamp);
|
||||
m_sendKeyEvent = !QWindowSystemInterface::tryHandleShortcutOverrideEvent(focusWindow, &override);
|
||||
}
|
||||
|
||||
QObject *fo = QGuiApplication::focusObject();
|
||||
if (m_sendKeyEvent && fo) {
|
||||
|
@ -50,15 +50,15 @@ public:
|
||||
QIOSContext(QOpenGLContext *context);
|
||||
~QIOSContext();
|
||||
|
||||
QSurfaceFormat format() const;
|
||||
QSurfaceFormat format() const Q_DECL_OVERRIDE;
|
||||
|
||||
void swapBuffers(QPlatformSurface *surface);
|
||||
void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE;
|
||||
|
||||
bool makeCurrent(QPlatformSurface *surface);
|
||||
void doneCurrent();
|
||||
bool makeCurrent(QPlatformSurface *surface) Q_DECL_OVERRIDE;
|
||||
void doneCurrent() Q_DECL_OVERRIDE;
|
||||
|
||||
GLuint defaultFramebufferObject(QPlatformSurface *) const;
|
||||
QFunctionPointer getProcAddress(const QByteArray &procName);
|
||||
GLuint defaultFramebufferObject(QPlatformSurface *) const Q_DECL_OVERRIDE;
|
||||
QFunctionPointer getProcAddress(const QByteArray &procName) Q_DECL_OVERRIDE;
|
||||
|
||||
bool isSharing() const Q_DECL_OVERRIDE;
|
||||
bool isValid() const Q_DECL_OVERRIDE;
|
||||
|
@ -304,7 +304,7 @@ public:
|
||||
return g_iteratorCurrentUrl.localData();
|
||||
}
|
||||
|
||||
QFileInfo currentFileInfo() const
|
||||
QFileInfo currentFileInfo() const Q_DECL_OVERRIDE
|
||||
{
|
||||
return QFileInfo(currentFileName());
|
||||
}
|
||||
|
@ -54,26 +54,26 @@ public:
|
||||
QIOSIntegration();
|
||||
~QIOSIntegration();
|
||||
|
||||
bool hasCapability(Capability cap) const;
|
||||
bool hasCapability(Capability cap) const Q_DECL_OVERRIDE;
|
||||
|
||||
QPlatformWindow *createPlatformWindow(QWindow *window) const;
|
||||
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
|
||||
QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE;
|
||||
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE;
|
||||
|
||||
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
|
||||
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
|
||||
QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const Q_DECL_OVERRIDE;
|
||||
|
||||
QPlatformFontDatabase *fontDatabase() const;
|
||||
QPlatformClipboard *clipboard() const;
|
||||
QPlatformInputContext *inputContext() const;
|
||||
QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
|
||||
QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE;
|
||||
QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE;
|
||||
QPlatformServices *services() const Q_DECL_OVERRIDE;
|
||||
|
||||
QVariant styleHint(StyleHint hint) const;
|
||||
QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE;
|
||||
|
||||
QStringList themeNames() const;
|
||||
QPlatformTheme *createPlatformTheme(const QString &name) const;
|
||||
QStringList themeNames() const Q_DECL_OVERRIDE;
|
||||
QPlatformTheme *createPlatformTheme(const QString &name) const Q_DECL_OVERRIDE;
|
||||
|
||||
QAbstractEventDispatcher *createEventDispatcher() const;
|
||||
QPlatformNativeInterface *nativeInterface() const;
|
||||
QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE;
|
||||
QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE;
|
||||
|
||||
QTouchDevice *touchDevice();
|
||||
QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE;
|
||||
@ -86,7 +86,7 @@ public:
|
||||
|
||||
// -- QPlatformNativeInterface --
|
||||
|
||||
void *nativeResourceForWindow(const QByteArray &resource, QWindow *window);
|
||||
void *nativeResourceForWindow(const QByteArray &resource, QWindow *window) Q_DECL_OVERRIDE;
|
||||
|
||||
void setDebugWindowManagement(bool);
|
||||
bool debugWindowManagement() const;
|
||||
|
@ -81,7 +81,7 @@ QIOSIntegration::QIOSIntegration()
|
||||
// QPlatformBackingStore.
|
||||
qApp->setAttribute(Qt::AA_ShareOpenGLContexts, true);
|
||||
// And that context must match the format used for the backingstore's context.
|
||||
QSurfaceFormat fmt;
|
||||
QSurfaceFormat fmt = QSurfaceFormat::defaultFormat();
|
||||
fmt.setDepthBufferSize(16);
|
||||
fmt.setStencilBufferSize(8);
|
||||
QSurfaceFormat::setDefaultFormat(fmt);
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
static id menuActionTarget() { return m_currentMenu ? m_currentMenu->m_menuController : 0; }
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
quintptr m_tag;
|
||||
|
@ -50,17 +50,17 @@ public:
|
||||
QIOSScreen(UIScreen *screen);
|
||||
~QIOSScreen();
|
||||
|
||||
QRect geometry() const;
|
||||
QRect availableGeometry() const;
|
||||
int depth() const;
|
||||
QImage::Format format() const;
|
||||
QSizeF physicalSize() const;
|
||||
QDpi logicalDpi() const;
|
||||
qreal devicePixelRatio() const;
|
||||
QRect geometry() const Q_DECL_OVERRIDE;
|
||||
QRect availableGeometry() const Q_DECL_OVERRIDE;
|
||||
int depth() const Q_DECL_OVERRIDE;
|
||||
QImage::Format format() const Q_DECL_OVERRIDE;
|
||||
QSizeF physicalSize() const Q_DECL_OVERRIDE;
|
||||
QDpi logicalDpi() const Q_DECL_OVERRIDE;
|
||||
qreal devicePixelRatio() const Q_DECL_OVERRIDE;
|
||||
|
||||
Qt::ScreenOrientation nativeOrientation() const;
|
||||
Qt::ScreenOrientation orientation() const;
|
||||
void setOrientationUpdateMask(Qt::ScreenOrientations mask);
|
||||
Qt::ScreenOrientation nativeOrientation() const Q_DECL_OVERRIDE;
|
||||
Qt::ScreenOrientation orientation() const Q_DECL_OVERRIDE;
|
||||
void setOrientationUpdateMask(Qt::ScreenOrientations mask) Q_DECL_OVERRIDE;
|
||||
|
||||
UIScreen *uiScreen() const;
|
||||
UIWindow *uiWindow() const;
|
||||
|
@ -221,6 +221,8 @@
|
||||
self.keyboardType = UIKeyboardTypePhonePad;
|
||||
else if (hints & Qt::ImhLatinOnly)
|
||||
self.keyboardType = UIKeyboardTypeASCIICapable;
|
||||
else if (hints & Qt::ImhPreferNumbers)
|
||||
self.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
|
||||
else
|
||||
self.keyboardType = UIKeyboardTypeDefault;
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
~QIOSTheme();
|
||||
|
||||
const QPalette *palette(Palette type = SystemPalette) const Q_DECL_OVERRIDE;
|
||||
QVariant themeHint(ThemeHint hint) const;
|
||||
QVariant themeHint(ThemeHint hint) const Q_DECL_OVERRIDE;
|
||||
|
||||
QPlatformMenuItem* createPlatformMenuItem() const Q_DECL_OVERRIDE;
|
||||
QPlatformMenu* createPlatformMenu() const Q_DECL_OVERRIDE;
|
||||
@ -55,7 +55,7 @@ public:
|
||||
bool usePlatformNativeDialog(DialogType type) const Q_DECL_OVERRIDE;
|
||||
QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const Q_DECL_OVERRIDE;
|
||||
|
||||
const QFont *font(Font type = SystemFont) const;
|
||||
const QFont *font(Font type = SystemFont) const Q_DECL_OVERRIDE;
|
||||
|
||||
static const char *name;
|
||||
|
||||
|
@ -54,29 +54,29 @@ public:
|
||||
explicit QIOSWindow(QWindow *window);
|
||||
~QIOSWindow();
|
||||
|
||||
void setGeometry(const QRect &rect);
|
||||
void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
|
||||
|
||||
void setWindowState(Qt::WindowState state);
|
||||
void setParent(const QPlatformWindow *window);
|
||||
void handleContentOrientationChange(Qt::ScreenOrientation orientation);
|
||||
void setVisible(bool visible);
|
||||
void setWindowState(Qt::WindowState state) Q_DECL_OVERRIDE;
|
||||
void setParent(const QPlatformWindow *window) Q_DECL_OVERRIDE;
|
||||
void handleContentOrientationChange(Qt::ScreenOrientation orientation) Q_DECL_OVERRIDE;
|
||||
void setVisible(bool visible) Q_DECL_OVERRIDE;
|
||||
void setOpacity(qreal level) Q_DECL_OVERRIDE;
|
||||
|
||||
bool isExposed() const Q_DECL_OVERRIDE;
|
||||
void propagateSizeHints() Q_DECL_OVERRIDE {}
|
||||
|
||||
void raise() { raiseOrLower(true); }
|
||||
void lower() { raiseOrLower(false); }
|
||||
void raise() Q_DECL_OVERRIDE{ raiseOrLower(true); }
|
||||
void lower() Q_DECL_OVERRIDE { raiseOrLower(false); }
|
||||
|
||||
bool shouldAutoActivateWindow() const;
|
||||
void requestActivateWindow();
|
||||
void requestActivateWindow() Q_DECL_OVERRIDE;
|
||||
|
||||
qreal devicePixelRatio() const;
|
||||
qreal devicePixelRatio() const Q_DECL_OVERRIDE;
|
||||
|
||||
bool setMouseGrabEnabled(bool grab) { return grab; }
|
||||
bool setKeyboardGrabEnabled(bool grab) { return grab; }
|
||||
bool setMouseGrabEnabled(bool grab) Q_DECL_OVERRIDE { return grab; }
|
||||
bool setKeyboardGrabEnabled(bool grab) Q_DECL_OVERRIDE { return grab; }
|
||||
|
||||
WId winId() const { return WId(m_view); };
|
||||
WId winId() const Q_DECL_OVERRIDE { return WId(m_view); }
|
||||
|
||||
void clearAccessibleCache();
|
||||
|
||||
|
@ -689,7 +689,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accChild(VARIANT varChildI
|
||||
return E_INVALIDARG;
|
||||
|
||||
QAccessibleInterface *acc = childPointer(accessible, varChildID);
|
||||
if (acc) {
|
||||
if (acc && acc->isValid()) {
|
||||
*ppdispChild = QWindowsAccessibility::wrap(acc);
|
||||
return S_OK;
|
||||
}
|
||||
@ -778,7 +778,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accDescription(VARIANT var
|
||||
QString descr;
|
||||
if (varID.lVal) {
|
||||
QAccessibleInterface *child = childPointer(accessible, varID);
|
||||
if (!child)
|
||||
if (!child || !child->isValid())
|
||||
return E_FAIL;
|
||||
descr = child->text(QAccessible::Description);
|
||||
} else {
|
||||
@ -803,7 +803,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accHelp(VARIANT varID, BST
|
||||
QString help;
|
||||
if (varID.lVal) {
|
||||
QAccessibleInterface *child = childPointer(accessible, varID);
|
||||
if (!child)
|
||||
if (!child || !child->isValid())
|
||||
return E_FAIL;
|
||||
help = child->text(QAccessible::Help);
|
||||
} else {
|
||||
@ -862,7 +862,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accName(VARIANT varID, BST
|
||||
QString name;
|
||||
if (varID.lVal) {
|
||||
QAccessibleInterface *child = childPointer(accessible, varID);
|
||||
if (!child)
|
||||
if (!child || !child->isValid())
|
||||
return E_FAIL;
|
||||
name = child->text(QAccessible::Name);
|
||||
if (name.isEmpty()) {
|
||||
@ -910,7 +910,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accRole(VARIANT varID, VAR
|
||||
QAccessible::Role role;
|
||||
if (varID.lVal) {
|
||||
QAccessibleInterface *child = childPointer(accessible, varID);
|
||||
if (!child)
|
||||
if (!child || !child->isValid())
|
||||
return E_FAIL;
|
||||
role = child->role();
|
||||
} else {
|
||||
@ -947,7 +947,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accState(VARIANT varID, VA
|
||||
QAccessible::State state;
|
||||
if (varID.lVal) {
|
||||
QAccessibleInterface *child = childPointer(accessible, varID);
|
||||
if (!child)
|
||||
if (!child || !child->isValid())
|
||||
return E_FAIL;
|
||||
state = child->state();
|
||||
} else {
|
||||
|
@ -69,25 +69,28 @@ static const char formatTextHtmlC[] = "text/html";
|
||||
\ingroup qt-lighthouse-win
|
||||
*/
|
||||
|
||||
QDebug operator<<(QDebug d, const QMimeData &m)
|
||||
static QDebug operator<<(QDebug d, const QMimeData *mimeData)
|
||||
{
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace();
|
||||
const QStringList formats = m.formats();
|
||||
d << "QMimeData: " << formats.join(QStringLiteral(", ")) << '\n'
|
||||
<< " Text=" << m.hasText() << " HTML=" << m.hasHtml()
|
||||
<< " Color=" << m.hasColor() << " Image=" << m.hasImage()
|
||||
<< " URLs=" << m.hasUrls() << '\n';
|
||||
if (m.hasText())
|
||||
d << " Text: '" << m.text() << "'\n";
|
||||
if (m.hasHtml())
|
||||
d << " HTML: '" << m.html() << "'\n";
|
||||
if (m.hasColor())
|
||||
d << " Color: " << qvariant_cast<QColor>(m.colorData()) << '\n';
|
||||
if (m.hasImage())
|
||||
d << " Image: " << qvariant_cast<QImage>(m.imageData()).size() << '\n';
|
||||
if (m.hasUrls())
|
||||
d << " URLs: " << m.urls() << '\n';
|
||||
d << "QMimeData(";
|
||||
if (mimeData) {
|
||||
const QStringList formats = mimeData->formats();
|
||||
d << "formats=" << formats.join(QStringLiteral(", "));
|
||||
if (mimeData->hasText())
|
||||
d << ", text=" << mimeData->text();
|
||||
if (mimeData->hasHtml())
|
||||
d << ", html=" << mimeData->html();
|
||||
if (mimeData->hasColor())
|
||||
d << ", colorData=" << qvariant_cast<QColor>(mimeData->colorData());
|
||||
if (mimeData->hasImage())
|
||||
d << ", imageData=" << qvariant_cast<QImage>(mimeData->imageData());
|
||||
if (mimeData->hasUrls())
|
||||
d << ", urls=" << mimeData->urls();
|
||||
} else {
|
||||
d << '0';
|
||||
}
|
||||
d << ')';
|
||||
return d;
|
||||
}
|
||||
|
||||
@ -297,7 +300,7 @@ QMimeData *QWindowsClipboard::mimeData(QClipboard::Mode mode)
|
||||
|
||||
void QWindowsClipboard::setMimeData(QMimeData *mimeData, QClipboard::Mode mode)
|
||||
{
|
||||
qCDebug(lcQpaMime) << __FUNCTION__ << mode << *mimeData;
|
||||
qCDebug(lcQpaMime) << __FUNCTION__ << mode << mimeData;
|
||||
if (mode != QClipboard::Clipboard)
|
||||
return;
|
||||
|
||||
|
@ -918,7 +918,11 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
||||
case QtWindows::InputMethodRequest:
|
||||
return QWindowsInputContext::instance()->handleIME_Request(wParam, lParam, result);
|
||||
case QtWindows::GestureEvent:
|
||||
return d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
#if !defined(Q_OS_WINCE) && !defined(QT_NO_SESSIONMANAGER)
|
||||
return platformSessionManager()->isInteractionBlocked() ? true : d->m_mouseHandler.translateGestureEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
#else
|
||||
return d->m_mouseHandler.translateGestureEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
#endif
|
||||
case QtWindows::InputMethodOpenCandidateWindowEvent:
|
||||
case QtWindows::InputMethodCloseCandidateWindowEvent:
|
||||
// TODO: Release/regrab mouse if a popup has mouse grab.
|
||||
|
@ -933,7 +933,7 @@ static bool addFontToDatabase(const QString &familyName, uchar charSet,
|
||||
}
|
||||
|
||||
static int QT_WIN_CALLBACK storeFont(ENUMLOGFONTEX* f, NEWTEXTMETRICEX *textmetric,
|
||||
int type, LPARAM)
|
||||
int type, LPARAM registerAlias)
|
||||
{
|
||||
const QString familyName = QString::fromWCharArray(f->elfLogFont.lfFaceName);
|
||||
const uchar charSet = f->elfLogFont.lfCharSet;
|
||||
@ -943,13 +943,13 @@ static int QT_WIN_CALLBACK storeFont(ENUMLOGFONTEX* f, NEWTEXTMETRICEX *textmetr
|
||||
// NEWTEXTMETRICEX is a NEWTEXTMETRIC, which according to the documentation is
|
||||
// identical to a TEXTMETRIC except for the last four members, which we don't use
|
||||
// anyway
|
||||
addFontToDatabase(familyName, charSet, (TEXTMETRIC *)textmetric, &signature, type, false);
|
||||
addFontToDatabase(familyName, charSet, (TEXTMETRIC *)textmetric, &signature, type, registerAlias);
|
||||
|
||||
// keep on enumerating
|
||||
return 1;
|
||||
}
|
||||
|
||||
void QWindowsFontDatabase::populateFamily(const QString &familyName)
|
||||
void QWindowsFontDatabase::populateFamily(const QString &familyName, bool registerAlias)
|
||||
{
|
||||
qCDebug(lcQpaFonts) << familyName;
|
||||
if (familyName.size() >= LF_FACESIZE) {
|
||||
@ -962,10 +962,15 @@ void QWindowsFontDatabase::populateFamily(const QString &familyName)
|
||||
familyName.toWCharArray(lf.lfFaceName);
|
||||
lf.lfFaceName[familyName.size()] = 0;
|
||||
lf.lfPitchAndFamily = 0;
|
||||
EnumFontFamiliesEx(dummy, &lf, (FONTENUMPROC)storeFont, 0, 0);
|
||||
EnumFontFamiliesEx(dummy, &lf, (FONTENUMPROC)storeFont, (LPARAM)registerAlias, 0);
|
||||
ReleaseDC(0, dummy);
|
||||
}
|
||||
|
||||
void QWindowsFontDatabase::populateFamily(const QString &familyName)
|
||||
{
|
||||
populateFamily(familyName, false);
|
||||
}
|
||||
|
||||
namespace {
|
||||
// Context for enumerating system fonts, records whether the default font has been encountered,
|
||||
// which is normally not enumerated by EnumFontFamiliesEx().
|
||||
@ -1075,11 +1080,7 @@ QWindowsFontDatabase::~QWindowsFontDatabase()
|
||||
|
||||
QFontEngineMulti *QWindowsFontDatabase::fontEngineMulti(QFontEngine *fontEngine, QChar::Script script)
|
||||
{
|
||||
if (script == QChar::Script_Common)
|
||||
return new QWindowsMultiFontEngine(fontEngine, script);
|
||||
// ### as long as fallbacksForFamily() does not take script parameter into account,
|
||||
// prefer QFontEngineMulti's loadEngine() implementation for complex scripts
|
||||
return QPlatformFontDatabase::fontEngineMulti(fontEngine, script);
|
||||
return new QWindowsMultiFontEngine(fontEngine, script);
|
||||
}
|
||||
|
||||
QFontEngine * QWindowsFontDatabase::fontEngine(const QFontDef &fontDef, void *handle)
|
||||
@ -1382,7 +1383,7 @@ QStringList QWindowsFontDatabase::addApplicationFont(const QByteArray &fontData,
|
||||
|
||||
// Fonts based on files are added via populate, as they will show up in font enumeration.
|
||||
for (int j = 0; j < families.count(); ++j)
|
||||
populateFamily(families.at(j));
|
||||
populateFamily(families.at(j), true);
|
||||
}
|
||||
|
||||
m_applicationFonts << font;
|
||||
@ -1661,11 +1662,10 @@ QString QWindowsFontDatabase::familyForStyleHint(QFont::StyleHint styleHint)
|
||||
|
||||
QStringList QWindowsFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
|
||||
{
|
||||
QStringList result = QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script);
|
||||
if (!result.isEmpty())
|
||||
return result;
|
||||
QStringList result;
|
||||
result.append(QWindowsFontDatabase::familyForStyleHint(styleHint));
|
||||
result.append(QWindowsFontDatabase::extraTryFontsForFamily(family));
|
||||
result.append(QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script));
|
||||
|
||||
qCDebug(lcQpaFonts) << __FUNCTION__ << family << style << styleHint
|
||||
<< script << result;
|
||||
|
@ -100,6 +100,7 @@ public:
|
||||
static QString familyForStyleHint(QFont::StyleHint styleHint);
|
||||
|
||||
private:
|
||||
void populateFamily(const QString &familyName, bool registerAlias);
|
||||
void removeApplicationFonts();
|
||||
|
||||
struct WinApplicationFont {
|
||||
|
@ -661,9 +661,7 @@ QFontEngine *QWindowsFontDatabaseFT::fontEngine(const QByteArray &fontData, qrea
|
||||
|
||||
QStringList QWindowsFontDatabaseFT::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
|
||||
{
|
||||
QStringList result = QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script);
|
||||
if (!result.isEmpty())
|
||||
return result;
|
||||
QStringList result;
|
||||
|
||||
result.append(QWindowsFontDatabase::familyForStyleHint(styleHint));
|
||||
|
||||
@ -679,6 +677,8 @@ QStringList QWindowsFontDatabaseFT::fallbacksForFamily(const QString &family, QF
|
||||
|
||||
result.append(QWindowsFontDatabase::extraTryFontsForFamily(family));
|
||||
|
||||
result.append(QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script));
|
||||
|
||||
qCDebug(lcQpaFonts) << __FUNCTION__ << family << style << styleHint
|
||||
<< script << result;
|
||||
|
||||
|
@ -487,7 +487,7 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co
|
||||
switch (hint) {
|
||||
case QPlatformIntegration::CursorFlashTime:
|
||||
if (const unsigned timeMS = GetCaretBlinkTime())
|
||||
return QVariant(int(timeMS) * 2);
|
||||
return QVariant(timeMS != INFINITE ? int(timeMS) * 2 : 0);
|
||||
break;
|
||||
#ifdef SPI_GETKEYBOARDSPEED
|
||||
case KeyboardAutoRepeatRate:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user