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/
|
Contact: http://www.qt.io/licensing/
|
||||||
|
|
||||||
You may use, distribute and copy the Qt GUI Toolkit under the terms of
|
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
|
if not exist %QTSRC%.gitignore goto sconf
|
||||||
echo Please wait while bootstrapping configure ...
|
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%" == "" (
|
if "%perl.exe%" == "" (
|
||||||
echo Perl not found in PATH. Aborting. >&2
|
echo Perl not found in PATH. Aborting. >&2
|
||||||
@ -57,6 +57,9 @@ if not exist tools\configure (
|
|||||||
cd tools\configure
|
cd tools\configure
|
||||||
if errorlevel 1 goto exit
|
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 #### Generated by configure.bat - DO NOT EDIT! ####> Makefile
|
||||||
echo/>> 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
|
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.
|
rem This must have a trailing space.
|
||||||
echo QTSRC = %QTSRC% >> Makefile
|
echo QTSRC = %QTSRC% >> Makefile
|
||||||
set tmpl=win32
|
set tmpl=win32
|
||||||
set make=nmake
|
|
||||||
) else if not "%cl.exe%" == "" (
|
) else if not "%cl.exe%" == "" (
|
||||||
echo CXX = cl>>Makefile
|
echo CXX = cl>>Makefile
|
||||||
echo EXTRA_CXXFLAGS =>>Makefile
|
echo EXTRA_CXXFLAGS =>>Makefile
|
||||||
rem This must have a trailing space.
|
rem This must have a trailing space.
|
||||||
echo QTSRC = %QTSRC% >> Makefile
|
echo QTSRC = %QTSRC% >> Makefile
|
||||||
set tmpl=win32
|
set tmpl=win32
|
||||||
set make=nmake
|
|
||||||
) else if not "%g++.exe%" == "" (
|
) else if not "%g++.exe%" == "" (
|
||||||
echo CXX = g++>>Makefile
|
echo CXX = g++>>Makefile
|
||||||
echo EXTRA_CXXFLAGS =>>Makefile
|
echo EXTRA_CXXFLAGS =>>Makefile
|
||||||
|
@ -157,4 +157,5 @@ Cpp.ignoredirectives += \
|
|||||||
QT_WARNING_DISABLE_GCC \
|
QT_WARNING_DISABLE_GCC \
|
||||||
QT_WARNING_DISABLE_INTEL \
|
QT_WARNING_DISABLE_INTEL \
|
||||||
QT_WARNING_DISABLE_MSVC \
|
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_WARN_ON += -w44456 -w44457 -w44458
|
||||||
QMAKE_CFLAGS_AVX2 = -arch:AVX2
|
QMAKE_CFLAGS_AVX2 = -arch:AVX2
|
||||||
QMAKE_CXXFLAGS += -Zc:strictStrings
|
QMAKE_CXXFLAGS += -Zc:strictStrings
|
||||||
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458
|
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577
|
||||||
}
|
}
|
||||||
|
|
||||||
unset(MSC_VER)
|
unset(MSC_VER)
|
||||||
|
@ -41,24 +41,24 @@ macx-xcode {
|
|||||||
|
|
||||||
# Set up default 4-inch iPhone/iPod launch image so that our apps
|
# Set up default 4-inch iPhone/iPod launch image so that our apps
|
||||||
# support the full screen resolution of those devices.
|
# support the full screen resolution of those devices.
|
||||||
launch_image = Default-568h@2x.png
|
qmake_launch_image = Default-568h@2x.png
|
||||||
copy_image.input = $$QMAKESPEC/$$launch_image
|
qmake_copy_image.input = $$QMAKESPEC/$$qmake_launch_image
|
||||||
copy_image.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_image
|
qmake_copy_image.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_image
|
||||||
copy_image.CONFIG = verbatim
|
qmake_copy_image.CONFIG = verbatim
|
||||||
QMAKE_SUBSTITUTES += copy_image
|
QMAKE_SUBSTITUTES += qmake_copy_image
|
||||||
launch_images.files = $$copy_image.output
|
qmake_launch_images.files = $$qmake_copy_image.output
|
||||||
QMAKE_BUNDLE_DATA += launch_images
|
QMAKE_BUNDLE_DATA += qmake_launch_images
|
||||||
|
|
||||||
lessThan(QMAKE_XCODE_VERSION, "6.0") {
|
lessThan(QMAKE_XCODE_VERSION, "6.0") {
|
||||||
warning("You need to update Xcode to version 6 or newer to fully support iPhone6/6+")
|
warning("You need to update Xcode to version 6 or newer to fully support iPhone6/6+")
|
||||||
} else {
|
} else {
|
||||||
# Set up default LaunchScreen to support iPhone6/6+
|
# Set up default LaunchScreen to support iPhone6/6+
|
||||||
launch_screen = LaunchScreen.xib
|
qmake_launch_screen = LaunchScreen.xib
|
||||||
copy_launch_screen.input = $$QMAKESPEC/$$launch_screen
|
qmake_copy_launch_screen.input = $$QMAKESPEC/$$qmake_launch_screen
|
||||||
copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_screen
|
qmake_copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_screen
|
||||||
QMAKE_SUBSTITUTES += copy_launch_screen
|
QMAKE_SUBSTITUTES += qmake_copy_launch_screen
|
||||||
launch_screens.files = $$copy_launch_screen.output
|
qmake_launch_screens.files = $$qmake_copy_launch_screen.output
|
||||||
QMAKE_BUNDLE_DATA += launch_screens
|
QMAKE_BUNDLE_DATA += qmake_launch_screens
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2197,6 +2197,10 @@
|
|||||||
|
|
||||||
\snippet code/doc_src_qmake-manual.pro 47
|
\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
|
\section1 QTPLUGIN
|
||||||
|
|
||||||
Specifies a list of names of static Qt plugins that are to be
|
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__
|
#ifdef __linux__
|
||||||
# define HAVE_WAIT4 1
|
# 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>
|
# include <sys/eventfd.h>
|
||||||
# define HAVE_EVENTFD 1
|
# define HAVE_EVENTFD 1
|
||||||
# endif
|
# 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
|
# define HAVE_PIPE2 1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@ -56,6 +58,10 @@
|
|||||||
#if _POSIX_VERSION-0 >= 200809L || _XOPEN_VERSION-0 >= 500
|
#if _POSIX_VERSION-0 >= 200809L || _XOPEN_VERSION-0 >= 500
|
||||||
# define HAVE_WAITID 1
|
# define HAVE_WAITID 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__FreeBSD__)
|
||||||
|
# define HAVE_PIPE2 1
|
||||||
|
#endif
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) || \
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) || \
|
||||||
defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
||||||
# define HAVE_WAIT4 1
|
# 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)
|
byteSwap(UWORD32 *buf, unsigned words)
|
||||||
{
|
{
|
||||||
const quint32 byteOrderTest = 0x1;
|
const quint32 byteOrderTest = 0x1;
|
||||||
if (((char *)&byteOrderTest)[0] == 0) {
|
if (((const char *)&byteOrderTest)[0] == 0) {
|
||||||
md5byte *p = (md5byte *)buf;
|
md5byte *p = (md5byte *)buf;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -760,12 +760,6 @@ public class QtActivityDelegate
|
|||||||
|
|
||||||
if (null == m_surfaces)
|
if (null == m_surfaces)
|
||||||
onCreate(null);
|
onCreate(null);
|
||||||
String nativeLibraryDir = QtNativeLibrariesDir.nativeLibrariesDir(m_activity);
|
|
||||||
QtNative.startApplication(m_applicationParameters,
|
|
||||||
m_environmentVariables,
|
|
||||||
m_mainLib,
|
|
||||||
nativeLibraryDir);
|
|
||||||
m_started = true;
|
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -781,14 +775,26 @@ public class QtActivityDelegate
|
|||||||
public void onCreate(Bundle savedInstanceState)
|
public void onCreate(Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
m_quitApp = true;
|
m_quitApp = true;
|
||||||
|
Runnable startApplication = null;
|
||||||
if (null == savedInstanceState) {
|
if (null == savedInstanceState) {
|
||||||
DisplayMetrics metrics = new DisplayMetrics();
|
startApplication = new Runnable() {
|
||||||
m_activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
@Override
|
||||||
QtNative.setApplicationDisplayMetrics(metrics.widthPixels, metrics.heightPixels,
|
public void run() {
|
||||||
0, 0,
|
try {
|
||||||
metrics.xdpi, metrics.ydpi, metrics.scaledDensity);
|
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_editText = new QtEditText(m_activity, this);
|
||||||
m_imm = (InputMethodManager)m_activity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
m_imm = (InputMethodManager)m_activity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
m_surfaces = new HashMap<Integer, QtSurface>();
|
m_surfaces = new HashMap<Integer, QtSurface>();
|
||||||
|
@ -43,9 +43,11 @@ import android.view.ViewGroup;
|
|||||||
|
|
||||||
public class QtLayout extends ViewGroup
|
public class QtLayout extends ViewGroup
|
||||||
{
|
{
|
||||||
public QtLayout(Context context)
|
private Runnable m_startApplicationRunnable;
|
||||||
|
public QtLayout(Context context, Runnable startRunnable)
|
||||||
{
|
{
|
||||||
super(context);
|
super(context);
|
||||||
|
m_startApplicationRunnable = startRunnable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public QtLayout(Context context, AttributeSet attrs)
|
public QtLayout(Context context, AttributeSet attrs)
|
||||||
@ -65,6 +67,10 @@ public class QtLayout extends ViewGroup
|
|||||||
((Activity) getContext()).getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
((Activity) getContext()).getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||||
QtNative.setApplicationDisplayMetrics(metrics.widthPixels,
|
QtNative.setApplicationDisplayMetrics(metrics.widthPixels,
|
||||||
metrics.heightPixels, w, h, metrics.xdpi, metrics.ydpi, metrics.scaledDensity);
|
metrics.heightPixels, w, h, metrics.xdpi, metrics.ydpi, metrics.scaledDensity);
|
||||||
|
if (m_startApplicationRunnable != null) {
|
||||||
|
m_startApplicationRunnable.run();
|
||||||
|
m_startApplicationRunnable = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -328,10 +328,10 @@ template <typename X> struct QAtomicOps
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ATOMIC_VAR_INIT
|
#if defined(Q_COMPILER_CONSTEXPR) && defined(Q_COMPILER_DEFAULT_MEMBERS) && defined(Q_COMPILER_DELETE_MEMBERS)
|
||||||
# define Q_BASIC_ATOMIC_INITIALIZER(a) { ATOMIC_VAR_INIT(a) }
|
# define Q_BASIC_ATOMIC_INITIALIZER(a) { a }
|
||||||
#else
|
#else
|
||||||
# define Q_BASIC_ATOMIC_INITIALIZER(a) { {a} }
|
# define Q_BASIC_ATOMIC_INITIALIZER(a) { ATOMIC_VAR_INIT(a) }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -51,8 +51,8 @@ static inline bool simdEncodeAscii(uchar *&dst, const ushort *&nextAscii, const
|
|||||||
{
|
{
|
||||||
// do sixteen characters at a time
|
// do sixteen characters at a time
|
||||||
for ( ; end - src >= 16; src += 16, dst += 16) {
|
for ( ; end - src >= 16; src += 16, dst += 16) {
|
||||||
__m128i data1 = _mm_loadu_si128((__m128i*)src);
|
__m128i data1 = _mm_loadu_si128((const __m128i*)src);
|
||||||
__m128i data2 = _mm_loadu_si128(1+(__m128i*)src);
|
__m128i data2 = _mm_loadu_si128(1+(const __m128i*)src);
|
||||||
|
|
||||||
|
|
||||||
// check if everything is ASCII
|
// 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
|
// do sixteen characters at a time
|
||||||
for ( ; end - src >= 16; src += 16, dst += 16) {
|
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__
|
#ifdef __AVX2__
|
||||||
const int BitSpacing = 2;
|
const int BitSpacing = 2;
|
||||||
@ -390,7 +390,7 @@ QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::Converte
|
|||||||
*dst++ = QChar::ReplacementCharacter;
|
*dst++ = QChar::ReplacementCharacter;
|
||||||
}
|
}
|
||||||
|
|
||||||
result.truncate(dst - (ushort *)result.unicode());
|
result.truncate(dst - (const ushort *)result.unicode());
|
||||||
if (state) {
|
if (state) {
|
||||||
state->invalidChars += invalid;
|
state->invalidChars += invalid;
|
||||||
if (headerdone)
|
if (headerdone)
|
||||||
@ -469,7 +469,7 @@ QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::Convert
|
|||||||
endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
|
endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
|
||||||
|
|
||||||
QString result(len, Qt::Uninitialized); // worst case
|
QString result(len, Qt::Uninitialized); // worst case
|
||||||
QChar *qch = (QChar *)result.unicode();
|
QChar *qch = (QChar *)result.data();
|
||||||
while (len--) {
|
while (len--) {
|
||||||
if (half) {
|
if (half) {
|
||||||
QChar ch;
|
QChar ch;
|
||||||
@ -600,7 +600,7 @@ QString QUtf32::convertToUnicode(const char *chars, int len, QTextCodec::Convert
|
|||||||
|
|
||||||
QString result;
|
QString result;
|
||||||
result.resize((num + len) >> 2 << 1); // worst case
|
result.resize((num + len) >> 2 << 1); // worst case
|
||||||
QChar *qch = (QChar *)result.unicode();
|
QChar *qch = (QChar *)result.data();
|
||||||
|
|
||||||
const char *end = chars + len;
|
const char *end = chars + len;
|
||||||
while (chars < end) {
|
while (chars < end) {
|
||||||
|
@ -572,6 +572,9 @@
|
|||||||
# if _MSC_VER < 1900
|
# if _MSC_VER < 1900
|
||||||
// ICC disables unicode string support when compatibility mode with MSVC 2013 or lower is active
|
// ICC disables unicode string support when compatibility mode with MSVC 2013 or lower is active
|
||||||
# undef Q_COMPILER_UNICODE_STRINGS
|
# 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
|
# 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_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_INTEL(number)
|
||||||
# define QT_WARNING_DISABLE_MSVC(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_PUSH QT_DO_PRAGMA(GCC diagnostic push)
|
||||||
# define QT_WARNING_POP QT_DO_PRAGMA(GCC diagnostic pop)
|
# define QT_WARNING_POP QT_DO_PRAGMA(GCC diagnostic pop)
|
||||||
# define QT_WARNING_DISABLE_GCC(text) QT_DO_PRAGMA(GCC diagnostic ignored text)
|
# define QT_WARNING_DISABLE_GCC(text) QT_DO_PRAGMA(GCC diagnostic ignored text)
|
||||||
|
@ -1178,7 +1178,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
|||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Defined on Darwin-based operating systems distributed by Apple, which
|
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>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Defined on all supported versions of Windows. That is, if
|
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) {
|
} else if (osver.dwMajorVersion == 10 && osver.dwMinorVersion == 0) {
|
||||||
winver = QSysInfo::WV_WINDOWS10;
|
winver = QSysInfo::WV_WINDOWS10;
|
||||||
} else {
|
} else {
|
||||||
qWarning("Qt: Untested Windows version %d.%d detected!",
|
|
||||||
int(osver.dwMajorVersion), int(osver.dwMinorVersion));
|
|
||||||
winver = QSysInfo::WV_NT_based;
|
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
|
#ifndef QT_NO_QOBJECT
|
||||||
d->writtenSinceLastEmit += len;
|
d->writtenSinceLastEmit += len;
|
||||||
|
@ -174,6 +174,16 @@ void QDebug::putUcs4(uint ucs4)
|
|||||||
maybeQuote('\'');
|
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>
|
template <typename Char>
|
||||||
static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, int length, bool isUnicode = true)
|
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)) {
|
if (sizeof(Char) == sizeof(QChar)) {
|
||||||
|
// Surrogate characters are category Cs (Other_Surrogate), so isPrintable = false for them
|
||||||
int runLength = 0;
|
int runLength = 0;
|
||||||
while (p + runLength != end &&
|
while (p + runLength != end &&
|
||||||
p[runLength] < 0x7f && p[runLength] >= 0x20 && p[runLength] != '\\' && p[runLength] != '"')
|
isPrintable(p[runLength]) && p[runLength] != '\\' && p[runLength] != '"')
|
||||||
++runLength;
|
++runLength;
|
||||||
if (runLength) {
|
if (runLength) {
|
||||||
d->write(reinterpret_cast<const QChar *>(p), runLength);
|
d->write(reinterpret_cast<const QChar *>(p), runLength);
|
||||||
p += runLength - 1;
|
p += runLength - 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (*p < 0x7f && *p >= 0x20 && *p != '\\' && *p != '"') {
|
} else if (isPrintable(*p) && *p != '\\' && *p != '"') {
|
||||||
QChar c = QLatin1Char(*p);
|
QChar c = QLatin1Char(*p);
|
||||||
d->write(&c, 1);
|
d->write(&c, 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// print as an escape sequence
|
// print as an escape sequence (maybe, see below for surrogate pairs)
|
||||||
int buflen = 2;
|
int buflen = 2;
|
||||||
ushort buf[sizeof "\\U12345678" - 1];
|
ushort buf[sizeof "\\U12345678" - 1];
|
||||||
buf[0] = '\\';
|
buf[0] = '\\';
|
||||||
@ -248,17 +259,23 @@ static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, in
|
|||||||
if ((p + 1) != end && QChar::isLowSurrogate(p[1])) {
|
if ((p + 1) != end && QChar::isLowSurrogate(p[1])) {
|
||||||
// properly-paired surrogates
|
// properly-paired surrogates
|
||||||
uint ucs4 = QChar::surrogateToUcs4(*p, p[1]);
|
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;
|
++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;
|
break;
|
||||||
}
|
}
|
||||||
// improperly-paired surrogates, fall through
|
// improperly-paired surrogates, fall through
|
||||||
@ -409,6 +426,9 @@ QDebug &QDebug::resetFormat()
|
|||||||
Disables automatic insertion of quotation characters around QChar, QString and QByteArray
|
Disables automatic insertion of quotation characters around QChar, QString and QByteArray
|
||||||
contents and returns a reference to the stream.
|
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()
|
\sa quote(), maybeQuote()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -454,7 +474,11 @@ QDebug &QDebug::resetFormat()
|
|||||||
\fn QDebug &QDebug::operator<<(QChar t)
|
\fn QDebug &QDebug::operator<<(QChar t)
|
||||||
|
|
||||||
Writes the character, \a t, to the stream and returns a reference to the
|
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)
|
\fn QDebug &QDebug::operator<<(const char *s)
|
||||||
|
|
||||||
Writes the '\\0'-terminated string, \a s, to the stream and returns a
|
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)
|
\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)
|
\fn QDebug &QDebug::operator<<(const QStringRef &s)
|
||||||
|
|
||||||
Writes the string reference, \a s, to the stream and returns a reference to
|
Writes the string, \a s, to the stream and returns a reference to the
|
||||||
the stream.
|
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)
|
\fn QDebug &QDebug::operator<<(QLatin1String s)
|
||||||
|
|
||||||
Writes the Latin1-encoded string, \a s, to the stream and returns a reference
|
Writes the string, \a s, to the stream and returns a reference to the
|
||||||
to the stream.
|
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)
|
\fn QDebug &QDebug::operator<<(const QByteArray &b)
|
||||||
|
|
||||||
Writes the byte array, \a b, to the stream and returns a reference to the
|
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<
|
inline typename QtPrivate::QEnableIf<
|
||||||
QtPrivate::IsQEnumHelper<T>::Value || QtPrivate::IsQEnumHelper<QFlags<T> >::Value,
|
QtPrivate::IsQEnumHelper<T>::Value || QtPrivate::IsQEnumHelper<QFlags<T> >::Value,
|
||||||
QDebug>::Type
|
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 QMetaObject *obj = qt_getEnumMetaObject(T());
|
||||||
const char *name = qt_getEnumName(T());
|
const char *name = qt_getEnumName(T());
|
||||||
@ -304,10 +304,10 @@ template <class T>
|
|||||||
inline typename QtPrivate::QEnableIf<
|
inline typename QtPrivate::QEnableIf<
|
||||||
!QtPrivate::IsQEnumHelper<T>::Value && !QtPrivate::IsQEnumHelper<QFlags<T> >::Value,
|
!QtPrivate::IsQEnumHelper<T>::Value && !QtPrivate::IsQEnumHelper<QFlags<T> >::Value,
|
||||||
QDebug>::Type
|
QDebug>::Type
|
||||||
operator<<(QDebug debug, const QFlags<T> &flags)
|
qt_QMetaEnum_flagDebugOperator_helper(QDebug debug, const QFlags<T> &flags)
|
||||||
#else // !QT_NO_QOBJECT
|
#else // !QT_NO_QOBJECT
|
||||||
template <class T>
|
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
|
#endif
|
||||||
{
|
{
|
||||||
QDebugStateSaver saver(debug);
|
QDebugStateSaver saver(debug);
|
||||||
@ -327,6 +327,14 @@ inline QDebug operator<<(QDebug debug, const QFlags<T> &flags)
|
|||||||
return debug;
|
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
|
#ifdef Q_OS_MAC
|
||||||
|
|
||||||
// We provide QDebug stream operators for commonly used Core Foundation
|
// 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);
|
return feof(d->fh);
|
||||||
|
|
||||||
if (extension == MapExtension) {
|
if (extension == MapExtension) {
|
||||||
const MapExtensionOption *options = (MapExtensionOption*)(option);
|
const MapExtensionOption *options = (const MapExtensionOption*)(option);
|
||||||
MapExtensionReturn *returnValue = static_cast<MapExtensionReturn*>(output);
|
MapExtensionReturn *returnValue = static_cast<MapExtensionReturn*>(output);
|
||||||
returnValue->address = d->map(options->offset, options->size, options->flags);
|
returnValue->address = d->map(options->offset, options->size, options->flags);
|
||||||
return (returnValue->address != 0);
|
return (returnValue->address != 0);
|
||||||
}
|
}
|
||||||
if (extension == UnMapExtension) {
|
if (extension == UnMapExtension) {
|
||||||
UnMapExtensionOption *options = (UnMapExtensionOption*)option;
|
const UnMapExtensionOption *options = (const UnMapExtensionOption*)option;
|
||||||
return d->unmap(options->address);
|
return d->unmap(options->address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,10 +398,12 @@ void QLoggingRegistry::defaultCategoryFilter(QLoggingCategory *cat)
|
|||||||
Q_ASSERT(reg->categories.contains(cat));
|
Q_ASSERT(reg->categories.contains(cat));
|
||||||
QtMsgType enableForLevel = reg->categories.value(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 debug = (enableForLevel == QtDebugMsg);
|
||||||
bool info = (enableForLevel <= QtInfoMsg);
|
bool info = debug || (enableForLevel == QtInfoMsg);
|
||||||
bool warning = (enableForLevel <= QtWarningMsg);
|
bool warning = info || (enableForLevel == QtWarningMsg);
|
||||||
bool critical = (enableForLevel <= QtCriticalMsg);
|
bool critical = warning || (enableForLevel == QtCriticalMsg);
|
||||||
|
|
||||||
// hard-wired implementation of
|
// hard-wired implementation of
|
||||||
// qt.*.debug=false
|
// qt.*.debug=false
|
||||||
|
@ -2122,6 +2122,13 @@ void QProcess::start(const QString &program, const QStringList &arguments, OpenM
|
|||||||
qWarning("QProcess::start: Process is already running");
|
qWarning("QProcess::start: Process is already running");
|
||||||
return;
|
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->program = program;
|
||||||
d->arguments = arguments;
|
d->arguments = arguments;
|
||||||
@ -2146,7 +2153,10 @@ void QProcess::start(OpenMode mode)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (d->program.isEmpty()) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -956,7 +956,7 @@ public:
|
|||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
delete [] (uchar *)mappingBuffer();
|
delete [] mappingBuffer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QString mappingFile() const { return fileName; }
|
QString mappingFile() const { return fileName; }
|
||||||
@ -1450,13 +1450,13 @@ bool QResourceFileEngine::extension(Extension extension, const ExtensionOption *
|
|||||||
{
|
{
|
||||||
Q_D(QResourceFileEngine);
|
Q_D(QResourceFileEngine);
|
||||||
if (extension == MapExtension) {
|
if (extension == MapExtension) {
|
||||||
const MapExtensionOption *options = (MapExtensionOption*)(option);
|
const MapExtensionOption *options = (const MapExtensionOption*)(option);
|
||||||
MapExtensionReturn *returnValue = static_cast<MapExtensionReturn*>(output);
|
MapExtensionReturn *returnValue = static_cast<MapExtensionReturn*>(output);
|
||||||
returnValue->address = d->map(options->offset, options->size, options->flags);
|
returnValue->address = d->map(options->offset, options->size, options->flags);
|
||||||
return (returnValue->address != 0);
|
return (returnValue->address != 0);
|
||||||
}
|
}
|
||||||
if (extension == UnMapExtension) {
|
if (extension == UnMapExtension) {
|
||||||
UnMapExtensionOption *options = (UnMapExtensionOption*)option;
|
const UnMapExtensionOption *options = (const UnMapExtensionOption*)option;
|
||||||
return d->unmap(options->address);
|
return d->unmap(options->address);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1744,13 +1744,19 @@ const QItemSelection QItemSelectionModel::selection() const
|
|||||||
|
|
||||||
\property QItemSelectionModel::selectedIndexes
|
\property QItemSelectionModel::selectedIndexes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\since 5.5
|
||||||
|
|
||||||
|
\property QItemSelectionModel::selection
|
||||||
|
\internal
|
||||||
|
*/
|
||||||
/*!
|
/*!
|
||||||
\since 5.5
|
\since 5.5
|
||||||
|
|
||||||
\property QItemSelectionModel::model
|
\property QItemSelectionModel::model
|
||||||
\internal
|
\internal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\since 5.5
|
\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
|
The default implementation returns \c true if the value held by the relevant item
|
||||||
matches the filter string, wildcard string or regular expression.
|
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
|
should be accepted or not. This can be changed by setting the \l
|
||||||
filterRole property.
|
filterRole property.
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
|
|||||||
static const char *const empty = "";
|
static const char *const empty = "";
|
||||||
if (argc == 0 || argv == 0) {
|
if (argc == 0 || argv == 0) {
|
||||||
argc = 0;
|
argc = 0;
|
||||||
argv = (char **)∅
|
argv = const_cast<char **>(&empty);
|
||||||
}
|
}
|
||||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||||
if (!isArgvModified(argc, argv)) {
|
if (!isArgvModified(argc, argv)) {
|
||||||
|
@ -1532,6 +1532,29 @@ bool QMetaObject::invokeMethod(QObject *obj,
|
|||||||
ignores return values.
|
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
|
\class QMetaMethod
|
||||||
\inmodule QtCore
|
\inmodule QtCore
|
||||||
|
@ -420,6 +420,16 @@ struct DefinedTypesFilter {
|
|||||||
\sa QMetaType::create()
|
\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
|
\fn void *QMetaType::construct(void *where, const void *copy = 0) const
|
||||||
\since 5.0
|
\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 T *where) { DestructorImpl<T>::Destruct(m_type, const_cast<T*>(where)); }
|
||||||
void delegate(const void *) {}
|
void delegate(const void *) {}
|
||||||
void delegate(const QMetaTypeSwitcher::UnknownType*) {}
|
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:
|
private:
|
||||||
static void customTypeDestructor(const int type, void *where)
|
static void customTypeDestructor(const int type, void *where)
|
||||||
|
@ -4103,7 +4103,7 @@ QDebug operator<<(QDebug dbg, const QObject *o)
|
|||||||
QDebugStateSaver saver(dbg);
|
QDebugStateSaver saver(dbg);
|
||||||
if (!o)
|
if (!o)
|
||||||
return dbg << "QObject(0x0)";
|
return dbg << "QObject(0x0)";
|
||||||
dbg.nospace() << o->metaObject()->className() << '(' << (void *)o;
|
dbg.nospace() << o->metaObject()->className() << '(' << (const void *)o;
|
||||||
if (!o->objectName().isEmpty())
|
if (!o->objectName().isEmpty())
|
||||||
dbg << ", name = " << o->objectName();
|
dbg << ", name = " << o->objectName();
|
||||||
dbg << ')';
|
dbg << ')';
|
||||||
@ -4908,8 +4908,15 @@ QMetaObject::Connection& QMetaObject::Connection::operator=(const QMetaObject::C
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Creates a Connection instance.
|
||||||
|
*/
|
||||||
|
|
||||||
QMetaObject::Connection::Connection() : d_ptr(0) {}
|
QMetaObject::Connection::Connection() : d_ptr(0) {}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Destructor for QMetaObject::Connection.
|
||||||
|
*/
|
||||||
QMetaObject::Connection::~Connection()
|
QMetaObject::Connection::~Connection()
|
||||||
{
|
{
|
||||||
if (d_ptr)
|
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
|
For example, an application running in the \a locale with the following
|
||||||
\l{QLocale::uiLanguages()}{ui languages} - "es", "fr-CA", "de" might call
|
\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
|
replace '-' (dash) with '_' (underscore) in the ui language and then try to
|
||||||
open the first existing readable file from this list:
|
open the first existing readable file from this list:
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ public:
|
|||||||
raw += strlen("QTMETADATA ");
|
raw += strlen("QTMETADATA ");
|
||||||
// the size of the embedded JSON object can be found 8 bytes into the data (see qjson_p.h),
|
// 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)
|
// 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);
|
return QJsonDocument::fromBinaryData(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin);
|
|||||||
# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS, PLUGINCLASSNAME) \
|
# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS, PLUGINCLASSNAME) \
|
||||||
static QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance_##PLUGINCLASSNAME() \
|
static QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance_##PLUGINCLASSNAME() \
|
||||||
Q_PLUGIN_INSTANCE(PLUGINCLASS) \
|
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() { \
|
const QT_PREPEND_NAMESPACE(QStaticPlugin) qt_static_plugin_##PLUGINCLASSNAME() { \
|
||||||
QT_PREPEND_NAMESPACE(QStaticPlugin) plugin = { qt_plugin_instance_##PLUGINCLASSNAME, qt_plugin_query_metadata_##PLUGINCLASSNAME}; \
|
QT_PREPEND_NAMESPACE(QStaticPlugin) plugin = { qt_plugin_instance_##PLUGINCLASSNAME, qt_plugin_query_metadata_##PLUGINCLASSNAME}; \
|
||||||
return plugin; \
|
return plugin; \
|
||||||
@ -123,7 +123,7 @@ void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin);
|
|||||||
# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS, PLUGINCLASSNAME) \
|
# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS, PLUGINCLASSNAME) \
|
||||||
Q_EXTERN_C Q_DECL_EXPORT \
|
Q_EXTERN_C Q_DECL_EXPORT \
|
||||||
const char *qt_plugin_query_metadata() \
|
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_EXTERN_C Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance() \
|
||||||
Q_PLUGIN_INSTANCE(PLUGINCLASS)
|
Q_PLUGIN_INSTANCE(PLUGINCLASS)
|
||||||
|
|
||||||
|
@ -543,7 +543,7 @@ QUuid QUuid::fromRfc4122(const QByteArray &bytes)
|
|||||||
QString QUuid::toString() const
|
QString QUuid::toString() const
|
||||||
{
|
{
|
||||||
QString result(38, Qt::Uninitialized);
|
QString result(38, Qt::Uninitialized);
|
||||||
ushort *data = (ushort *)result.unicode();
|
ushort *data = (ushort *)result.data();
|
||||||
|
|
||||||
_q_uuidToHex(data, data1, data2, data3, data4);
|
_q_uuidToHex(data, data1, data2, data3, data4);
|
||||||
|
|
||||||
|
@ -136,11 +136,27 @@ void QReadWriteLock::lockForRead()
|
|||||||
{
|
{
|
||||||
QMutexLocker lock(&d->mutex);
|
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) {
|
while (d->accessCount < 0 || d->waitingWriters) {
|
||||||
++d->waitingReaders;
|
++d->waitingReaders;
|
||||||
d->readerWait.wait(&d->mutex);
|
d->readerWait.wait(&d->mutex);
|
||||||
--d->waitingReaders;
|
--d->waitingReaders;
|
||||||
}
|
}
|
||||||
|
if (d->recursive)
|
||||||
|
d->currentReaders.insert(self, 1);
|
||||||
|
|
||||||
++d->accessCount;
|
++d->accessCount;
|
||||||
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::lockForRead()", "Overflow in lock counter");
|
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::lockForRead()", "Overflow in lock counter");
|
||||||
@ -166,8 +182,24 @@ bool QReadWriteLock::tryLockForRead()
|
|||||||
{
|
{
|
||||||
QMutexLocker lock(&d->mutex);
|
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)
|
if (d->accessCount < 0)
|
||||||
return false;
|
return false;
|
||||||
|
if (d->recursive)
|
||||||
|
d->currentReaders.insert(self, 1);
|
||||||
|
|
||||||
++d->accessCount;
|
++d->accessCount;
|
||||||
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::tryLockForRead()", "Overflow in lock counter");
|
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);
|
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) {
|
while (d->accessCount < 0 || d->waitingWriters) {
|
||||||
++d->waitingReaders;
|
++d->waitingReaders;
|
||||||
bool success = d->readerWait.wait(&d->mutex, timeout < 0 ? ULONG_MAX : ulong(timeout));
|
bool success = d->readerWait.wait(&d->mutex, timeout < 0 ? ULONG_MAX : ulong(timeout));
|
||||||
@ -205,6 +251,8 @@ bool QReadWriteLock::tryLockForRead(int timeout)
|
|||||||
if (!success)
|
if (!success)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (d->recursive)
|
||||||
|
d->currentReaders.insert(self, 1);
|
||||||
|
|
||||||
++d->accessCount;
|
++d->accessCount;
|
||||||
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::tryLockForRead()", "Overflow in lock counter");
|
Q_ASSERT_X(d->accessCount > 0, "QReadWriteLock::tryLockForRead()", "Overflow in lock counter");
|
||||||
@ -364,6 +412,15 @@ void QReadWriteLock::unlock()
|
|||||||
bool unlocked = false;
|
bool unlocked = false;
|
||||||
if (d->accessCount > 0) {
|
if (d->accessCount > 0) {
|
||||||
// releasing a read lock
|
// 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;
|
unlocked = --d->accessCount == 0;
|
||||||
} else if (d->accessCount < 0 && ++d->accessCount == 0) {
|
} else if (d->accessCount < 0 && ++d->accessCount == 0) {
|
||||||
// released a write lock
|
// released a write lock
|
||||||
|
@ -69,6 +69,7 @@ struct QReadWriteLockPrivate
|
|||||||
|
|
||||||
bool recursive;
|
bool recursive;
|
||||||
Qt::HANDLE currentWriter;
|
Qt::HANDLE currentWriter;
|
||||||
|
QHash<Qt::HANDLE, int> currentReaders;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -511,7 +511,7 @@ QByteArray qCompress(const uchar* data, int nbytes, int compressionLevel)
|
|||||||
int res;
|
int res;
|
||||||
do {
|
do {
|
||||||
bazip.resize(len + 4);
|
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) {
|
switch (res) {
|
||||||
case Z_OK:
|
case Z_OK:
|
||||||
@ -602,7 +602,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
|
|||||||
d->size = 0; // Shut up valgrind "uninitialized variable" warning
|
d->size = 0; // Shut up valgrind "uninitialized variable" warning
|
||||||
|
|
||||||
int res = ::uncompress((uchar*)d->data(), &len,
|
int res = ::uncompress((uchar*)d->data(), &len,
|
||||||
(uchar*)data+4, nbytes-4);
|
data+4, nbytes-4);
|
||||||
|
|
||||||
switch (res) {
|
switch (res) {
|
||||||
case Z_OK:
|
case Z_OK:
|
||||||
@ -2186,9 +2186,9 @@ QByteArray &QByteArray::replace(const char *before, int bsize, const char *after
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (a != after)
|
if (a != after)
|
||||||
::free((char *)a);
|
::free(const_cast<char *>(a));
|
||||||
if (b != before)
|
if (b != before)
|
||||||
::free((char *)b);
|
::free(const_cast<char *>(b));
|
||||||
|
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -87,7 +87,7 @@ QCollator::QCollator(const QCollator &other)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Destructor for QCollator.
|
Destroys the collator.
|
||||||
*/
|
*/
|
||||||
QCollator::~QCollator()
|
QCollator::~QCollator()
|
||||||
{
|
{
|
||||||
|
@ -109,7 +109,7 @@
|
|||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
Swap overloads are found in namespace \c std as well as via
|
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)
|
\fn QPair::QPair(QPair<TT1, TT2> &&p)
|
||||||
\since 5.2
|
\since 5.2
|
||||||
|
|
||||||
Move-constructs a QPair instance, making it point to the same object that
|
Move-constructs a QPair instance, making it point to the same object that \a p was pointing to.
|
||||||
\a p was pointing to.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
# include "../testlib/3rdparty/valgrind_p.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
# if defined(Q_OS_WINCE)
|
# if defined(Q_OS_WINCE)
|
||||||
# include <qt_windows.h>
|
# include <qt_windows.h>
|
||||||
@ -256,8 +260,12 @@ static inline uint detectProcessorFeatures()
|
|||||||
|
|
||||||
uint features = 0;
|
uint features = 0;
|
||||||
int cpuidLevel = maxBasicCpuidSupported();
|
int cpuidLevel = maxBasicCpuidSupported();
|
||||||
|
#if Q_PROCESSOR_X86 < 5
|
||||||
if (cpuidLevel < 1)
|
if (cpuidLevel < 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
#else
|
||||||
|
Q_ASSERT(cpuidLevel >= 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
uint cpuid01ECX = 0, cpuid01EDX = 0;
|
uint cpuid01ECX = 0, cpuid01EDX = 0;
|
||||||
cpuidFeatures01(cpuid01ECX, cpuid01EDX);
|
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]);
|
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
|
// 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;
|
||||||
static const uint minFeature = qCompilerCpuFeatures & ~HLE;
|
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#if defined(Q_CC_GNU)
|
#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;
|
uint missing = minFeature & ~f;
|
||||||
fprintf(stderr, "Incompatible processor. This Qt build requires the following features:\n ");
|
fprintf(stderr, "Incompatible processor. This Qt build requires the following features:\n ");
|
||||||
for (int i = 0; i < features_count; ++i) {
|
for (int i = 0; i < features_count; ++i) {
|
||||||
|
@ -265,9 +265,6 @@ static const uint qCompilerCpuFeatures = 0
|
|||||||
#if defined __RTM__
|
#if defined __RTM__
|
||||||
| RTM
|
| RTM
|
||||||
#endif
|
#endif
|
||||||
#if defined __HLE__
|
|
||||||
| HLE
|
|
||||||
#endif
|
|
||||||
#if defined __AVX2__
|
#if defined __AVX2__
|
||||||
| AVX2
|
| AVX2
|
||||||
#endif
|
#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)
|
// we're going to read str[offset..offset+15] (16 bytes)
|
||||||
for ( ; str + offset + 15 < e; offset += 16) {
|
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__
|
#ifdef __AVX2__
|
||||||
// zero extend to an YMM register
|
// zero extend to an YMM register
|
||||||
const __m256i extended = _mm256_cvtepu8_epi16(chunk);
|
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)
|
// we're going to write to dst[offset..offset+15] (16 bytes)
|
||||||
for ( ; dst + offset + 15 < e; offset += 16) {
|
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);
|
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);
|
chunk2 = mergeQuestionMarks(chunk2);
|
||||||
|
|
||||||
// pack the two vector to 16 x 8bits elements
|
// 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)
|
// we're going to read ptr[0..15] (16 bytes)
|
||||||
for ( ; ptr + 15 < reinterpret_cast<const char *>(a); ptr += 16) {
|
for ( ; ptr + 15 < reinterpret_cast<const char *>(a); ptr += 16) {
|
||||||
__m128i a_data = _mm_loadu_si128((__m128i*)ptr);
|
__m128i a_data = _mm_loadu_si128((const __m128i*)ptr);
|
||||||
__m128i b_data = _mm_loadu_si128((__m128i*)(ptr + distance));
|
__m128i b_data = _mm_loadu_si128((const __m128i*)(ptr + distance));
|
||||||
__m128i result = _mm_cmpeq_epi16(a_data, b_data);
|
__m128i result = _mm_cmpeq_epi16(a_data, b_data);
|
||||||
uint mask = ~_mm_movemask_epi8(result);
|
uint mask = ~_mm_movemask_epi8(result);
|
||||||
if (ushort(mask)) {
|
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) {
|
for ( ; uc + offset + 15 < e; offset += 16) {
|
||||||
// similar to fromLatin1_helper:
|
// similar to fromLatin1_helper:
|
||||||
// load 16 bytes of Latin 1 data
|
// 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__
|
# ifdef __AVX2__
|
||||||
// expand Latin 1 data via zero extension
|
// expand Latin 1 data via zero extension
|
||||||
__m256i ldata = _mm256_cvtepu8_epi16(chunk);
|
__m256i ldata = _mm256_cvtepu8_epi16(chunk);
|
||||||
|
|
||||||
// load UTF-16 data and compare
|
// 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);
|
__m256i result = _mm256_cmpeq_epi16(ldata, ucdata);
|
||||||
|
|
||||||
uint mask = ~_mm256_movemask_epi8(result);
|
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);
|
__m128i secondHalf = _mm_unpackhi_epi8(chunk, nullmask);
|
||||||
|
|
||||||
// load UTF-16 data and compare
|
// load UTF-16 data and compare
|
||||||
__m128i ucdata1 = _mm_loadu_si128((__m128i*)(uc + offset));
|
__m128i ucdata1 = _mm_loadu_si128((const __m128i*)(uc + offset));
|
||||||
__m128i ucdata2 = _mm_loadu_si128((__m128i*)(uc + offset + 8));
|
__m128i ucdata2 = _mm_loadu_si128((const __m128i*)(uc + offset + 8));
|
||||||
__m128i result1 = _mm_cmpeq_epi16(firstHalf, ucdata1);
|
__m128i result1 = _mm_cmpeq_epi16(firstHalf, ucdata1);
|
||||||
__m128i result2 = _mm_cmpeq_epi16(secondHalf, ucdata2);
|
__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)
|
// we'll read uc[offset..offset+7] (16 bytes) and c[offset..offset+7] (8 bytes)
|
||||||
if (uc + offset + 7 < e) {
|
if (uc + offset + 7 < e) {
|
||||||
// same, but we're using an 8-byte load
|
// 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 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);
|
__m128i result = _mm_cmpeq_epi16(secondHalf, ucdata);
|
||||||
uint mask = ~_mm_movemask_epi8(result);
|
uint mask = ~_mm_movemask_epi8(result);
|
||||||
if (ushort(mask)) {
|
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)
|
// we're going to read n[0..7] (16 bytes)
|
||||||
for (const ushort *next = n + 8; next <= e; n = next, next += 8) {
|
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);
|
__m128i result = _mm_cmpeq_epi16(data, mch);
|
||||||
uint mask = _mm_movemask_epi8(result);
|
uint mask = _mm_movemask_epi8(result);
|
||||||
if (ushort(mask)) {
|
if (ushort(mask)) {
|
||||||
@ -2744,7 +2744,7 @@ bool operator<(const QString &s1, const QString &s2)
|
|||||||
*/
|
*/
|
||||||
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)
|
if (!c || *c == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -2849,7 +2849,7 @@ bool QString::operator<(QLatin1String other) const
|
|||||||
*/
|
*/
|
||||||
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')
|
if (!c || *c == '\0')
|
||||||
return !isEmpty();
|
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 *uc = reinterpret_cast<const ushort *>(data1);
|
||||||
const ushort *uce = uc + length1;
|
const ushort *uce = uc + length1;
|
||||||
const uchar *c = (uchar *)s2.latin1();
|
const uchar *c = (const uchar *)s2.latin1();
|
||||||
|
|
||||||
if (!c)
|
if (!c)
|
||||||
return length1;
|
return length1;
|
||||||
|
@ -389,12 +389,19 @@ static int parsePosixOffset(const QByteArray &timeRule)
|
|||||||
// Format "[+|-]hh[:mm[:ss]]"
|
// Format "[+|-]hh[:mm[:ss]]"
|
||||||
QList<QByteArray> parts = timeRule.split(':');
|
QList<QByteArray> parts = timeRule.split(':');
|
||||||
int count = parts.count();
|
int count = parts.count();
|
||||||
if (count == 3)
|
if (count == 3) {
|
||||||
return (parts.at(0).toInt() * -60 * 60) + (parts.at(1).toInt() * 60) + parts.at(2).toInt();
|
int hour = parts.at(0).toInt();
|
||||||
else if (count == 2)
|
int sign = hour >= 0 ? -1 : 1;
|
||||||
return (parts.at(0).toInt() * -60 * 60) + (parts.at(1).toInt() * 60);
|
return sign * ((qAbs(hour) * 60 * 60) + (parts.at(1).toInt() * 60) + parts.at(2).toInt());
|
||||||
else if (count == 1)
|
} else if (count == 2) {
|
||||||
return (parts.at(0).toInt() * -60 * 60);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2395,6 +2395,12 @@ QXmlStreamAttribute& QXmlStreamAttribute::operator=(const QXmlStreamAttribute &o
|
|||||||
\ingroup xml-tools
|
\ingroup xml-tools
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\fn QXmlStreamAttributes::QXmlStreamAttributes()
|
||||||
|
|
||||||
|
A constructor for QXmlStreamAttributes.
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\typedef QXmlStreamNotationDeclarations
|
\typedef QXmlStreamNotationDeclarations
|
||||||
\relates QXmlStreamNotationDeclaration
|
\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.
|
Move-assigns \a other to this QDBusUnixFileDescriptor.
|
||||||
*/
|
*/
|
||||||
|
@ -1387,10 +1387,18 @@ QAccessible::Id QAccessibleEvent::uniqueId() const
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn QAccessibleValueChangeEvent::QAccessibleValueChangeEvent(QObject *object, const QVariant &value)
|
/*! \fn QAccessibleValueChangeEvent::QAccessibleValueChangeEvent(QObject *object, const QVariant &value)
|
||||||
|
|
||||||
Constructs a new QAccessibleValueChangeEvent for \a object.
|
Constructs a new QAccessibleValueChangeEvent for \a object.
|
||||||
The event contains the new \a value.
|
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)
|
/*! \fn void QAccessibleValueChangeEvent::setValue(const QVariant & value)
|
||||||
|
|
||||||
Sets the new \a value for this event.
|
Sets the new \a value for this event.
|
||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
@ -1419,11 +1427,13 @@ QAccessibleValueChangeEvent::~QAccessibleValueChangeEvent()
|
|||||||
\sa QAccessibleInterface::state()
|
\sa QAccessibleInterface::state()
|
||||||
*/
|
*/
|
||||||
/*! \fn QAccessibleStateChangeEvent::QAccessibleStateChangeEvent(QObject *object, QAccessible::State state)
|
/*! \fn QAccessibleStateChangeEvent::QAccessibleStateChangeEvent(QObject *object, QAccessible::State state)
|
||||||
|
|
||||||
Constructs a new QAccessibleStateChangeEvent for \a object.
|
Constructs a new QAccessibleStateChangeEvent for \a object.
|
||||||
The difference to the object's previous state is in \a state.
|
The difference to the object's previous state is in \a state.
|
||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
\fn QAccessibleStateChangeEvent::QAccessibleStateChangeEvent(QAccessibleInterface *iface, QAccessible::State state)
|
\fn QAccessibleStateChangeEvent::QAccessibleStateChangeEvent(QAccessibleInterface *iface, QAccessible::State state)
|
||||||
|
|
||||||
Constructs a new QAccessibleStateChangeEvent.
|
Constructs a new QAccessibleStateChangeEvent.
|
||||||
\a iface is the interface associated with the event
|
\a iface is the interface associated with the event
|
||||||
\a state is the state of the accessible object.
|
\a state is the state of the accessible object.
|
||||||
@ -1432,8 +1442,8 @@ QAccessibleValueChangeEvent::~QAccessibleValueChangeEvent()
|
|||||||
\fn QAccessible::State QAccessibleStateChangeEvent::changedStates() const
|
\fn QAccessible::State QAccessibleStateChangeEvent::changedStates() const
|
||||||
\brief Returns the states that have been changed.
|
\brief Returns the states that have been changed.
|
||||||
|
|
||||||
Be aware that the returned states are the ones that have changed,
|
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().
|
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,
|
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
|
the object's state will have focused set to \c false. This event on the
|
||||||
@ -1462,7 +1472,7 @@ QAccessibleStateChangeEvent::~QAccessibleStateChangeEvent()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \enum QAccessibleTableModelChangeEvent::ModelChangeType
|
/*! \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 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 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.
|
\value RowsInserted New rows have been inserted.
|
||||||
@ -1471,38 +1481,55 @@ QAccessibleStateChangeEvent::~QAccessibleStateChangeEvent()
|
|||||||
\value ColumnsRemoved Columns have been removed.
|
\value ColumnsRemoved Columns have been removed.
|
||||||
*/
|
*/
|
||||||
/*! \fn QAccessibleTableModelChangeEvent::QAccessibleTableModelChangeEvent(QObject *object, ModelChangeType changeType)
|
/*! \fn QAccessibleTableModelChangeEvent::QAccessibleTableModelChangeEvent(QObject *object, ModelChangeType changeType)
|
||||||
|
|
||||||
Constructs a new QAccessibleTableModelChangeEvent for \a object of with \a changeType.
|
Constructs a new QAccessibleTableModelChangeEvent for \a object of with \a changeType.
|
||||||
*/
|
*/
|
||||||
/*! \fn int QAccessibleTableModelChangeEvent::firstColumn() const
|
/*! \fn int QAccessibleTableModelChangeEvent::firstColumn() const
|
||||||
|
|
||||||
Returns the first changed column.
|
Returns the first changed column.
|
||||||
*/
|
*/
|
||||||
/*! \fn int QAccessibleTableModelChangeEvent::firstRow() const
|
/*! \fn int QAccessibleTableModelChangeEvent::firstRow() const
|
||||||
|
|
||||||
Returns the first changed row.
|
Returns the first changed row.
|
||||||
*/
|
*/
|
||||||
/*! \fn int QAccessibleTableModelChangeEvent::lastColumn() const
|
/*! \fn int QAccessibleTableModelChangeEvent::lastColumn() const
|
||||||
|
|
||||||
Returns the last changed column.
|
Returns the last changed column.
|
||||||
*/
|
*/
|
||||||
/*! \fn int QAccessibleTableModelChangeEvent::lastRow() const
|
/*! \fn int QAccessibleTableModelChangeEvent::lastRow() const
|
||||||
|
|
||||||
Returns the last changed row.
|
Returns the last changed row.
|
||||||
*/
|
*/
|
||||||
/*! \fn QAccessibleTableModelChangeEvent::ModelChangeType QAccessibleTableModelChangeEvent::modelChangeType() const
|
/*! \fn QAccessibleTableModelChangeEvent::ModelChangeType QAccessibleTableModelChangeEvent::modelChangeType() const
|
||||||
|
|
||||||
Returns the type of change.
|
Returns the type of change.
|
||||||
*/
|
*/
|
||||||
/*! \fn void QAccessibleTableModelChangeEvent::setFirstColumn(int column)
|
/*! \fn void QAccessibleTableModelChangeEvent::setFirstColumn(int column)
|
||||||
|
|
||||||
Sets the first changed \a column.
|
Sets the first changed \a column.
|
||||||
*/
|
*/
|
||||||
/*! \fn void QAccessibleTableModelChangeEvent::setFirstRow(int row)
|
/*! \fn void QAccessibleTableModelChangeEvent::setFirstRow(int row)
|
||||||
|
|
||||||
Sets the first changed \a row.
|
Sets the first changed \a row.
|
||||||
*/
|
*/
|
||||||
/*! \fn void QAccessibleTableModelChangeEvent::setLastColumn(int column)
|
/*! \fn void QAccessibleTableModelChangeEvent::setLastColumn(int column)
|
||||||
|
|
||||||
Sets the last changed \a column.
|
Sets the last changed \a column.
|
||||||
*/
|
*/
|
||||||
/*! \fn void QAccessibleTableModelChangeEvent::setLastRow(int row)
|
/*! \fn void QAccessibleTableModelChangeEvent::setLastRow(int row)
|
||||||
|
|
||||||
Sets the last changed \a row.
|
Sets the last changed \a row.
|
||||||
*/
|
*/
|
||||||
/*! \fn void QAccessibleTableModelChangeEvent::setModelChangeType(ModelChangeType changeType)
|
/*! \fn void QAccessibleTableModelChangeEvent::setModelChangeType(ModelChangeType changeType)
|
||||||
|
|
||||||
Sets the type of change to \a 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
|
\internal
|
||||||
*/
|
*/
|
||||||
@ -1510,8 +1537,6 @@ QAccessibleTableModelChangeEvent::~QAccessibleTableModelChangeEvent()
|
|||||||
{
|
{
|
||||||
// must be empty until ### Qt 6
|
// must be empty until ### Qt 6
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QAccessibleTextCursorEvent
|
\class QAccessibleTextCursorEvent
|
||||||
\ingroup accessibility
|
\ingroup accessibility
|
||||||
@ -1521,14 +1546,17 @@ QAccessibleTableModelChangeEvent::~QAccessibleTableModelChangeEvent()
|
|||||||
|
|
||||||
This class is used with \l QAccessible::updateAccessibility().
|
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.
|
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
|
/*! \fn int QAccessibleTextCursorEvent::cursorPosition() const
|
||||||
|
|
||||||
Returns the cursor position.
|
Returns the cursor position.
|
||||||
*/
|
*/
|
||||||
/*! \fn void QAccessibleTextCursorEvent::setCursorPosition(int position)
|
/*! \fn void QAccessibleTextCursorEvent::setCursorPosition(int position)
|
||||||
|
|
||||||
Sets the cursor \a position for this event.
|
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
|
\class QAccessibleTextInsertEvent
|
||||||
\ingroup accessibility
|
\ingroup accessibility
|
||||||
@ -1550,6 +1585,7 @@ QAccessibleTextCursorEvent::~QAccessibleTextCursorEvent()
|
|||||||
This class is used with \l QAccessible::updateAccessibility().
|
This class is used with \l QAccessible::updateAccessibility().
|
||||||
*/
|
*/
|
||||||
/*! \fn QAccessibleTextInsertEvent::QAccessibleTextInsertEvent(QObject *object, int position, const QString &text)
|
/*! \fn QAccessibleTextInsertEvent::QAccessibleTextInsertEvent(QObject *object, int position, const QString &text)
|
||||||
|
|
||||||
Constructs a new QAccessibleTextInsertEvent event for \a object.
|
Constructs a new QAccessibleTextInsertEvent event for \a object.
|
||||||
The \a text has been inserted at \a position.
|
The \a text has been inserted at \a position.
|
||||||
By default, it is assumed that the cursor has moved to the end
|
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.
|
set it with \l QAccessibleTextCursorEvent::setCursorPosition() for this event.
|
||||||
*/
|
*/
|
||||||
/*! \fn int QAccessibleTextInsertEvent::changePosition() const
|
/*! \fn int QAccessibleTextInsertEvent::changePosition() const
|
||||||
|
|
||||||
Returns the position where the text was inserted.
|
Returns the position where the text was inserted.
|
||||||
*/
|
*/
|
||||||
/*! \fn QString QAccessibleTextInsertEvent::textInserted() const
|
/*! \fn QString QAccessibleTextInsertEvent::textInserted() const
|
||||||
|
|
||||||
Returns the text that has been inserted.
|
Returns the text that has been inserted.
|
||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
@ -1581,17 +1619,28 @@ QAccessibleTextInsertEvent::~QAccessibleTextInsertEvent()
|
|||||||
This class is used with \l QAccessible::updateAccessibility().
|
This class is used with \l QAccessible::updateAccessibility().
|
||||||
*/
|
*/
|
||||||
/*! \fn QAccessibleTextRemoveEvent::QAccessibleTextRemoveEvent(QObject *object, int position, const QString &text)
|
/*! \fn QAccessibleTextRemoveEvent::QAccessibleTextRemoveEvent(QObject *object, int position, const QString &text)
|
||||||
|
|
||||||
Constructs a new QAccessibleTextRemoveEvent event for \a object.
|
Constructs a new QAccessibleTextRemoveEvent event for \a object.
|
||||||
The \a text has been removed at \a position.
|
The \a text has been removed at \a position.
|
||||||
By default it is assumed that the cursor has moved to \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
|
If that is not the case, one needs to manually
|
||||||
set it with \l QAccessibleTextCursorEvent::setCursorPosition() for this event.
|
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
|
/*! \fn int QAccessibleTextRemoveEvent::changePosition() const
|
||||||
|
|
||||||
Returns the position where the text was removed.
|
Returns the position where the text was removed.
|
||||||
*/
|
*/
|
||||||
/*! \fn QString QAccessibleTextRemoveEvent::textRemoved() const
|
/*! \fn QString QAccessibleTextRemoveEvent::textRemoved() const
|
||||||
|
|
||||||
Returns the text that has been removed.
|
Returns the text that has been removed.
|
||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
@ -1602,6 +1651,31 @@ QAccessibleTextRemoveEvent::~QAccessibleTextRemoveEvent()
|
|||||||
// must be empty until ### Qt 6
|
// 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
|
\class QAccessibleTextUpdateEvent
|
||||||
\ingroup accessibility
|
\ingroup accessibility
|
||||||
@ -1615,16 +1689,20 @@ QAccessibleTextRemoveEvent::~QAccessibleTextRemoveEvent()
|
|||||||
This class is used with \l QAccessible::updateAccessibility().
|
This class is used with \l QAccessible::updateAccessibility().
|
||||||
*/
|
*/
|
||||||
/*! \fn QAccessibleTextUpdateEvent::QAccessibleTextUpdateEvent(QObject *object, int position, const QString &oldText, const QString &text)
|
/*! \fn QAccessibleTextUpdateEvent::QAccessibleTextUpdateEvent(QObject *object, int position, const QString &oldText, const QString &text)
|
||||||
|
|
||||||
Constructs a new QAccessibleTextUpdateEvent for \a object.
|
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.
|
The text change takes place at \a position where the \a oldText was removed and \a text inserted instead.
|
||||||
*/
|
*/
|
||||||
/*! \fn int QAccessibleTextUpdateEvent::changePosition() const
|
/*! \fn int QAccessibleTextUpdateEvent::changePosition() const
|
||||||
|
|
||||||
Returns where the change took place.
|
Returns where the change took place.
|
||||||
*/
|
*/
|
||||||
/*! \fn QString QAccessibleTextUpdateEvent::textInserted() const
|
/*! \fn QString QAccessibleTextUpdateEvent::textInserted() const
|
||||||
|
|
||||||
Returns the inserted text.
|
Returns the inserted text.
|
||||||
*/
|
*/
|
||||||
/*! \fn QString QAccessibleTextUpdateEvent::textRemoved() const
|
/*! \fn QString QAccessibleTextUpdateEvent::textRemoved() const
|
||||||
|
|
||||||
Returns the removed text.
|
Returns the removed text.
|
||||||
*/
|
*/
|
||||||
/*!
|
/*!
|
||||||
@ -1646,16 +1724,20 @@ QAccessibleTextUpdateEvent::~QAccessibleTextUpdateEvent()
|
|||||||
This class is used with \l QAccessible::updateAccessibility().
|
This class is used with \l QAccessible::updateAccessibility().
|
||||||
*/
|
*/
|
||||||
/*! \fn QAccessibleTextSelectionEvent::QAccessibleTextSelectionEvent(QObject *object, int start, int end)
|
/*! \fn QAccessibleTextSelectionEvent::QAccessibleTextSelectionEvent(QObject *object, int start, int end)
|
||||||
|
|
||||||
Constructs a new QAccessibleTextSelectionEvent for \a object.
|
Constructs a new QAccessibleTextSelectionEvent for \a object.
|
||||||
The new selection this event notifies about is from position \a start to \a end.
|
The new selection this event notifies about is from position \a start to \a end.
|
||||||
*/
|
*/
|
||||||
/*! \fn int QAccessibleTextSelectionEvent::selectionEnd() const
|
/*! \fn int QAccessibleTextSelectionEvent::selectionEnd() const
|
||||||
|
|
||||||
Returns the position of the last selected character.
|
Returns the position of the last selected character.
|
||||||
*/
|
*/
|
||||||
/*! \fn int QAccessibleTextSelectionEvent::selectionStart() const
|
/*! \fn int QAccessibleTextSelectionEvent::selectionStart() const
|
||||||
|
|
||||||
Returns the position of the first selected character.
|
Returns the position of the first selected character.
|
||||||
*/
|
*/
|
||||||
/*! \fn void QAccessibleTextSelectionEvent::setSelection(int start, int end)
|
/*! \fn void QAccessibleTextSelectionEvent::setSelection(int start, int end)
|
||||||
|
|
||||||
Sets the selection for this event from position \a start to \a 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.
|
Destroys the QAccessibleTextInterface.
|
||||||
*/
|
*/
|
||||||
QAccessibleTextInterface::~QAccessibleTextInterface()
|
QAccessibleTextInterface::~QAccessibleTextInterface()
|
||||||
@ -1912,6 +1995,7 @@ QAccessibleTextInterface::~QAccessibleTextInterface()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void QAccessibleTextInterface::addSelection(int startOffset, int endOffset)
|
\fn void QAccessibleTextInterface::addSelection(int startOffset, int endOffset)
|
||||||
|
|
||||||
Select the text from \a startOffset to \a endOffset.
|
Select the text from \a startOffset to \a endOffset.
|
||||||
The \a startOffset is the first character that will be selected.
|
The \a startOffset is the first character that will be selected.
|
||||||
The \a endOffset is the first character that will not 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
|
\fn QString QAccessibleTextInterface::attributes(int offset, int *startOffset, int *endOffset) const
|
||||||
|
|
||||||
Returns the text attributes at the position \a offset.
|
Returns the text attributes at the position \a offset.
|
||||||
In addition the range of the attributes is returned in \a startOffset and \a endOffset.
|
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
|
\fn QRect QAccessibleTextInterface::characterRect(int offset) const
|
||||||
|
|
||||||
Returns the position and size of the character at position \a offset in screen coordinates.
|
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.
|
Destroys the QAccessibleEditableTextInterface.
|
||||||
*/
|
*/
|
||||||
QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface()
|
QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface()
|
||||||
@ -2333,6 +2420,7 @@ QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Destroys the QAccessibleValueInterface.
|
Destroys the QAccessibleValueInterface.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
QAccessibleValueInterface::~QAccessibleValueInterface()
|
QAccessibleValueInterface::~QAccessibleValueInterface()
|
||||||
{
|
{
|
||||||
@ -2415,6 +2503,7 @@ QAccessibleImageInterface::~QAccessibleImageInterface()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
Destroys the QAccessibleTableCellInterface.
|
Destroys the QAccessibleTableCellInterface.
|
||||||
*/
|
*/
|
||||||
QAccessibleTableCellInterface::~QAccessibleTableCellInterface()
|
QAccessibleTableCellInterface::~QAccessibleTableCellInterface()
|
||||||
@ -2424,41 +2513,49 @@ QAccessibleTableCellInterface::~QAccessibleTableCellInterface()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual int QAccessibleTableCellInterface::columnExtent() const
|
\fn virtual int QAccessibleTableCellInterface::columnExtent() const
|
||||||
|
|
||||||
Returns the number of columns occupied by this cell accessible.
|
Returns the number of columns occupied by this cell accessible.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QList<QAccessibleInterface*> QAccessibleTableCellInterface::columnHeaderCells() const
|
\fn virtual QList<QAccessibleInterface*> QAccessibleTableCellInterface::columnHeaderCells() const
|
||||||
|
|
||||||
Returns the column headers as an array of cell accessibles.
|
Returns the column headers as an array of cell accessibles.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual int QAccessibleTableCellInterface::columnIndex() const
|
\fn virtual int QAccessibleTableCellInterface::columnIndex() const
|
||||||
|
|
||||||
Translates this cell accessible into the corresponding column index.
|
Translates this cell accessible into the corresponding column index.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual int QAccessibleTableCellInterface::rowExtent() const
|
\fn virtual int QAccessibleTableCellInterface::rowExtent() const
|
||||||
|
|
||||||
Returns the number of rows occupied by this cell accessible.
|
Returns the number of rows occupied by this cell accessible.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QList<QAccessibleInterface*> QAccessibleTableCellInterface::rowHeaderCells() const
|
\fn virtual QList<QAccessibleInterface*> QAccessibleTableCellInterface::rowHeaderCells() const
|
||||||
|
|
||||||
Returns the row headers as an array of cell accessibles.
|
Returns the row headers as an array of cell accessibles.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual int QAccessibleTableCellInterface::rowIndex() const
|
\fn virtual int QAccessibleTableCellInterface::rowIndex() const
|
||||||
|
|
||||||
Translates this cell accessible into the corresponding row index.
|
Translates this cell accessible into the corresponding row index.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual bool QAccessibleTableCellInterface::isSelected() const
|
\fn virtual bool QAccessibleTableCellInterface::isSelected() const
|
||||||
|
|
||||||
Returns a boolean value indicating whether this cell is selected.
|
Returns a boolean value indicating whether this cell is selected.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QAccessibleInterface *QAccessibleTableCellInterface::table() const
|
\fn virtual QAccessibleInterface *QAccessibleTableCellInterface::table() const
|
||||||
|
|
||||||
Returns the QAccessibleInterface of the table containing this cell.
|
Returns the QAccessibleInterface of the table containing this cell.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -2474,6 +2571,7 @@ QAccessibleTableCellInterface::~QAccessibleTableCellInterface()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
Destroys the QAccessibleTableInterface.
|
Destroys the QAccessibleTableInterface.
|
||||||
*/
|
*/
|
||||||
QAccessibleTableInterface::~QAccessibleTableInterface()
|
QAccessibleTableInterface::~QAccessibleTableInterface()
|
||||||
@ -2483,100 +2581,119 @@ QAccessibleTableInterface::~QAccessibleTableInterface()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QAccessibleInterface *QAccessibleTableInterface::cellAt(int row, int column) const
|
\fn virtual QAccessibleInterface *QAccessibleTableInterface::cellAt(int row, int column) const
|
||||||
|
|
||||||
Returns the cell at the specified \a row and \a column in the table.
|
Returns the cell at the specified \a row and \a column in the table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QAccessibleInterface *QAccessibleTableInterface::caption() const
|
\fn virtual QAccessibleInterface *QAccessibleTableInterface::caption() const
|
||||||
|
|
||||||
Returns the caption for the table.
|
Returns the caption for the table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QString QAccessibleTableInterface::columnDescription(int column) const
|
\fn virtual QString QAccessibleTableInterface::columnDescription(int column) const
|
||||||
|
|
||||||
Returns the description text of the specified \a column in the table.
|
Returns the description text of the specified \a column in the table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual int QAccessibleTableInterface::columnCount() const
|
\fn virtual int QAccessibleTableInterface::columnCount() const
|
||||||
|
|
||||||
Returns the total number of columns in table.
|
Returns the total number of columns in table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual int QAccessibleTableInterface::rowCount() const
|
\fn virtual int QAccessibleTableInterface::rowCount() const
|
||||||
|
|
||||||
Returns the total number of rows in table.
|
Returns the total number of rows in table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual int QAccessibleTableInterface::selectedCellCount() const
|
\fn virtual int QAccessibleTableInterface::selectedCellCount() const
|
||||||
|
|
||||||
Returns the total number of selected cells.
|
Returns the total number of selected cells.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual int QAccessibleTableInterface::selectedColumnCount() const
|
\fn virtual int QAccessibleTableInterface::selectedColumnCount() const
|
||||||
|
|
||||||
Returns the total number of selected columns.
|
Returns the total number of selected columns.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual int QAccessibleTableInterface::selectedRowCount() const
|
\fn virtual int QAccessibleTableInterface::selectedRowCount() const
|
||||||
|
|
||||||
Returns the total number of selected rows.
|
Returns the total number of selected rows.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QString QAccessibleTableInterface::rowDescription(int row) const
|
\fn virtual QString QAccessibleTableInterface::rowDescription(int row) const
|
||||||
|
|
||||||
Returns the description text of the specified \a row in the table.
|
Returns the description text of the specified \a row in the table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QList<int> QAccessibleTableInterface::selectedCells() const
|
\fn virtual QList<int> QAccessibleTableInterface::selectedCells() const
|
||||||
|
|
||||||
Returns the list of selected cell (by their index as \l QAccessibleInterface::child() accepts).
|
Returns the list of selected cell (by their index as \l QAccessibleInterface::child() accepts).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QList<int> QAccessibleTableInterface::selectedColumns() const
|
\fn virtual QList<int> QAccessibleTableInterface::selectedColumns() const
|
||||||
|
|
||||||
Returns the list of currently selected columns.
|
Returns the list of currently selected columns.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QList<int> QAccessibleTableInterface::selectedRows() const
|
\fn virtual QList<int> QAccessibleTableInterface::selectedRows() const
|
||||||
|
|
||||||
Returns the list of currently selected columns.
|
Returns the list of currently selected columns.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual QAccessibleInterface *QAccessibleTableInterface::summary() const
|
\fn virtual QAccessibleInterface *QAccessibleTableInterface::summary() const
|
||||||
|
|
||||||
Returns a QAccessibleInterface that represents a summary of the table.
|
Returns a QAccessibleInterface that represents a summary of the table.
|
||||||
This function may return 0 if no such interface exists.
|
This function may return 0 if no such interface exists.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual bool QAccessibleTableInterface::isColumnSelected(int column) const
|
\fn virtual bool QAccessibleTableInterface::isColumnSelected(int column) const
|
||||||
|
|
||||||
Returns a boolean value indicating whether the specified \a column is completely selected.
|
Returns a boolean value indicating whether the specified \a column is completely selected.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual bool QAccessibleTableInterface::isRowSelected(int row) const
|
\fn virtual bool QAccessibleTableInterface::isRowSelected(int row) const
|
||||||
|
|
||||||
Returns a boolean value indicating whether the specified \a row is completely selected.
|
Returns a boolean value indicating whether the specified \a row is completely selected.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual bool QAccessibleTableInterface::selectRow(int row)
|
\fn virtual bool QAccessibleTableInterface::selectRow(int row)
|
||||||
|
|
||||||
Selects \a row. This function might unselect all previously selected rows.
|
Selects \a row. This function might unselect all previously selected rows.
|
||||||
Returns \c true if the selection was successful.
|
Returns \c true if the selection was successful.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual bool QAccessibleTableInterface::selectColumn(int column)
|
\fn virtual bool QAccessibleTableInterface::selectColumn(int column)
|
||||||
|
|
||||||
Selects \a column. This function might unselect all previously selected columns.
|
Selects \a column. This function might unselect all previously selected columns.
|
||||||
Returns \c true if the selection was successful.
|
Returns \c true if the selection was successful.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual bool QAccessibleTableInterface::unselectRow(int row)
|
\fn virtual bool QAccessibleTableInterface::unselectRow(int row)
|
||||||
|
|
||||||
Unselects \a row, leaving other selected rows selected (if any).
|
Unselects \a row, leaving other selected rows selected (if any).
|
||||||
Returns \c true if the selection was successful.
|
Returns \c true if the selection was successful.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn virtual bool QAccessibleTableInterface::unselectColumn(int column)
|
\fn virtual bool QAccessibleTableInterface::unselectColumn(int column)
|
||||||
|
|
||||||
Unselects \a column, leaving other selected columns selected (if any).
|
Unselects \a column, leaving other selected columns selected (if any).
|
||||||
Returns \c true if the selection was successful.
|
Returns \c true if the selection was successful.
|
||||||
*/
|
*/
|
||||||
@ -2630,6 +2747,7 @@ QAccessibleTableInterface::~QAccessibleTableInterface()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
Destroys the QAccessibleActionInterface.
|
Destroys the QAccessibleActionInterface.
|
||||||
*/
|
*/
|
||||||
QAccessibleActionInterface::~QAccessibleActionInterface()
|
QAccessibleActionInterface::~QAccessibleActionInterface()
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# common to plugin and built-in forms
|
# common to plugin and built-in forms
|
||||||
INCLUDEPATH *= $$PWD
|
|
||||||
HEADERS += $$PWD/qgifhandler_p.h
|
HEADERS += $$PWD/qgifhandler_p.h
|
||||||
SOURCES += $$PWD/qgifhandler.cpp
|
SOURCES += $$PWD/qgifhandler.cpp
|
||||||
|
@ -628,6 +628,13 @@ QIcon::QIcon(const QIcon &other)
|
|||||||
d->ref.ref();
|
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
|
Constructs an icon from the file with the given \a fileName. The
|
||||||
file will be loaded on demand.
|
file will be loaded on demand.
|
||||||
|
@ -572,12 +572,13 @@ bool QImageData::checkForAlphaPixels() const
|
|||||||
|
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
|
\target qimage-legalese
|
||||||
\section1 Legal Information
|
\section1 Legal Information
|
||||||
|
|
||||||
For smooth scaling, the transformed() functions use code based on
|
For smooth scaling, the transformed() functions use code based on
|
||||||
smooth scaling algorithm by Daniel M. Duley.
|
smooth scaling algorithm by Daniel M. Duley.
|
||||||
|
|
||||||
\legalese
|
\badcode
|
||||||
Copyright (C) 2004, 2005 Daniel M. Duley
|
Copyright (C) 2004, 2005 Daniel M. Duley
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
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
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
\endlegalese
|
\endcode
|
||||||
|
|
||||||
\sa QImageReader, QImageWriter, QPixmap, QSvgRenderer, {Image Composition Example},
|
\sa QImageReader, QImageWriter, QPixmap, QSvgRenderer, {Image Composition Example},
|
||||||
{Image Viewer Example}, {Scribble Example}, {Pixelator Example}
|
{Image Viewer Example}, {Scribble Example}, {Pixelator Example}
|
||||||
@ -4359,6 +4360,10 @@ int QImage::bitPlaneCount() const
|
|||||||
return bpc;
|
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 QImage::smoothScaled(int w, int h) const {
|
||||||
QImage src = *this;
|
QImage src = *this;
|
||||||
switch (src.format()) {
|
switch (src.format()) {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# common to plugin and built-in forms
|
# common to plugin and built-in forms
|
||||||
INCLUDEPATH *= $$PWD
|
|
||||||
HEADERS += $$PWD/qjpeghandler_p.h
|
HEADERS += $$PWD/qjpeghandler_p.h
|
||||||
SOURCES += $$PWD/qjpeghandler.cpp
|
SOURCES += $$PWD/qjpeghandler.cpp
|
||||||
contains(QT_CONFIG, system-jpeg) {
|
contains(QT_CONFIG, system-jpeg) {
|
||||||
|
@ -659,4 +659,18 @@ int QPixmapCache::totalUsed()
|
|||||||
return (pm_cache()->totalCost()+1023) / 1024;
|
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
|
QT_END_NAMESPACE
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
INCLUDEPATH *= $$PWD
|
|
||||||
HEADERS += $$PWD/qpnghandler_p.h
|
HEADERS += $$PWD/qpnghandler_p.h
|
||||||
SOURCES += $$PWD/qpnghandler.cpp
|
SOURCES += $$PWD/qpnghandler.cpp
|
||||||
contains(QT_CONFIG, system-png) {
|
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
|
\class QInputEvent
|
||||||
\ingroup events
|
\ingroup events
|
||||||
@ -4196,6 +4242,12 @@ QTouchEvent::~QTouchEvent()
|
|||||||
\sa QTouchDevice::type(), QTouchEvent::device()
|
\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
|
/*! \fn Qt::TouchPointStates QTouchEvent::touchPointStates() const
|
||||||
|
|
||||||
Returns a bitwise OR of all the touch point states for this event.
|
Returns a bitwise OR of all the touch point states for this event.
|
||||||
@ -4722,6 +4774,10 @@ void QTouchEvent::TouchPoint::setFlags(InfoFlags flags)
|
|||||||
\internal
|
\internal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\fn TouchPoint &TouchPoint::operator=(TouchPoint &&other)
|
||||||
|
\internal
|
||||||
|
*/
|
||||||
/*!
|
/*!
|
||||||
\fn void QTouchEvent::TouchPoint::swap(TouchPoint &other);
|
\fn void QTouchEvent::TouchPoint::swap(TouchPoint &other);
|
||||||
\internal
|
\internal
|
||||||
|
@ -1898,8 +1898,14 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
|
|||||||
#if !defined(Q_OS_OSX)
|
#if !defined(Q_OS_OSX)
|
||||||
// On OS X the shortcut override is checked earlier, see: QWindowSystemInterface::handleKeyEvent()
|
// On OS X the shortcut override is checked earlier, see: QWindowSystemInterface::handleKeyEvent()
|
||||||
const bool checkShortcut = e->keyType == QEvent::KeyPress && window != 0;
|
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))
|
if (checkShortcut) {
|
||||||
return;
|
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
|
#endif // Q_OS_OSX
|
||||||
|
|
||||||
QKeyEvent ev(e->keyType, e->key, e->modifiers,
|
QKeyEvent ev(e->keyType, e->key, e->modifiers,
|
||||||
|
@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
\class QSessionManager
|
\class QSessionManager
|
||||||
\brief The QSessionManager class provides access to the session manager.
|
\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
|
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,
|
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
|
#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
|
// used by QTestLib to directly send shortcuts to objects
|
||||||
bool QWindowSystemInterface::tryHandleShortcutEventToObject(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods,
|
bool QWindowSystemInterface::tryHandleShortcutEventToObject(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods,
|
||||||
const QString &text, bool autorep, ushort count)
|
const QString &text, bool autorep, ushort count)
|
||||||
|
@ -78,6 +78,8 @@ public:
|
|||||||
Qt::KeyboardModifiers mods = Qt::NoModifier,
|
Qt::KeyboardModifiers mods = Qt::NoModifier,
|
||||||
Qt::MouseEventSource source = Qt::MouseEventNotSynthesized);
|
Qt::MouseEventSource source = Qt::MouseEventNotSynthesized);
|
||||||
|
|
||||||
|
static bool tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev);
|
||||||
|
|
||||||
static bool tryHandleShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
|
static bool tryHandleShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
|
||||||
const QString & text = QString(), bool autorep = false, ushort count = 1);
|
const QString & text = QString(), bool autorep = false, ushort count = 1);
|
||||||
static bool tryHandleShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods,
|
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.
|
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)
|
\fn QGenericMatrix::QGenericMatrix(const T *values)
|
||||||
|
|
||||||
|
@ -915,6 +915,12 @@ QOpenGLDebugMessage &QOpenGLDebugMessage::operator=(const QOpenGLDebugMessage &d
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\fn QOpenGLDebugMessage &QOpenGLDebugMessage::operator=(QOpenGLDebugMessage &&debugMessage)
|
||||||
|
|
||||||
|
Move-assigns \a debugMessage to this object.
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void QOpenGLDebugMessage::swap(QOpenGLDebugMessage &debugMessage)
|
\fn void QOpenGLDebugMessage::swap(QOpenGLDebugMessage &debugMessage)
|
||||||
|
|
||||||
|
@ -179,8 +179,9 @@ void QOpenGLTexturePrivate::destroy()
|
|||||||
// not created or already destroyed
|
// not created or already destroyed
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (QOpenGLContext::currentContext() != context) {
|
QOpenGLContext *currentContext = QOpenGLContext::currentContext();
|
||||||
qWarning("Requires a valid current OpenGL context.\n"
|
if (!currentContext || !QOpenGLContext::areSharing(currentContext, context)) {
|
||||||
|
qWarning("Texture is not valid in the current context.\n"
|
||||||
"Texture has not been destroyed");
|
"Texture has not been destroyed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -186,11 +186,17 @@ void QAbstractOpenGLFunctionsPrivate::removeExternalFunctions(QOpenGLContext *co
|
|||||||
|
|
||||||
\sa QOpenGLContext::versionFunctions()
|
\sa QOpenGLContext::versionFunctions()
|
||||||
*/
|
*/
|
||||||
|
/*!
|
||||||
|
Constructs a QAbstractOpenGLFunctions object.
|
||||||
|
*/
|
||||||
QAbstractOpenGLFunctions::QAbstractOpenGLFunctions()
|
QAbstractOpenGLFunctions::QAbstractOpenGLFunctions()
|
||||||
: d_ptr(new QAbstractOpenGLFunctionsPrivate)
|
: d_ptr(new QAbstractOpenGLFunctionsPrivate)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Destroys a QAbstractOpenGLFunctions object.
|
||||||
|
*/
|
||||||
QAbstractOpenGLFunctions::~QAbstractOpenGLFunctions()
|
QAbstractOpenGLFunctions::~QAbstractOpenGLFunctions()
|
||||||
{
|
{
|
||||||
Q_D(QAbstractOpenGLFunctions);
|
Q_D(QAbstractOpenGLFunctions);
|
||||||
@ -228,12 +234,16 @@ bool QAbstractOpenGLFunctions::isInitialized() const
|
|||||||
return d->initialized;
|
return d->initialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*! \internal
|
||||||
|
*/
|
||||||
void QAbstractOpenGLFunctions::setOwningContext(const QOpenGLContext *context)
|
void QAbstractOpenGLFunctions::setOwningContext(const QOpenGLContext *context)
|
||||||
{
|
{
|
||||||
Q_D(QAbstractOpenGLFunctions);
|
Q_D(QAbstractOpenGLFunctions);
|
||||||
d->owningContext = const_cast<QOpenGLContext*>(context);
|
d->owningContext = const_cast<QOpenGLContext*>(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*! \internal
|
||||||
|
*/
|
||||||
QOpenGLContext *QAbstractOpenGLFunctions::owningContext() const
|
QOpenGLContext *QAbstractOpenGLFunctions::owningContext() const
|
||||||
{
|
{
|
||||||
Q_D(const QAbstractOpenGLFunctions);
|
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));
|
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)
|
void QBackingStore::setStaticContents(const QRegion ®ion)
|
||||||
{
|
{
|
||||||
d_ptr->staticContents = region;
|
d_ptr->staticContents = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns a pointer to the QRegion that has the static contents
|
||||||
|
of this window.
|
||||||
|
*/
|
||||||
QRegion QBackingStore::staticContents() const
|
QRegion QBackingStore::staticContents() const
|
||||||
{
|
{
|
||||||
return d_ptr->staticContents;
|
return d_ptr->staticContents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns a boolean indicating if this window
|
||||||
|
has static contents or not.
|
||||||
|
*/
|
||||||
bool QBackingStore::hasStaticContents() const
|
bool QBackingStore::hasStaticContents() const
|
||||||
{
|
{
|
||||||
return !d_ptr->staticContents.isEmpty();
|
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
|
QPlatformBackingStore *QBackingStore::handle() const
|
||||||
{
|
{
|
||||||
return d_ptr->platformBackingStore;
|
return d_ptr->platformBackingStore;
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include "qpixmap.h"
|
#include "qpixmap.h"
|
||||||
#include "qbitmap.h"
|
#include "qbitmap.h"
|
||||||
#include "qpixmapcache.h"
|
#include "qpixmapcache.h"
|
||||||
#include "qplatformpixmap.h"
|
#include <qpa/qplatformpixmap.h>
|
||||||
#include "qdatastream.h"
|
#include "qdatastream.h"
|
||||||
#include "qvariant.h"
|
#include "qvariant.h"
|
||||||
#include "qline.h"
|
#include "qline.h"
|
||||||
|
@ -3277,6 +3277,10 @@ bool QRasterPaintEngine::requiresPretransformedGlyphPositions(QFontEngine *fontE
|
|||||||
return QPaintEngineEx::requiresPretransformedGlyphPositions(fontEngine, m);
|
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
|
bool QRasterPaintEngine::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const
|
||||||
{
|
{
|
||||||
// The raster engine does not support projected cached glyph drawing
|
// 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) {
|
if (reflect && step % 2) {
|
||||||
for (int i = stops.size() - 1; i > 0; --i) {
|
for (int i = stops.size() - 1; i > 0; --i) {
|
||||||
QGradientBound b;
|
QGradientBound b;
|
||||||
b.start = step + 1 - qBound(0., stops.at(i).first, 1.);
|
b.start = step + 1 - qBound(qreal(0.), stops.at(i).first, qreal(1.));
|
||||||
b.stop = step + 1 - qBound(0., stops.at(i - 1).first, 1.);
|
b.stop = step + 1 - qBound(qreal(0.), stops.at(i - 1).first, qreal(1.));
|
||||||
b.function = functions.at(i - 1);
|
b.function = functions.at(i - 1);
|
||||||
b.reverse = true;
|
b.reverse = true;
|
||||||
gradientBounds << b;
|
gradientBounds << b;
|
||||||
@ -2021,8 +2021,8 @@ int QPdfEnginePrivate::createShadingFunction(const QGradient *gradient, int from
|
|||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < stops.size() - 1; ++i) {
|
for (int i = 0; i < stops.size() - 1; ++i) {
|
||||||
QGradientBound b;
|
QGradientBound b;
|
||||||
b.start = step + qBound(0., stops.at(i).first, 1.);
|
b.start = step + qBound(qreal(0.), stops.at(i).first, qreal(1.));
|
||||||
b.stop = step + qBound(0., stops.at(i + 1).first, 1.);
|
b.stop = step + qBound(qreal(0.), stops.at(i + 1).first, qreal(1.));
|
||||||
b.function = functions.at(i);
|
b.function = functions.at(i);
|
||||||
b.reverse = false;
|
b.reverse = false;
|
||||||
gradientBounds << b;
|
gradientBounds << b;
|
||||||
|
@ -72,12 +72,14 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
#define SMOOTH_SCALABLE 0xffff
|
#define SMOOTH_SCALABLE 0xffff
|
||||||
|
|
||||||
|
#if defined(QT_BUILD_INTERNAL)
|
||||||
bool qt_enable_test_font = false;
|
bool qt_enable_test_font = false;
|
||||||
|
|
||||||
Q_AUTOTEST_EXPORT void qt_setQtEnableTestFont(bool value)
|
Q_AUTOTEST_EXPORT void qt_setQtEnableTestFont(bool value)
|
||||||
{
|
{
|
||||||
qt_enable_test_font = value;
|
qt_enable_test_font = value;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int getFontWeight(const QString &weightString)
|
static int getFontWeight(const QString &weightString)
|
||||||
{
|
{
|
||||||
@ -756,7 +758,47 @@ QString qt_resolveFontFamilyAlias(const QString &alias)
|
|||||||
return 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
|
// make sure that the db has all fallback families
|
||||||
QStringList retList = QGuiApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(family,style,styleHint,script);
|
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);
|
QFontEngine *engine = loadSingleEngine(script, request, family, foundry, style, size);
|
||||||
Q_ASSERT(!engine || engine->type() != QFontEngine::Multi);
|
Q_ASSERT(!engine || engine->type() != QFontEngine::Multi);
|
||||||
if (engine && !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol) {
|
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();
|
QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
|
||||||
QFontEngineMulti *pfMultiEngine = pfdb->fontEngineMulti(engine, QChar::Script(script));
|
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;
|
engine = pfMultiEngine;
|
||||||
|
|
||||||
// Cache Multi font engine as well in case we got the single
|
// 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;
|
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
|
// Until we specifically asked not to, try looking for Multi font engine
|
||||||
// first, the last '1' indicates that we want Multi font engine instead
|
// first, the last '1' indicates that we want Multi font engine instead
|
||||||
// of single ones
|
// of single ones
|
||||||
@ -2542,12 +2595,6 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
|
|||||||
|
|
||||||
parseFontName(request.family, foundry_name, family_name);
|
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;
|
QtFontDesc desc;
|
||||||
QList<int> blackListed;
|
QList<int> blackListed;
|
||||||
int index = match(script, request, family_name, foundry_name, &desc, 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;
|
styleHint = QFont::TypeWriter;
|
||||||
|
|
||||||
QStringList fallbacks = request.fallBackFamilies
|
QStringList fallbacks = request.fallBackFamilies
|
||||||
+ fallbackFamilies(request.family,
|
+ qt_fallbacksForFamily(request.family,
|
||||||
QFont::Style(request.style),
|
QFont::Style(request.style),
|
||||||
styleHint,
|
styleHint,
|
||||||
QChar::Script(script));
|
QChar::Script(script));
|
||||||
if (script > QChar::Script_Common)
|
if (script > QChar::Script_Common)
|
||||||
fallbacks += QString(); // Find the first font matching the specified script.
|
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()
|
void QFontEngineMulti::ensureFallbackFamiliesQueried()
|
||||||
{
|
{
|
||||||
if (QPlatformIntegration *integration = QGuiApplicationPrivate::platformIntegration()) {
|
QFont::StyleHint styleHint = QFont::StyleHint(fontDef.styleHint);
|
||||||
const QStringList fallbackFamilies = integration->fontDatabase()->fallbacksForFamily(fontDef.family,
|
if (styleHint == QFont::AnyStyle && fontDef.fixedPitch)
|
||||||
QFont::Style(fontDef.style),
|
styleHint = QFont::TypeWriter;
|
||||||
QFont::AnyStyle,
|
|
||||||
QChar::Script(m_script));
|
setFallbackFamiliesList(qt_fallbacksForFamily(fontDef.family, QFont::Style(fontDef.style), styleHint, QChar::Script(m_script)));
|
||||||
setFallbackFamiliesList(fallbackFamilies);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QFontEngineMulti::setFallbackFamiliesList(const QStringList &fallbackFamilies)
|
void QFontEngineMulti::setFallbackFamiliesList(const QStringList &fallbackFamilies)
|
||||||
|
@ -208,6 +208,11 @@ QFontMetrics &QFontMetrics::operator=(const QFontMetrics &fm)
|
|||||||
|
|
||||||
\since 5.2
|
\since 5.2
|
||||||
*/
|
*/
|
||||||
|
/*!
|
||||||
|
\fn QFontMetricsF &QFontMetricsF::operator=(QFontMetricsF &&other)
|
||||||
|
|
||||||
|
Move-assigns \a other to this QFontMetricsF instance.
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void QFontMetrics::swap(QFontMetrics &other)
|
\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
|
Returns a list of alternative fonts for the specified \a family and
|
||||||
\a style and \a script using the \a styleHint given.
|
\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
|
// implemented in qfontdatabase.cpp
|
||||||
{
|
|
||||||
Q_UNUSED(family);
|
|
||||||
Q_UNUSED(style);
|
|
||||||
Q_UNUSED(styleHint);
|
|
||||||
Q_UNUSED(script);
|
|
||||||
return QStringList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Adds an application font described by the font contained supplied \a fontData
|
Adds an application font described by the font contained supplied \a fontData
|
||||||
|
@ -135,9 +135,8 @@ bool Qt::mightBeRichText(const QString& text)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn QString Qt::convertFromPlainText(const QString &plain, WhiteSpaceMode mode)
|
|
||||||
|
|
||||||
|
/*!
|
||||||
Converts the plain text string \a plain to an HTML-formatted
|
Converts the plain text string \a plain to an HTML-formatted
|
||||||
paragraph while preserving most of its look.
|
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 RSA_ENCRYPTION_OID QByteArrayLiteral("1.2.840.113549.1.1.1")
|
||||||
#define DSA_ENCRYPTION_OID QByteArrayLiteral("1.2.840.10040.4.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
|
class Q_AUTOTEST_EXPORT QAsn1Element
|
||||||
{
|
{
|
||||||
@ -80,6 +81,7 @@ public:
|
|||||||
|
|
||||||
// context specific
|
// context specific
|
||||||
Context0Type = 0xA0,
|
Context0Type = 0xA0,
|
||||||
|
Context1Type = 0xA1,
|
||||||
Context3Type = 0xA3
|
Context3Type = 0xA3
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -366,8 +366,10 @@ bool QSslCertificatePrivate::parse(const QByteArray &data)
|
|||||||
const QByteArray oid = elem.toObjectId();
|
const QByteArray oid = elem.toObjectId();
|
||||||
if (oid == RSA_ENCRYPTION_OID)
|
if (oid == RSA_ENCRYPTION_OID)
|
||||||
publicKeyAlgorithm = QSsl::Rsa;
|
publicKeyAlgorithm = QSsl::Rsa;
|
||||||
else if (oid == RSA_ENCRYPTION_OID)
|
else if (oid == DSA_ENCRYPTION_OID)
|
||||||
publicKeyAlgorithm = QSsl::Dsa;
|
publicKeyAlgorithm = QSsl::Dsa;
|
||||||
|
else if (oid == EC_ENCRYPTION_OID)
|
||||||
|
publicKeyAlgorithm = QSsl::Ec;
|
||||||
else
|
else
|
||||||
publicKeyAlgorithm = QSsl::Opaque;
|
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,
|
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)
|
static int numberOfBits(const QByteArray &modulus)
|
||||||
{
|
{
|
||||||
int bits = modulus.size() * 8;
|
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)
|
if (params.isEmpty() || params[0].type() != QAsn1Element::IntegerType)
|
||||||
return;
|
return;
|
||||||
keyLength = numberOfBits(params[0].value());
|
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 {
|
} else {
|
||||||
@ -154,17 +201,35 @@ void QSslKeyPrivate::decodeDer(const QByteArray &der, bool deepClear)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// version
|
// version
|
||||||
if (items[0].type() != QAsn1Element::IntegerType || items[0].value().toHex() != "00")
|
if (items[0].type() != QAsn1Element::IntegerType)
|
||||||
return;
|
return;
|
||||||
|
const QByteArray versionHex = items[0].value().toHex();
|
||||||
|
|
||||||
if (algorithm == QSsl::Rsa) {
|
if (algorithm == QSsl::Rsa) {
|
||||||
|
if (versionHex != "00")
|
||||||
|
return;
|
||||||
if (items.size() != 9 || items[1].type() != QAsn1Element::IntegerType)
|
if (items.size() != 9 || items[1].type() != QAsn1Element::IntegerType)
|
||||||
return;
|
return;
|
||||||
keyLength = numberOfBits(items[1].value());
|
keyLength = numberOfBits(items[1].value());
|
||||||
} else if (algorithm == QSsl::Dsa) {
|
} else if (algorithm == QSsl::Dsa) {
|
||||||
|
if (versionHex != "00")
|
||||||
|
return;
|
||||||
if (items.size() != 6 || items[1].type() != QAsn1Element::IntegerType)
|
if (items.size() != 6 || items[1].type() != QAsn1Element::IntegerType)
|
||||||
return;
|
return;
|
||||||
keyLength = numberOfBits(items[1].value());
|
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);
|
bool retVal = d->plainSocket->setSocketDescriptor(socketDescriptor, state, openMode);
|
||||||
d->cachedSocketDescriptor = d->plainSocket->socketDescriptor();
|
d->cachedSocketDescriptor = d->plainSocket->socketDescriptor();
|
||||||
setSocketError(d->plainSocket->error());
|
setSocketError(d->plainSocket->error());
|
||||||
|
setErrorString(d->plainSocket->errorString());
|
||||||
setSocketState(state);
|
setSocketState(state);
|
||||||
setOpenMode(openMode);
|
setOpenMode(openMode);
|
||||||
setLocalPort(d->plainSocket->localPort());
|
setLocalPort(d->plainSocket->localPort());
|
||||||
|
@ -380,12 +380,9 @@ bool QSslSocketBackendPrivate::initSslContext()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((configuration.protocol == QSsl::TlsV1SslV3 ||
|
if (configuration.protocol != QSsl::SslV2 &&
|
||||||
configuration.protocol == QSsl::TlsV1_0 ||
|
configuration.protocol != QSsl::SslV3 &&
|
||||||
configuration.protocol == QSsl::TlsV1_1 ||
|
configuration.protocol != QSsl::UnknownProtocol &&
|
||||||
configuration.protocol == QSsl::TlsV1_2 ||
|
|
||||||
configuration.protocol == QSsl::SecureProtocols ||
|
|
||||||
configuration.protocol == QSsl::AnyProtocol) &&
|
|
||||||
mode == QSslSocket::SslClientMode && q_SSLeay() >= 0x00090806fL) {
|
mode == QSslSocket::SslClientMode && q_SSLeay() >= 0x00090806fL) {
|
||||||
// Set server hostname on TLS extension. RFC4366 section 3.1 requires it in ACE format.
|
// Set server hostname on TLS extension. RFC4366 section 3.1 requires it in ACE format.
|
||||||
QString tlsHostName = verificationPeerName.isEmpty() ? q->peerName() : verificationPeerName;
|
QString tlsHostName = verificationPeerName.isEmpty() ? q->peerName() : verificationPeerName;
|
||||||
|
@ -424,11 +424,10 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS
|
|||||||
if (!inCache)
|
if (!inCache)
|
||||||
shaderCache.store(newProg->program, QGLContext::currentContext());
|
shaderCache.store(newProg->program, QGLContext::currentContext());
|
||||||
} else {
|
} else {
|
||||||
QLatin1String none("none");
|
|
||||||
QLatin1String br("\n");
|
|
||||||
QString error;
|
QString error;
|
||||||
error = QLatin1String("Shader program failed to link,");
|
error = QLatin1String("Shader program failed to link,");
|
||||||
#if defined(QT_DEBUG)
|
#if defined(QT_DEBUG)
|
||||||
|
QLatin1String br("\n");
|
||||||
error += QLatin1String("\n Shaders Used:\n");
|
error += QLatin1String("\n Shaders Used:\n");
|
||||||
for (int i = 0; i < newProg->program->shaders().count(); ++i) {
|
for (int i = 0; i < newProg->program->shaders().count(); ++i) {
|
||||||
QGLShader *shader = newProg->program->shaders().at(i);
|
QGLShader *shader = newProg->program->shaders().at(i);
|
||||||
|
@ -2168,6 +2168,9 @@ QGLContext::QGLContext(QOpenGLContext *context)
|
|||||||
d->setupSharing();
|
d->setupSharing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the OpenGL context handle.
|
||||||
|
*/
|
||||||
QOpenGLContext *QGLContext::contextHandle() const
|
QOpenGLContext *QGLContext::contextHandle() const
|
||||||
{
|
{
|
||||||
Q_D(const QGLContext);
|
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.
|
parameter.
|
||||||
*/
|
*/
|
||||||
QGLContext *QGLContext::fromOpenGLContext(QOpenGLContext *context)
|
QGLContext *QGLContext::fromOpenGLContext(QOpenGLContext *context)
|
||||||
@ -4355,7 +4358,7 @@ void QGLWidget::resizeOverlayGL(int, int)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!\reimp
|
/*!\reimp
|
||||||
*/
|
*/
|
||||||
bool QGLWidget::event(QEvent *e)
|
bool QGLWidget::event(QEvent *e)
|
||||||
{
|
{
|
||||||
Q_D(QGLWidget);
|
Q_D(QGLWidget);
|
||||||
|
@ -208,3 +208,4 @@
|
|||||||
Returns the unsigned integer result of calling the function or
|
Returns the unsigned integer result of calling the function or
|
||||||
UINT_MAX if the function was not found.
|
UINT_MAX if the function was not found.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -55,23 +55,24 @@ QT_BEGIN_NAMESPACE
|
|||||||
void QBasicFontDatabase::populateFontDatabase()
|
void QBasicFontDatabase::populateFontDatabase()
|
||||||
{
|
{
|
||||||
QString fontpath = fontDir();
|
QString fontpath = fontDir();
|
||||||
|
QDir dir(fontpath);
|
||||||
|
|
||||||
if(!QFile::exists(fontpath)) {
|
if (!dir.exists()) {
|
||||||
qWarning("QFontDatabase: Cannot find font directory %s - is Qt installed correctly?",
|
qWarning("QFontDatabase: Cannot find font directory %s - is Qt installed correctly?",
|
||||||
qPrintable(fontpath));
|
qPrintable(fontpath));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDir dir(fontpath);
|
QStringList nameFilters;
|
||||||
dir.setNameFilters(QStringList() << QLatin1String("*.ttf")
|
nameFilters << QLatin1String("*.ttf")
|
||||||
<< QLatin1String("*.ttc") << QLatin1String("*.pfa")
|
<< QLatin1String("*.ttc")
|
||||||
<< QLatin1String("*.pfb")
|
<< QLatin1String("*.pfa")
|
||||||
<< QLatin1String("*.otf"));
|
<< QLatin1String("*.pfb")
|
||||||
dir.refresh();
|
<< QLatin1String("*.otf");
|
||||||
for (int i = 0; i < int(dir.count()); ++i) {
|
|
||||||
const QByteArray file = QFile::encodeName(dir.absoluteFilePath(dir[i]));
|
foreach (const QFileInfo &fi, dir.entryInfoList(nameFilters, QDir::Files)) {
|
||||||
// qDebug() << "looking at" << file;
|
const QByteArray file = QFile::encodeName(fi.absoluteFilePath());
|
||||||
addTTFile(QByteArray(), file);
|
QBasicFontDatabase::addTTFile(QByteArray(), file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,18 +177,9 @@ QFontEngine *QBasicFontDatabase::fontEngine(const QByteArray &fontData, qreal pi
|
|||||||
return fe;
|
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)
|
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)
|
void QBasicFontDatabase::releaseHandle(void *handle)
|
||||||
@ -198,7 +190,7 @@ void QBasicFontDatabase::releaseHandle(void *handle)
|
|||||||
|
|
||||||
extern FT_Library qt_getFreetype();
|
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();
|
FT_Library library = qt_getFreetype();
|
||||||
|
|
||||||
@ -237,8 +229,6 @@ QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByt
|
|||||||
if (cm->encoding == FT_ENCODING_ADOBE_CUSTOM
|
if (cm->encoding == FT_ENCODING_ADOBE_CUSTOM
|
||||||
|| cm->encoding == FT_ENCODING_MS_SYMBOL) {
|
|| cm->encoding == FT_ENCODING_MS_SYMBOL) {
|
||||||
writingSystems.setSupported(QFontDatabase::Symbol);
|
writingSystems.setSupported(QFontDatabase::Symbol);
|
||||||
if (supportedWritingSystems)
|
|
||||||
supportedWritingSystems->setSupported(QFontDatabase::Symbol);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -257,8 +247,6 @@ QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByt
|
|||||||
};
|
};
|
||||||
|
|
||||||
writingSystems = QPlatformFontDatabase::writingSystemsFromTrueTypeBits(unicodeRange, codePageRange);
|
writingSystems = QPlatformFontDatabase::writingSystemsFromTrueTypeBits(unicodeRange, codePageRange);
|
||||||
if (supportedWritingSystems)
|
|
||||||
*supportedWritingSystems = writingSystems;
|
|
||||||
|
|
||||||
if (os2->usWeightClass) {
|
if (os2->usWeightClass) {
|
||||||
weight = QPlatformFontDatabase::weightFromInteger(os2->usWeightClass);
|
weight = QPlatformFontDatabase::weightFromInteger(os2->usWeightClass);
|
||||||
|
@ -63,11 +63,10 @@ public:
|
|||||||
void populateFontDatabase() Q_DECL_OVERRIDE;
|
void populateFontDatabase() Q_DECL_OVERRIDE;
|
||||||
QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) 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;
|
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;
|
QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName) Q_DECL_OVERRIDE;
|
||||||
void releaseHandle(void *handle) 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
|
QT_END_NAMESPACE
|
||||||
|
@ -5,6 +5,7 @@ PLUGIN_CLASS_NAME = QGifPlugin
|
|||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
|
||||||
include(../../../gui/image/qgifhandler.pri)
|
include(../../../gui/image/qgifhandler.pri)
|
||||||
|
INCLUDEPATH += ../../../gui/image
|
||||||
SOURCES += $$PWD/main.cpp
|
SOURCES += $$PWD/main.cpp
|
||||||
HEADERS += $$PWD/main.h
|
HEADERS += $$PWD/main.h
|
||||||
OTHER_FILES += gif.json
|
OTHER_FILES += gif.json
|
||||||
|
@ -9,6 +9,7 @@ QT += core-private
|
|||||||
QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)"
|
QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)"
|
||||||
|
|
||||||
include(../../../gui/image/qjpeghandler.pri)
|
include(../../../gui/image/qjpeghandler.pri)
|
||||||
|
INCLUDEPATH += ../../../gui/image
|
||||||
SOURCES += main.cpp
|
SOURCES += main.cpp
|
||||||
HEADERS += main.h
|
HEADERS += main.h
|
||||||
OTHER_FILES += jpeg.json
|
OTHER_FILES += jpeg.json
|
||||||
|
@ -443,6 +443,11 @@ static void *startMainMethod(void */*data*/)
|
|||||||
if (m_applicationClass)
|
if (m_applicationClass)
|
||||||
QJNIObjectPrivate::callStaticMethod<void>(m_applicationClass, "quitApp", "()V");
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,26 +45,20 @@ QString QAndroidPlatformFontDatabase::fontDir() const
|
|||||||
void QAndroidPlatformFontDatabase::populateFontDatabase()
|
void QAndroidPlatformFontDatabase::populateFontDatabase()
|
||||||
{
|
{
|
||||||
QString fontpath = fontDir();
|
QString fontpath = fontDir();
|
||||||
|
QDir dir(fontpath);
|
||||||
|
|
||||||
if (!QFile::exists(fontpath)) {
|
if (!dir.exists()) {
|
||||||
qFatal("QFontDatabase: Cannot find font directory %s - is Qt installed correctly?",
|
qFatal("QFontDatabase: Cannot find font directory %s - is Qt installed correctly?",
|
||||||
qPrintable(fontpath));
|
qPrintable(fontpath));
|
||||||
}
|
}
|
||||||
|
|
||||||
QDir dir(fontpath);
|
QStringList nameFilters;
|
||||||
QList<QFileInfo> entries = dir.entryInfoList(QStringList() << QStringLiteral("*.ttf") << QStringLiteral("*.otf"), QDir::Files);
|
nameFilters << QLatin1String("*.ttf")
|
||||||
for (int i = 0; i < int(entries.count()); ++i) {
|
<< QLatin1String("*.otf");
|
||||||
const QByteArray file = QFile::encodeName(entries.at(i).absoluteFilePath());
|
|
||||||
QSupportedWritingSystems supportedWritingSystems;
|
|
||||||
QStringList families = addTTFile(QByteArray(), file, &supportedWritingSystems);
|
|
||||||
|
|
||||||
extern int qt_script_for_writing_system(QFontDatabase::WritingSystem writingSystem);
|
foreach (const QFileInfo &fi, dir.entryInfoList(nameFilters, QDir::Files)) {
|
||||||
for (int i = 0; i < QFontDatabase::WritingSystemsCount; ++i) {
|
const QByteArray file = QFile::encodeName(fi.absoluteFilePath());
|
||||||
if (i == QFontDatabase::Any || supportedWritingSystems.supported(QFontDatabase::WritingSystem(i))) {
|
QBasicFontDatabase::addTTFile(QByteArray(), file);
|
||||||
QChar::Script script = QChar::Script(qt_script_for_writing_system(QFontDatabase::WritingSystem(i)));
|
|
||||||
m_fallbacks[script] += families;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,15 +67,16 @@ QStringList QAndroidPlatformFontDatabase::fallbacksForFamily(const QString &fami
|
|||||||
QFont::StyleHint styleHint,
|
QFont::StyleHint styleHint,
|
||||||
QChar::Script script) const
|
QChar::Script script) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(family);
|
QStringList result;
|
||||||
Q_UNUSED(style);
|
|
||||||
|
|
||||||
if (styleHint == QFont::Monospace || styleHint == QFont::Courier)
|
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)
|
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
|
QT_END_NAMESPACE
|
||||||
|
@ -47,9 +47,6 @@ public:
|
|||||||
QFont::Style style,
|
QFont::Style style,
|
||||||
QFont::StyleHint styleHint,
|
QFont::StyleHint styleHint,
|
||||||
QChar::Script script) const;
|
QChar::Script script) const;
|
||||||
|
|
||||||
private:
|
|
||||||
QHash<QChar::Script, QStringList> m_fallbacks;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -1435,8 +1435,12 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
|||||||
|
|
||||||
if (eventType == QEvent::KeyPress) {
|
if (eventType == QEvent::KeyPress) {
|
||||||
|
|
||||||
if (m_composingText.isEmpty())
|
if (m_composingText.isEmpty()) {
|
||||||
m_sendKeyEvent = !QWindowSystemInterface::tryHandleShortcutEvent(focusWindow, timestamp, keyCode, modifiers, text, [nsevent isARepeat], 1);
|
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();
|
QObject *fo = QGuiApplication::focusObject();
|
||||||
if (m_sendKeyEvent && fo) {
|
if (m_sendKeyEvent && fo) {
|
||||||
|
@ -50,15 +50,15 @@ public:
|
|||||||
QIOSContext(QOpenGLContext *context);
|
QIOSContext(QOpenGLContext *context);
|
||||||
~QIOSContext();
|
~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);
|
bool makeCurrent(QPlatformSurface *surface) Q_DECL_OVERRIDE;
|
||||||
void doneCurrent();
|
void doneCurrent() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
GLuint defaultFramebufferObject(QPlatformSurface *) const;
|
GLuint defaultFramebufferObject(QPlatformSurface *) const Q_DECL_OVERRIDE;
|
||||||
QFunctionPointer getProcAddress(const QByteArray &procName);
|
QFunctionPointer getProcAddress(const QByteArray &procName) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
bool isSharing() const Q_DECL_OVERRIDE;
|
bool isSharing() const Q_DECL_OVERRIDE;
|
||||||
bool isValid() const Q_DECL_OVERRIDE;
|
bool isValid() const Q_DECL_OVERRIDE;
|
||||||
|
@ -304,7 +304,7 @@ public:
|
|||||||
return g_iteratorCurrentUrl.localData();
|
return g_iteratorCurrentUrl.localData();
|
||||||
}
|
}
|
||||||
|
|
||||||
QFileInfo currentFileInfo() const
|
QFileInfo currentFileInfo() const Q_DECL_OVERRIDE
|
||||||
{
|
{
|
||||||
return QFileInfo(currentFileName());
|
return QFileInfo(currentFileName());
|
||||||
}
|
}
|
||||||
|
@ -54,26 +54,26 @@ public:
|
|||||||
QIOSIntegration();
|
QIOSIntegration();
|
||||||
~QIOSIntegration();
|
~QIOSIntegration();
|
||||||
|
|
||||||
bool hasCapability(Capability cap) const;
|
bool hasCapability(Capability cap) const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
QPlatformWindow *createPlatformWindow(QWindow *window) const;
|
QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE;
|
||||||
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
|
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;
|
QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
QPlatformFontDatabase *fontDatabase() const;
|
QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
|
||||||
QPlatformClipboard *clipboard() const;
|
QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE;
|
||||||
QPlatformInputContext *inputContext() const;
|
QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE;
|
||||||
QPlatformServices *services() 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;
|
QStringList themeNames() const Q_DECL_OVERRIDE;
|
||||||
QPlatformTheme *createPlatformTheme(const QString &name) const;
|
QPlatformTheme *createPlatformTheme(const QString &name) const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
QAbstractEventDispatcher *createEventDispatcher() const;
|
QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE;
|
||||||
QPlatformNativeInterface *nativeInterface() const;
|
QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
QTouchDevice *touchDevice();
|
QTouchDevice *touchDevice();
|
||||||
QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE;
|
QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE;
|
||||||
@ -86,7 +86,7 @@ public:
|
|||||||
|
|
||||||
// -- QPlatformNativeInterface --
|
// -- QPlatformNativeInterface --
|
||||||
|
|
||||||
void *nativeResourceForWindow(const QByteArray &resource, QWindow *window);
|
void *nativeResourceForWindow(const QByteArray &resource, QWindow *window) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
void setDebugWindowManagement(bool);
|
void setDebugWindowManagement(bool);
|
||||||
bool debugWindowManagement() const;
|
bool debugWindowManagement() const;
|
||||||
|
@ -81,7 +81,7 @@ QIOSIntegration::QIOSIntegration()
|
|||||||
// QPlatformBackingStore.
|
// QPlatformBackingStore.
|
||||||
qApp->setAttribute(Qt::AA_ShareOpenGLContexts, true);
|
qApp->setAttribute(Qt::AA_ShareOpenGLContexts, true);
|
||||||
// And that context must match the format used for the backingstore's context.
|
// And that context must match the format used for the backingstore's context.
|
||||||
QSurfaceFormat fmt;
|
QSurfaceFormat fmt = QSurfaceFormat::defaultFormat();
|
||||||
fmt.setDepthBufferSize(16);
|
fmt.setDepthBufferSize(16);
|
||||||
fmt.setStencilBufferSize(8);
|
fmt.setStencilBufferSize(8);
|
||||||
QSurfaceFormat::setDefaultFormat(fmt);
|
QSurfaceFormat::setDefaultFormat(fmt);
|
||||||
|
@ -112,7 +112,7 @@ public:
|
|||||||
static id menuActionTarget() { return m_currentMenu ? m_currentMenu->m_menuController : 0; }
|
static id menuActionTarget() { return m_currentMenu ? m_currentMenu->m_menuController : 0; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *event);
|
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
quintptr m_tag;
|
quintptr m_tag;
|
||||||
|
@ -50,17 +50,17 @@ public:
|
|||||||
QIOSScreen(UIScreen *screen);
|
QIOSScreen(UIScreen *screen);
|
||||||
~QIOSScreen();
|
~QIOSScreen();
|
||||||
|
|
||||||
QRect geometry() const;
|
QRect geometry() const Q_DECL_OVERRIDE;
|
||||||
QRect availableGeometry() const;
|
QRect availableGeometry() const Q_DECL_OVERRIDE;
|
||||||
int depth() const;
|
int depth() const Q_DECL_OVERRIDE;
|
||||||
QImage::Format format() const;
|
QImage::Format format() const Q_DECL_OVERRIDE;
|
||||||
QSizeF physicalSize() const;
|
QSizeF physicalSize() const Q_DECL_OVERRIDE;
|
||||||
QDpi logicalDpi() const;
|
QDpi logicalDpi() const Q_DECL_OVERRIDE;
|
||||||
qreal devicePixelRatio() const;
|
qreal devicePixelRatio() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
Qt::ScreenOrientation nativeOrientation() const;
|
Qt::ScreenOrientation nativeOrientation() const Q_DECL_OVERRIDE;
|
||||||
Qt::ScreenOrientation orientation() const;
|
Qt::ScreenOrientation orientation() const Q_DECL_OVERRIDE;
|
||||||
void setOrientationUpdateMask(Qt::ScreenOrientations mask);
|
void setOrientationUpdateMask(Qt::ScreenOrientations mask) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
UIScreen *uiScreen() const;
|
UIScreen *uiScreen() const;
|
||||||
UIWindow *uiWindow() const;
|
UIWindow *uiWindow() const;
|
||||||
|
@ -221,6 +221,8 @@
|
|||||||
self.keyboardType = UIKeyboardTypePhonePad;
|
self.keyboardType = UIKeyboardTypePhonePad;
|
||||||
else if (hints & Qt::ImhLatinOnly)
|
else if (hints & Qt::ImhLatinOnly)
|
||||||
self.keyboardType = UIKeyboardTypeASCIICapable;
|
self.keyboardType = UIKeyboardTypeASCIICapable;
|
||||||
|
else if (hints & Qt::ImhPreferNumbers)
|
||||||
|
self.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
|
||||||
else
|
else
|
||||||
self.keyboardType = UIKeyboardTypeDefault;
|
self.keyboardType = UIKeyboardTypeDefault;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
~QIOSTheme();
|
~QIOSTheme();
|
||||||
|
|
||||||
const QPalette *palette(Palette type = SystemPalette) const Q_DECL_OVERRIDE;
|
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;
|
QPlatformMenuItem* createPlatformMenuItem() const Q_DECL_OVERRIDE;
|
||||||
QPlatformMenu* createPlatformMenu() const Q_DECL_OVERRIDE;
|
QPlatformMenu* createPlatformMenu() const Q_DECL_OVERRIDE;
|
||||||
@ -55,7 +55,7 @@ public:
|
|||||||
bool usePlatformNativeDialog(DialogType type) const Q_DECL_OVERRIDE;
|
bool usePlatformNativeDialog(DialogType type) const Q_DECL_OVERRIDE;
|
||||||
QPlatformDialogHelper *createPlatformDialogHelper(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;
|
static const char *name;
|
||||||
|
|
||||||
|
@ -54,29 +54,29 @@ public:
|
|||||||
explicit QIOSWindow(QWindow *window);
|
explicit QIOSWindow(QWindow *window);
|
||||||
~QIOSWindow();
|
~QIOSWindow();
|
||||||
|
|
||||||
void setGeometry(const QRect &rect);
|
void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
void setWindowState(Qt::WindowState state);
|
void setWindowState(Qt::WindowState state) Q_DECL_OVERRIDE;
|
||||||
void setParent(const QPlatformWindow *window);
|
void setParent(const QPlatformWindow *window) Q_DECL_OVERRIDE;
|
||||||
void handleContentOrientationChange(Qt::ScreenOrientation orientation);
|
void handleContentOrientationChange(Qt::ScreenOrientation orientation) Q_DECL_OVERRIDE;
|
||||||
void setVisible(bool visible);
|
void setVisible(bool visible) Q_DECL_OVERRIDE;
|
||||||
void setOpacity(qreal level) Q_DECL_OVERRIDE;
|
void setOpacity(qreal level) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
bool isExposed() const Q_DECL_OVERRIDE;
|
bool isExposed() const Q_DECL_OVERRIDE;
|
||||||
void propagateSizeHints() Q_DECL_OVERRIDE {}
|
void propagateSizeHints() Q_DECL_OVERRIDE {}
|
||||||
|
|
||||||
void raise() { raiseOrLower(true); }
|
void raise() Q_DECL_OVERRIDE{ raiseOrLower(true); }
|
||||||
void lower() { raiseOrLower(false); }
|
void lower() Q_DECL_OVERRIDE { raiseOrLower(false); }
|
||||||
|
|
||||||
bool shouldAutoActivateWindow() const;
|
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 setMouseGrabEnabled(bool grab) Q_DECL_OVERRIDE { return grab; }
|
||||||
bool setKeyboardGrabEnabled(bool grab) { 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();
|
void clearAccessibleCache();
|
||||||
|
|
||||||
|
@ -689,7 +689,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accChild(VARIANT varChildI
|
|||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
QAccessibleInterface *acc = childPointer(accessible, varChildID);
|
QAccessibleInterface *acc = childPointer(accessible, varChildID);
|
||||||
if (acc) {
|
if (acc && acc->isValid()) {
|
||||||
*ppdispChild = QWindowsAccessibility::wrap(acc);
|
*ppdispChild = QWindowsAccessibility::wrap(acc);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@ -778,7 +778,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accDescription(VARIANT var
|
|||||||
QString descr;
|
QString descr;
|
||||||
if (varID.lVal) {
|
if (varID.lVal) {
|
||||||
QAccessibleInterface *child = childPointer(accessible, varID);
|
QAccessibleInterface *child = childPointer(accessible, varID);
|
||||||
if (!child)
|
if (!child || !child->isValid())
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
descr = child->text(QAccessible::Description);
|
descr = child->text(QAccessible::Description);
|
||||||
} else {
|
} else {
|
||||||
@ -803,7 +803,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accHelp(VARIANT varID, BST
|
|||||||
QString help;
|
QString help;
|
||||||
if (varID.lVal) {
|
if (varID.lVal) {
|
||||||
QAccessibleInterface *child = childPointer(accessible, varID);
|
QAccessibleInterface *child = childPointer(accessible, varID);
|
||||||
if (!child)
|
if (!child || !child->isValid())
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
help = child->text(QAccessible::Help);
|
help = child->text(QAccessible::Help);
|
||||||
} else {
|
} else {
|
||||||
@ -862,7 +862,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accName(VARIANT varID, BST
|
|||||||
QString name;
|
QString name;
|
||||||
if (varID.lVal) {
|
if (varID.lVal) {
|
||||||
QAccessibleInterface *child = childPointer(accessible, varID);
|
QAccessibleInterface *child = childPointer(accessible, varID);
|
||||||
if (!child)
|
if (!child || !child->isValid())
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
name = child->text(QAccessible::Name);
|
name = child->text(QAccessible::Name);
|
||||||
if (name.isEmpty()) {
|
if (name.isEmpty()) {
|
||||||
@ -910,7 +910,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accRole(VARIANT varID, VAR
|
|||||||
QAccessible::Role role;
|
QAccessible::Role role;
|
||||||
if (varID.lVal) {
|
if (varID.lVal) {
|
||||||
QAccessibleInterface *child = childPointer(accessible, varID);
|
QAccessibleInterface *child = childPointer(accessible, varID);
|
||||||
if (!child)
|
if (!child || !child->isValid())
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
role = child->role();
|
role = child->role();
|
||||||
} else {
|
} else {
|
||||||
@ -947,7 +947,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accState(VARIANT varID, VA
|
|||||||
QAccessible::State state;
|
QAccessible::State state;
|
||||||
if (varID.lVal) {
|
if (varID.lVal) {
|
||||||
QAccessibleInterface *child = childPointer(accessible, varID);
|
QAccessibleInterface *child = childPointer(accessible, varID);
|
||||||
if (!child)
|
if (!child || !child->isValid())
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
state = child->state();
|
state = child->state();
|
||||||
} else {
|
} else {
|
||||||
|
@ -69,25 +69,28 @@ static const char formatTextHtmlC[] = "text/html";
|
|||||||
\ingroup qt-lighthouse-win
|
\ingroup qt-lighthouse-win
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QDebug operator<<(QDebug d, const QMimeData &m)
|
static QDebug operator<<(QDebug d, const QMimeData *mimeData)
|
||||||
{
|
{
|
||||||
QDebugStateSaver saver(d);
|
QDebugStateSaver saver(d);
|
||||||
d.nospace();
|
d.nospace();
|
||||||
const QStringList formats = m.formats();
|
d << "QMimeData(";
|
||||||
d << "QMimeData: " << formats.join(QStringLiteral(", ")) << '\n'
|
if (mimeData) {
|
||||||
<< " Text=" << m.hasText() << " HTML=" << m.hasHtml()
|
const QStringList formats = mimeData->formats();
|
||||||
<< " Color=" << m.hasColor() << " Image=" << m.hasImage()
|
d << "formats=" << formats.join(QStringLiteral(", "));
|
||||||
<< " URLs=" << m.hasUrls() << '\n';
|
if (mimeData->hasText())
|
||||||
if (m.hasText())
|
d << ", text=" << mimeData->text();
|
||||||
d << " Text: '" << m.text() << "'\n";
|
if (mimeData->hasHtml())
|
||||||
if (m.hasHtml())
|
d << ", html=" << mimeData->html();
|
||||||
d << " HTML: '" << m.html() << "'\n";
|
if (mimeData->hasColor())
|
||||||
if (m.hasColor())
|
d << ", colorData=" << qvariant_cast<QColor>(mimeData->colorData());
|
||||||
d << " Color: " << qvariant_cast<QColor>(m.colorData()) << '\n';
|
if (mimeData->hasImage())
|
||||||
if (m.hasImage())
|
d << ", imageData=" << qvariant_cast<QImage>(mimeData->imageData());
|
||||||
d << " Image: " << qvariant_cast<QImage>(m.imageData()).size() << '\n';
|
if (mimeData->hasUrls())
|
||||||
if (m.hasUrls())
|
d << ", urls=" << mimeData->urls();
|
||||||
d << " URLs: " << m.urls() << '\n';
|
} else {
|
||||||
|
d << '0';
|
||||||
|
}
|
||||||
|
d << ')';
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +300,7 @@ QMimeData *QWindowsClipboard::mimeData(QClipboard::Mode mode)
|
|||||||
|
|
||||||
void QWindowsClipboard::setMimeData(QMimeData *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)
|
if (mode != QClipboard::Clipboard)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -918,7 +918,11 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
|||||||
case QtWindows::InputMethodRequest:
|
case QtWindows::InputMethodRequest:
|
||||||
return QWindowsInputContext::instance()->handleIME_Request(wParam, lParam, result);
|
return QWindowsInputContext::instance()->handleIME_Request(wParam, lParam, result);
|
||||||
case QtWindows::GestureEvent:
|
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::InputMethodOpenCandidateWindowEvent:
|
||||||
case QtWindows::InputMethodCloseCandidateWindowEvent:
|
case QtWindows::InputMethodCloseCandidateWindowEvent:
|
||||||
// TODO: Release/regrab mouse if a popup has mouse grab.
|
// 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,
|
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 QString familyName = QString::fromWCharArray(f->elfLogFont.lfFaceName);
|
||||||
const uchar charSet = f->elfLogFont.lfCharSet;
|
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
|
// 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
|
// identical to a TEXTMETRIC except for the last four members, which we don't use
|
||||||
// anyway
|
// anyway
|
||||||
addFontToDatabase(familyName, charSet, (TEXTMETRIC *)textmetric, &signature, type, false);
|
addFontToDatabase(familyName, charSet, (TEXTMETRIC *)textmetric, &signature, type, registerAlias);
|
||||||
|
|
||||||
// keep on enumerating
|
// keep on enumerating
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWindowsFontDatabase::populateFamily(const QString &familyName)
|
void QWindowsFontDatabase::populateFamily(const QString &familyName, bool registerAlias)
|
||||||
{
|
{
|
||||||
qCDebug(lcQpaFonts) << familyName;
|
qCDebug(lcQpaFonts) << familyName;
|
||||||
if (familyName.size() >= LF_FACESIZE) {
|
if (familyName.size() >= LF_FACESIZE) {
|
||||||
@ -962,10 +962,15 @@ void QWindowsFontDatabase::populateFamily(const QString &familyName)
|
|||||||
familyName.toWCharArray(lf.lfFaceName);
|
familyName.toWCharArray(lf.lfFaceName);
|
||||||
lf.lfFaceName[familyName.size()] = 0;
|
lf.lfFaceName[familyName.size()] = 0;
|
||||||
lf.lfPitchAndFamily = 0;
|
lf.lfPitchAndFamily = 0;
|
||||||
EnumFontFamiliesEx(dummy, &lf, (FONTENUMPROC)storeFont, 0, 0);
|
EnumFontFamiliesEx(dummy, &lf, (FONTENUMPROC)storeFont, (LPARAM)registerAlias, 0);
|
||||||
ReleaseDC(0, dummy);
|
ReleaseDC(0, dummy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QWindowsFontDatabase::populateFamily(const QString &familyName)
|
||||||
|
{
|
||||||
|
populateFamily(familyName, false);
|
||||||
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
// Context for enumerating system fonts, records whether the default font has been encountered,
|
// Context for enumerating system fonts, records whether the default font has been encountered,
|
||||||
// which is normally not enumerated by EnumFontFamiliesEx().
|
// which is normally not enumerated by EnumFontFamiliesEx().
|
||||||
@ -1075,11 +1080,7 @@ QWindowsFontDatabase::~QWindowsFontDatabase()
|
|||||||
|
|
||||||
QFontEngineMulti *QWindowsFontDatabase::fontEngineMulti(QFontEngine *fontEngine, QChar::Script script)
|
QFontEngineMulti *QWindowsFontDatabase::fontEngineMulti(QFontEngine *fontEngine, QChar::Script script)
|
||||||
{
|
{
|
||||||
if (script == QChar::Script_Common)
|
return new QWindowsMultiFontEngine(fontEngine, script);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QFontEngine * QWindowsFontDatabase::fontEngine(const QFontDef &fontDef, void *handle)
|
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.
|
// Fonts based on files are added via populate, as they will show up in font enumeration.
|
||||||
for (int j = 0; j < families.count(); ++j)
|
for (int j = 0; j < families.count(); ++j)
|
||||||
populateFamily(families.at(j));
|
populateFamily(families.at(j), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_applicationFonts << font;
|
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 QWindowsFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
|
||||||
{
|
{
|
||||||
QStringList result = QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script);
|
QStringList result;
|
||||||
if (!result.isEmpty())
|
|
||||||
return result;
|
|
||||||
result.append(QWindowsFontDatabase::familyForStyleHint(styleHint));
|
result.append(QWindowsFontDatabase::familyForStyleHint(styleHint));
|
||||||
result.append(QWindowsFontDatabase::extraTryFontsForFamily(family));
|
result.append(QWindowsFontDatabase::extraTryFontsForFamily(family));
|
||||||
|
result.append(QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script));
|
||||||
|
|
||||||
qCDebug(lcQpaFonts) << __FUNCTION__ << family << style << styleHint
|
qCDebug(lcQpaFonts) << __FUNCTION__ << family << style << styleHint
|
||||||
<< script << result;
|
<< script << result;
|
||||||
|
@ -100,6 +100,7 @@ public:
|
|||||||
static QString familyForStyleHint(QFont::StyleHint styleHint);
|
static QString familyForStyleHint(QFont::StyleHint styleHint);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void populateFamily(const QString &familyName, bool registerAlias);
|
||||||
void removeApplicationFonts();
|
void removeApplicationFonts();
|
||||||
|
|
||||||
struct WinApplicationFont {
|
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 QWindowsFontDatabaseFT::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
|
||||||
{
|
{
|
||||||
QStringList result = QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script);
|
QStringList result;
|
||||||
if (!result.isEmpty())
|
|
||||||
return result;
|
|
||||||
|
|
||||||
result.append(QWindowsFontDatabase::familyForStyleHint(styleHint));
|
result.append(QWindowsFontDatabase::familyForStyleHint(styleHint));
|
||||||
|
|
||||||
@ -679,6 +677,8 @@ QStringList QWindowsFontDatabaseFT::fallbacksForFamily(const QString &family, QF
|
|||||||
|
|
||||||
result.append(QWindowsFontDatabase::extraTryFontsForFamily(family));
|
result.append(QWindowsFontDatabase::extraTryFontsForFamily(family));
|
||||||
|
|
||||||
|
result.append(QPlatformFontDatabase::fallbacksForFamily(family, style, styleHint, script));
|
||||||
|
|
||||||
qCDebug(lcQpaFonts) << __FUNCTION__ << family << style << styleHint
|
qCDebug(lcQpaFonts) << __FUNCTION__ << family << style << styleHint
|
||||||
<< script << result;
|
<< script << result;
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co
|
|||||||
switch (hint) {
|
switch (hint) {
|
||||||
case QPlatformIntegration::CursorFlashTime:
|
case QPlatformIntegration::CursorFlashTime:
|
||||||
if (const unsigned timeMS = GetCaretBlinkTime())
|
if (const unsigned timeMS = GetCaretBlinkTime())
|
||||||
return QVariant(int(timeMS) * 2);
|
return QVariant(timeMS != INFINITE ? int(timeMS) * 2 : 0);
|
||||||
break;
|
break;
|
||||||
#ifdef SPI_GETKEYBOARDSPEED
|
#ifdef SPI_GETKEYBOARDSPEED
|
||||||
case KeyboardAutoRepeatRate:
|
case KeyboardAutoRepeatRate:
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user