Commit Graph

28559 Commits

Author SHA1 Message Date
R.J.V. Bertin
6b52c1834d Offscreen QPA: use a CoreText font database on macOS
Without this applications using the Offscreen QPA don't have
access to any fonts on macOS and thus cannot render text correctly.

Task-number: QTBUG-72335
Change-Id: I8e58c066365d0231d0993ad3b480d957a32f7f7b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-11 18:54:52 +00:00
Allan Sandfeld Jensen
9fbce8d5cb Avoid crash in blitting or fast draw when QPointF is too big
Change-Id: I88182d5d95fda15d33836f16dee78167685b3765
Fixes: QTBUG-72392
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-12-11 18:32:53 +00:00
Alberto Mardegan
9ee29b826c QCommonStyle: fetch flat property from style option
The same information is available both from the QGroupBox API and from
the QStyleOption; we should prefer the latter, because this makes it
easier to use QStyle from QQuick.Controls (where a QGroupBox is not
instantiated).

Change-Id: I05ed1e3406676bde5d124d395d43caa0961c4f2d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-11 14:04:10 +00:00
Paul Wicking
9400a120ea Doc: Fix typo in snippet
Resolves "reference to non-static member function must be called" error.

Fixes: QTBUG-72403
Change-Id: Iebd865ff553736df43548b72b45ed3f4711fffc1
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-12-11 14:03:11 +00:00
Oliver Wolff
d99b3c451b ANGLE: Dynamically load D3D compiler from a list
If the default compiler cannot be found, load it from a list of DLL names,
including a non-versioned proxy DLL provided by Qt. On Desktop Windows,
the default compiler can also be specified by an environment variable,
QT_D3DCOMPILER_DLL.

Change-Id: I590bb11e58339451d187860c449b0209c1ca0578
Reviewed-by: Dmitry Kazakov <dimula73@gmail.com>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2018-12-11 09:45:55 +00:00
Christian Ehrlicher
e56c79dc9d QTreeWidget: mark is/setFirstItemColumnSpanned() as deprecated
Deprecate the QTreeWidget functions is/setFirstItemColumnSpanned() to
stay in sync with the other deprecated functions
(selected/expanded/hidden) so they can get removed in Qt6.
Also add a small unit test for them.

Change-Id: Ie1cb5d7163c2d56d653c21e841ccaf7d38569787
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-11 06:46:42 +00:00
Thiago Macieira
f56ca2c4f6 QResource: de-inline registerSelf for files
No other changes, aside from the coding style update to make sure the
coding style bot won't complain.

Change-Id: Iae320a2868db402a993dfffd15689a8a6ac202e8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-11 03:58:55 +00:00
Thiago Macieira
57b4b45cbd RCC: introduce compression algorithm "best"
This compression algorithm is permitted in the XML sources, which
instructs RCC to apply the best compression algorithm it has available.
If we have Zstandard available, that's its level 19 (levels 20 and up
are experimental). If not, we apply zlib compression level 9.

And apply this technique for the XDG MIME database that is built-in to
QtCore.
             Payload size  Compr. time
 Previously        313916    17.9ms
 Zlib -9           310899    53.6ms
 Zstd -14          253364    63.3ms (plus 4.0 ms on L1 heuristic check)
 Zstd -19          230647   642.5ms

Change-Id: I343f2beed55440a7ac0bfffd1562de44dbaf09cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-11 03:57:41 +00:00
Thiago Macieira
2c9ac4fc3f RCC: Add support for Zstandard compression
[ChangeLog][RCC] RCC now supports compressing content using the
Zstandard (https://zstd.net) algorithm. Compared to zlib, it compresses
better for the same CPU time, so this algorithm is the default. To go
back to the previous algorithm, pass command-line option
--compress-algo=zlib. Compression levels range from 1 (fastest, least
compression) to 19 (slowest, best compression). Level 0 tells the
library to choose an implementation-defined default.
\
The default compression level is "heuristic" (level -1): under this
mode, RCC will attempt a very fast compression (level 1) and check if
the file was sufficiently compressed. If it was, then RCC will compress
again using an implementation-defined level.

The following are the 4 biggest files we store as resources in qtbase:
 Orig Size Name
   2197605 src/corelib/mimetypes/mime/packages/freedesktop.org.xml
   2462423 tests/auto/corelib/tools/qchar/data/NormalizationTest.txt
   6878748 tests/auto/other/qcomplextext/data/BidiCharacterTest.txt
   7959972 tests/auto/other/qcomplextext/data/BidiTest.txt

The current RCC (zlib, level -1 "default" and level 9), produces for
those files:
                        L(-1)    Compr.   L9      Compr.    Decomp.
 Name                   Ratio  CPU time   Ratio  CPU time   CPU time
BidiCharacterTest.txt   16.9:1  106.1ms   17.2:1  789.3ms     5.1ms
BidiTest.txt             6.3:1  228.0ms    6.1:1 1646.3ms    10.9ms
freedesktop.org.xml      7.0:1   17.5ms    7.1:1   53.6ms     2.6ms
NormalizationTest.txt    5.8:1   41.2ms    5.9:1  256.4ms     3.4ms

Zstandard produces the following for levels 1 ("check"), 14 ("store")
and 19 ("best"):
                       L1     Compr.   L14    Compr.    L19    Compr.     Decomp
 Name                  Ratio  time     Ratio  time      Ratio  CPU time   time
BidiCharacterTest.txt  15.8:1  8.0ms   26.1:1 168.9ms   49.2:1 2504.7ms    3.8ms
BidiTest.txt            8.2:1 17.0ms    8.7:1 323.9ms   14.9:1 1700.9ms   12.1ms
freedesktop.org.xml     6.7:1  4.0ms    8.7:1  63.3ms    9.5:1  642.5ms    1.7ms
NormalizationTest.txt   5.7:1  5.0ms    7.5:1  54.0ms    8.4:1  447.3ms    3.0ms

This shows use of zstd at the default RCC level settings always produce
smaller outputs compared to the current zlib-based defaults, with
roughly 50% CPU increase. It also produces better results at less CPU
time than the best compression zlib has to offer.

More importantly, the decompression time reduces in all cases (the
numbers listed are for max compression, with slightly better results for
the defaults).

For the sake of comparison, the same files compressed with libxz at
levels 3 and 6:
                        Level 3         Level 6           Decompr.
 Name                   Ratio   CPU     Ratio  CPU        time
BidiCharacterTest.txt   28.5:1 109.1ms  42.9:1 1390.5ms   16.7ms
BidiTest.txt            10.7:1 281.0ms  18.4:1 2333.1ms   43.6ms
freedesktop.org.xml      9.1:1  62.0ms  10.2:1  499.1ms   12.0ms
NormalizationTest.txt   10.2:1  75.5ms  13.2:1  417.6ms   14.7ms

LZMA at level 3 consumes roughly the same CPU time as Zstd at level 14
and produces incrementally smaller results, but the decompression time
increases considerably. It's not a good trade-off for the Qt resource
system.

Change-Id: I343f2beed55440a7ac0bfffd1562d754bd71d964
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-11 03:57:37 +00:00
Thiago Macieira
f25bc30d8d QResource: add support for resources compressed with Zstandard
See next commit for details on why this is a good idea.

[ChangeLog][Important Behavior Changes] The Qt resource system now
supports compressing content using the Zstandard (https://zstd.net)
algorithm. Compared to zlib, it compresses better for the same CPU time,
so this algorithm is the default. QResource::isCompressed() returns true
for either compression algorithm. Use QResource::compressionAlgorithm()
to find out which algorithm to decompress. QFile will automatically
decompress using the correct algorithm.

Change-Id: I343f2beed55440a7ac0bfffd1562e9a8f94933a7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-11 03:57:35 +00:00
Thiago Macieira
163b5c0278 RCC: Modernize the compression algorithm selection
Instead of using compression level -2 to indicate no compression,
introduce CompressionAlgorithm::None and an equivalent XML attribute.
This commit includes some extra error checking for RCC.

Change-Id: I343f2beed55440a7ac0bfffd1562d64b024463ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-11 03:57:32 +00:00
Qt Forward Merge Bot
c18c63033e Merge "Merge remote-tracking branch 'origin/5.12' into dev" into refs/staging/dev 2018-12-11 00:47:12 +00:00
Qt Forward Merge Bot
a2fd99c430 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I91e684e74c36467efda8ded6ed19791baa0c1a1f
2018-12-11 01:00:13 +01:00
Ivan Komissarov
177577932e qwindowsxpstyle: Add std::nothrow to new
There is no sense in testing the 'buf' pointer against null, as the
memory was allocated using the throwing 'new' operator. However, since
this function already can fail in other cases, the 'buf' pointer can be
checked for nullptr after the nothrow new.

Task-number: QTBUG-71156
Change-Id: Ibca5d672544d3980dd8890474e3e2fbf7443e05d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-10 21:15:09 +00:00
Christian Ehrlicher
b688c7e99a DropSite example: fix documentation
The DropSite documentation mentioned the foreach keyword which was
removed some times ago in the code. Therefore also remove the
corresponding documentation snippet.

Change-Id: Id9dd3f01dbdd37eeda43fabe12b60ef9e0b32d10
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-10 18:38:56 +00:00
Edward Welbourne
d43ac840e5 Specify the date-time spec when setting max time
QDateTimeEdit::setMaximumTime() constructed a QDateTime from the given
time and its current max date without propagating its existing spec;
it thus got a local time.  All other QDateTimeEdit methods setting
bounds do propagate the spec.  So bring setMaximumTime() in line with
the others.

Fixes: QTBUG-71311
Change-Id: Ic97d22185f76bed46bc8d2884b131942874d9a0a
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-10 15:39:20 +00:00
Sergio Martins
8576354b88 QtDbus: Remove unused QStrings [-Wclazy-unused-non-trivial-variable]
Change-Id: Iea776554aa5e01ecc6fa08ac2c8fb7b720d57126
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-10 13:05:41 +00:00
Sergio Martins
f5ba938e17 QtGui: Remove unused brushes [-Wclazy-unused-non-trivial-variable]
Change-Id: If7e5340ec8acdfd70ea919286da5940db7a4def9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-12-10 13:05:38 +00:00
Sergio Martins
19d7bd3d63 Fix a couple of unused QStrings
This is needed so we can add Q_WARN_UNUSED to QString.
The xcb one might even be a bug.

Change-Id: Ia2d2563bdd10aa747014410df4990597969f4634
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-12-10 13:05:18 +00:00
Andy Shaw
e25d7b1441 Add a means to specify the protocol type, to aid websockets over proxy
When a PAC script is used on macOS, it will only allow connections for
http/https, although a proxy can be used for ws/wss. Therefore we need
to add a means of setting the protocol type for this sort of connection
so that we can pass on the necessary information to the PAC script.

Change-Id: I3fa29fa85a529bd88d9565daa58fe9d748b61a92
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-10 12:16:48 +00:00
Sergio Martins
3464e1e5c7 Add a few qAsConst() to range-for to prevent detachments
places indicated by clazy

As a drive-by, fixed minor styling issues in the affected lines.

Change-Id: I88d3fc0c8573cde0e61f19a18dd9ea697ee40c34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-10 11:47:28 +00:00
Lars Knoll
fc85a6b6b9 QTypeInfo: use C++11 type traits to deduce if a type is static or complex
All types that can be trivially copied and destructed are by definition
relocatable, and we should apply those semantics when moving them in
memory.

Types that are trivial, are by definition not complex and should be
treated as such.

[ChangeLog][QtCore] Qt Containers and meta type system now use C++11
type traits (std::is_trivial, std::is_trivially_copyable and
std::is_trivially_destructible) to detect the class of a type not
explicitly set by Q_DECLARE_TYPEINFO. (Q_DECLARE_TYPEINFO is still
needed for QList.)

Done-with: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Change-Id: Iebb87ece425ea919e86169d06cd509c54a074282
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-10 08:13:58 +00:00
Joerg Bornemann
ed90c306f2 Fix addition of the wasm platform plugin
Add the plugin; do not replace the whole SUBDIRS value.

Fixes: QTBUG-70375
Change-Id: Id40a69f54dfde5eb88894323c7e1146b6cad5a75
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-10 06:45:03 +00:00
Andy Shaw
d391d4db49 Fusion: Don't draw the background of the lineedit when drawing the frame
Since only the frame is being drawn here, it should only draw the
outline. Otherwise it will override any background drawing done via a
stylesheet.

Change-Id: I408fc44743747ad369c700b3d52935bfc8826f11
Fixes: QTBUG-71950
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-10 06:28:13 +00:00
Qt Forward Merge Bot
9c325e0a3c Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into refs/staging/5.12 2018-12-10 02:11:37 +00:00
Steve Mokris
ba304af284 Refresh QGuiApplication's devicePixelRatio cache when screens change
Task-number: QTBUG-63548
Change-Id: Id934cda6e15449c00c80a646055899f49580da88
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-10 01:45:29 +00:00
Qt Forward Merge Bot
0a88c5e92b Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: If49df791f73e9edf616baa094e0f301a44cb853d
2018-12-10 01:00:19 +01:00
Tor Arne Vestbø
161c569314 macOS: Reset font glyph caches when application theme changes
Our glyph caches on 10.14 are based on the application appearance, so when
the application goes from dark to light or light to dark, we need to reset
and re-populate the glyph-caches to account for the new appearance.

Change-Id: If019d8cfa33ffb2b14747444b2ff74b288992f55
Fixes: QTBUG-71018
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-09 23:22:14 +00:00
Dmitry Shachnev
8d7542acad Do not use arc4random_buf() on GNU/kFreeBSD
It is not available in the GNU C Library.

Change-Id: I36dc92fca283c126669885b75406c8e57f563ce3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-09 18:19:59 +00:00
Samuel Gaist
b2297e595c QUrlQuery: Implement initializer list constructor
[ChangeLog][QtCore][QUrlQuery] QUrlQuery now provides an
initializer list constructor. It can be created using a list of
key/value pairs.

Fixes: QTBUG-68645
Change-Id: Ief5939aa477718f6dd3580f2c60f95ff3aa892ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-09 11:35:27 +00:00
Qt Forward Merge Bot
fc11604964 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I10ae61ec6867b38601d85d6fc34e1f6a6ba0cc11
2018-12-09 01:00:43 +01:00
Thiago Macieira
d36a4fc197 Optimize further the loading of 8 Latin 1 characters
This is important when AVX is enabled, which makes the VMOVQ load and
the VPMOVZXBW instruction be combined into a single VPMOVZXBW with
direct memory access. This is guaranteed to only read 8 bytes, so it's
safe even close to the end of a page. Clang and ICC do combine the
instructions like we want and I have filed a request for GCC to do so
too[1].

AVX was first introduced in 2011, so plenty of computers today would
benefit from this.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87317

Change-Id: I8f261579aad648fdb4f0fffd1553e08e90df3171
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-12-08 20:28:56 +00:00
Tor Arne Vestbø
2e715c31ed Allow overriding the maximum cached glyph size via the environment
Useful for testing.

Change-Id: I8cfd4453018cba0301287ad6a1c15a88cdc33c1c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-08 15:27:16 +00:00
Allan Sandfeld Jensen
a71f50edc6 Revert "Ensure alignment of image-data"
This reverts commit ae8389e19c.

The result of malloc should be aligned in any case, and
this change conflicts with the use of realloc on the data elsewhere.

Change-Id: I01773132b240614a2656dd3013490b0df9cd14a7
Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-08 08:53:54 +00:00
Christian Ehrlicher
25231c4048 QToolButton: Don't elide text if an icon is present
The previous fix which adds an automatic text elision when the
QToolButton is not large enough brought up an inconsistency between
QToolButton::sizeHint() and QCommonStyle::drawControl().
Fix it by syncing the magic numbers between QToolButton::sizeHint() and
QCommonStyle::drawControl().

Fixes: QTBUG-72226
Change-Id: If4a76792cb97bcdb918e18c6b29cb637730acec0
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-12-08 07:25:32 +00:00
Shawn Rutledge
c4ee125891 Set QScroller's parent to its widget, for memory management
If the widget to which the scroller was assigned is deleted, the
QScroller ought to be deleted too, to avoid filtering events and then
following a dangling pointer while trying to react.

Fixes: QTBUG-71232
Change-Id: I62680df8d84fb630df1bd8c482df099989457542
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
2018-12-08 07:18:15 +00:00
Qt Forward Merge Bot
f8c5c13564 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Ied1194730e75a6f30839bbf5429aa2699230288e
2018-12-08 01:01:00 +01:00
Oswald Buddenhagen
501ff0a18c untangle the egl-x11 relationship in the build system
egl-x11 is used in two places:
- the eglfs-x11 plugin, which has a hard dependency on xcb-xlib
- the xcb-egl plugin, which has a soft dependency on xcb-xlib

that means that the egl-x11 configure test needs to be untangled from
xcb, and that eglfs-x11 should be a separate feature with a proper
dependency declaration.

when the plugins that need egl-x11 are not built, it also makes no sense
to build the respective integration in the egl_support module (even if
it's possible to coax it into building), so adjust things accordingly.

Change-Id: Ic729d0b7c893dd00844567329205c24ea2703033
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-12-07 23:49:15 +00:00
Oswald Buddenhagen
3ee7aa72b7 configure: atomize xcb-* tests properly
xcb is a dependency which should be detected upfront.
same for xlib.

this also removes calls to functions coming from the dependencies from
the tests (both because these calls prove nothing, and because at some
point we will stop linking transitive deps).

Change-Id: Iac77305eab33ea8ff5c71302cef980eb908d8403
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-12-07 23:49:04 +00:00
Oswald Buddenhagen
118b456c6b configure: convert xlib to a proper library definition
Change-Id: I1623aee9e8632e4bfd466e09e275cc23f94c6dab
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-12-07 23:48:48 +00:00
Oswald Buddenhagen
b6737b7ecd wasm: fix freetype library source
Change-Id: Ib99c4c178808c7325e55e85a1548542ae3c57524
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2018-12-07 23:48:30 +00:00
Tim Blechmann
fc2c4edcbd configure: fix linking with statically linked freetype
freetype depends on zlib. using statically linked freetype as system
library lacks the usage requirement to link with zlib. so we need to
add this manually.

Task-number: QTBUG-63115
Change-Id: Iaf0f3027bd9d1386fcc1ecfbfbe07ab09b2d0bb9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-07 23:48:21 +00:00
Liang Qi
153726bc16 Merge "Merge remote-tracking branch 'origin/5.12.0' into 5.12" into refs/staging/5.12 2018-12-07 20:55:07 +00:00
Friedemann Kleint
e27f52a098 QScroller: Fix crash when multiple scrollers are registered
Ensure the scroller cannot be added multiple times to the
list of active scrollers. Patch as contributed on bug report.
Amends 8b8e53f726.

Change-Id: Ic4e7d3e981f36e330dfd28d468288c5ef4b74a4c
Fixes: QTBUG-72244
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-12-07 19:01:57 +00:00
Thiago Macieira
90c1107698 QSettings: quick refactor for readability
Helps with debugging the code too, as you can follow what's on the file
with the "ch" variable.

Change-Id: Idd0c85a4e7b64f9c9c7dfffd156c5b7d76cf657b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-07 18:53:38 +00:00
Thiago Macieira
962bded90f Fix QSettings parsing of spaces after comment lines
[ChangeLog][QtCore][QSettings] Fixed QSettings parsing of blank spaces
after comment lines in INI-style configuration files.

Fixes: QTBUG-72007
Change-Id: Idd0c85a4e7b64f9c9c7dfffd156c5b219f3b5c0a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-12-07 18:53:34 +00:00
Thiago Macieira
9d4406f49a QTest: Make QCOMPARE of QCborError produce output
I was getting:
   Actual   (reader.validate())  : <null>
   Expected (QCborError::NoError): NoError

Change-Id: Ib47c56818178458a88b4fffd1554f1751f447086
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-12-07 18:52:25 +00:00
Thiago Macieira
aa18467442 Doc: update docs for the sleeping functions' accuracy
And take the opportunity to tell people not to sleep. It's always wrong.

Fixes: QTBUG-71757
Change-Id: I36203b7dac414e3eb9effffd1566b956dd05f32a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-07 18:52:20 +00:00
Thiago Macieira
ea9f11b038 Add a note about virtual_hook
Change-Id: I1ff3b344ec5a4499bb25fffd156b2bf6a7d88625
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-12-07 18:52:18 +00:00
Thiago Macieira
ec31953007 Fix build using Windows SDK 10.0.17763
c:\qt\qt5\qtbase\src\3rdparty\libjpeg\src\jmorecfg.h(242): error C2371: 'boolean': redefinition; different basic types
c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\rpcndr.h(193): note: see declaration of 'boolean'

Instead of trying to guess if a certain header has been #included and
whether that header does typedef something to boolean, let's just use
the preprocessor to hide, like some people do for X11/Xlib.h's Bool (see
qmetatype.h where we refused).

Change-Id: I05b8d7ba19004af99f3cfffd15693a87e175f05d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-12-07 18:52:16 +00:00
Gatis Paeglis
28fd625873 configure: remove xkbcommon_evdev transition hack
It was added in c3a963da1f.
wayland was updated in a8fed20181729cae70de43079c4a34ad1780cfd7.

Change-Id: Ibf458815c3b61c5f936f147086db3d2b5782c175
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-07 18:20:56 +00:00
Gatis Paeglis
326658cfcd libinput: use QT_CONFIG(xkbcommon) macro
This patch amends c3a963da1f

Change-Id: I9e66aac4f0f45714343c585c79f37bd76683e103
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-12-07 18:20:49 +00:00
Vitaly Fanaskov
0088f76043 Fix inability to edit lines in QGraphicsTextItem when pageSize is set
Previous implementation relies on the fact that the only text document
with height -1 can grow or shrink vertically, and, hence, a bounding
rect should be updated under this circumstances. But method
QTextDocument::setPageSize might set a height different from -1, and
QGraphicsTextItem will be growing/shrinking vertically as well.
So, we have to relax condition to cover all use cases. Bounding rect
will be updated if new size is different from current size. This also
doesn't affect performance.

Fixes: QTBUG-55527
Change-Id: Id2c8e15d859aff9dde62c8ee14a6859c0c03f0d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-07 16:31:19 +00:00
Edward Welbourne
b60c642ec0 Revise filtering of Content-Length in HTTP cache control
We filter out Content-Length from the cache metadata due to IIS
sending it bogusly on 304 responses; however, we were only doing this
if the cached response had a Content-Length header, which doesn't
happen when the original request was delivered chunked.  Furthermore,
the filtering wasn't limited to the case of 304 responses.  So skip
the "had it previously" requirement and only do this for 304s.

Fixes: QTBUG-72035
Change-Id: Ie5d858e0f0205bf68f0a13a9c9d4a6e844cb3568
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-07 15:59:23 +00:00
Andre de la Rocha
f184f1a481 Windows QPA: Fix QDockWindow Drag & Drop
Pointer messages should not be handled when we are inside a move/resize
modal loop. DefWindowProc() should handle this case instead.

Fixes: QTBUG-72078
Change-Id: I5ad7283bcf0cfe0ff7d21cf5640270c361b8ad8d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-07 15:49:56 +00:00
Ivan Čukić
b91e6befeb Preallocate buffer for QLineEdit when used for password input
While the user is entering the password, the string variable that
stores the value might have to reallocate its content from time
to time (when the string needs to grow beyond its current capacity).

When the reallocation happens, the old buffer is freed, but its
data is not zeroed-out. This means that a QLineEdit that serves as
a password input field might leak chunks of the password during
its lifetime, and the leaks will persist after its destruction.

Since the QLineEdit can not control the behavior of the QString
it uses to store the entered value, the only thing it can do is try
to make the reallocations rare.

This patch reserves the space for 30 characters for the string which
stores the QLineEdit value when said QLineEdit is used for password
input. This is enough to make sure no reallocation happens in
majority of cases as barely anyone uses passwords longer than 30
characters.

[ChangeLog][QtWidgets][QWidgetLineControl/security] Preallocate a buffer
for the string that contains the entered value when the QLineEdit serves
as a password input field to minimize reallocations.

Change-Id: I3e695db93e34c93335c3bf9dbcbac832fc18b62d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-07 15:47:39 +00:00
Lars Knoll
70a5fc15fd Use a QMultiMap for the fontengine cache
Cosmetic, so we can avoid using QMap::insertMulti().

Change-Id: If7c971e127af0537dd28bd25f7803804e7e01170
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-07 10:17:07 +00:00
Lars Knoll
6d38a1711c Use a QMultiHash to store persistent model indices
Because insertMulti() is deprecated.

Change-Id: I47208c281209f19045caa15ea748a2986c2cc0cf
Reviewed-by: David Faure <david.faure@kdab.com>
2018-12-07 10:16:51 +00:00
Lars Knoll
01a70da3e7 QNetworkCacheMetaData::AttributesMap is not a multi hash
And having duplicated entries in the hash doesn't make any sense. So use
regular iteration and insert for streaming the data in and out.

Change-Id: Ic3983010bdb9e17b207c6038fdccf43659da0e23
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-07 10:16:10 +00:00
Lars Knoll
0023948f83 Remove the model pointer from QPersistentModelIndexData
It can be just as well received from the QModelIndex member.

Change-Id: I72f930206ca2afed730009778ded0e56e4e6f278
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-12-07 10:15:58 +00:00
Oliver Wolff
f7019fa43b ANGLE: Set ANGLE_COMMIT_HASH and ANGLE_COMMIT_DATE
Fixes: QTBUG-72371
Change-Id: Ia03447b77d4f88eefc760e9bee14dbf3dd79d5a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-07 09:03:19 +00:00
Edward Welbourne
4da0c669d3 QTextCodec::codecForLocale(): clarify and update documentation
Change-Id: If3eec8cfc90cadcbd418807891ccf19b796f4006
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-06 19:13:35 +00:00
Frederik Gladhorn
e61028281f macOS accessibility: Rename parentElement to accessibilityParent
The NSAccessibility protocol has a property accessibilityParent.
This adds the implementation. The protocol will be adopted in a
follow-up commit.

Change-Id: I648cdc201950159e8268743a7fcdd24beb58c1c6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-06 13:58:45 +00:00
Daniel Vrátil
97d8be10cd MySQL: Free the results when QSqlQuery::finished() is called
Calling mysql_stmt_free_result() frees the results of the last
executed query while keeping the prepared statement valid. This
allows to keep around prepared QSqlQueries without the overhead
of keeping all the results in memory.

Change-Id: I4589e90857cc4e9a6f9612799bfca967a67e2ab2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-12-06 09:33:45 +00:00
Nick D'Ademo
1986392255 QMdiArea: Do not move active subwindow after tile rearrange
Currently, a tile rearrange will move the active subwindow (if any)
to position zero (top-left). This ignores any tiling order set via
setActivationOrder(). This change removes this move so that the set
tiling order is respected when a tile operation is performed.

Fixes: QTBUG-43356
Change-Id: I2c481f0ffe45e42e811c6b6d476eb4cb65aa5d1f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-06 09:06:18 +00:00
Lars Knoll
01301b0b34 Don't require a default constructor for storing items in a QVector
[ChangeLog][QtCore][QVector] QVector does not require a default
constructor for its template argument anymore.

Change-Id: Idd256dd756829561c21bd9e1e693f2918f1e3247
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-12-06 09:00:19 +00:00
Timur Pocheptsov
6a28f67677 Add tst_QOcsp auto-test
This patch introduces a private 'API' to enable server-side OCSP responses
and implements a simple OCSP responder, tests OCSP status on a client
side (the test is pretty basic, but for now should suffice).

Change-Id: I4c6cacd4a1b949dd0ef5e6b59322fb0967d02120
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-12-06 05:14:45 +00:00
Ivan Komissarov
a8dae3ad0b qgraphicslayoutstyleinfo: Improve memory handling
Change-Id: I3d699a89e8833570132cbd03aa575e4f4cf9249b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-12-05 21:50:47 +00:00
Martin Smith
83bf7d8260 doc: Let qdoc ignore Q_DECLARE_INTERFACE
This macro declares three template functions that are different for each use
of the macro. The functions are in the public API but they are not meant to
be documented. This update just defines the macro to be empty so clang in
qdoc will ignore it.

Without this, clang reports a lot of errors incorrectly, but if we let clang
process the macro, it declares all those extra functions which then must be
documented with \internal in the cpp files, and we don't want to do that.

This will probably be redone in a later version using a custom annotation attribute.

Change-Id: I78ae4bcc98a3844b803d7ef7b1eba5d5539b043f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-05 13:55:17 +00:00
Sergio Martins
f5654d909a Pass non-trivial types by const-ref in range-loop [-Wclazy-range-loop]
corelib/serialization/qcbormap.h:176:14: warning: Missing reference in range-for with non trivial type (QPair<QCborValue, QCborValue>)
corelib/serialization/qjsoncbor.cpp:820:10: warning: Missing reference in range-for with non trivial type (QJsonValue)
gui/kernel/qguiapplication.cpp:1171:10: warning: Missing reference in range-for with non trivial type (QString)
printsupport/dialogs/qprintdialog_unix.cpp:741:10: warning: Missing reference in range-for with non trivial type (QString)
printsupport/kernel/qprinter.cpp:1851:10: warning: Missing reference in range-for with non trivial type (QVariant)
tools/qlalr/cppgenerator.cpp:463:8: warning: Missing reference in range-for with non trivial type (Name)

Change-Id: I327b0f116e329e55952ed5740a5f5af4b2918392
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-05 10:32:03 +00:00
Qt Forward Merge Bot
aec026fe1e Merge remote-tracking branch 'origin/5.12.0' into 5.12
Change-Id: I54b4c14bed5150d3034ac87907a09254fd78face
2018-12-05 09:18:01 +01:00
Christian Ehrlicher
e2f473f4d4 QListWidget: mark (is|set)Item(Selected|Hidden) as deprecated
QListWidget::(is|set)Item(Selected|Hidden)() are deprecated for a long
time but not marked as such. Therefore explicitly mark them as
deprecated so they can get removed with Qt6.

Change-Id: I4567e740f1ebb5841b2e5b50c601fb83a782950c
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-04 21:01:18 +00:00
Liang Qi
009a5538eb Merge "Merge remote-tracking branch 'origin/5.12' into dev" into refs/staging/dev 2018-12-04 19:41:52 +00:00
Mårten Nordheim
e19df161cd _q_makePkcs12: Don't embed a key if we don't have one
Usually we embed the private key for the leaf certificate, but in
Schannel _q_makePkcs12 is also used to create a certificate store for
our CA certificates, which we don't have any private key for.

So lift this restriction.

Change-Id: Ic86a2a6725f2c8272c951148eb97e18a964a36f2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-04 14:26:57 +00:00
Mårten Nordheim
37f773a754 _q_makePkcs12: clean up
Remove braces for single-line bodies, space around binary operators

Change-Id: I958396772966428dcd9694279175fd61d6109b40
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-12-04 14:26:52 +00:00
Liang Qi
5d5c00c676 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/gui/painting/qdrawhelper.cpp

Change-Id: I4916e07b635e1d3830e9b46ef7914f99bec3098e
2018-12-04 09:58:43 +01:00
Ivan Komissarov
f5cfc36e3e qgraphicslayoutstyleinfo: Remove useless check
There is no sense in testing the 'm_widget' pointer against null, as the
memory was allocated using the 'new' operator. The exception will be
generated in the case of memory allocation error.

Task-number: QTBUG-71156
Change-Id: I898bac6d9b51b2abd7a5311aa71ac2492c7c042c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-12-04 08:45:18 +00:00
Qt Forward Merge Bot
cf708de03a Merge remote-tracking branch 'origin/5.11.3' into 5.11
Change-Id: Idcb3f03013b54385f2322d9a2a559b41846ece79
2018-12-04 09:38:38 +01:00
Nick D'Ademo
4c58569085 QMdiArea: Take scroll bars into account when tiling subwindows
QMdiAreaPrivate::resizeToMinimumTileSize() does not take into account
scroll bars when calculating the minimum size for the QMdiArea widget.
As a result, if scroll bars are enabled or showing during a tiling
operation, the top-level widget incorrectly expands in size (instead of
utilizing the scroll bars). Therefore, we should only resize the
top-level widget if scroll bars are disabled.

Fixes: QTBUG-40821
Change-Id: I3a8b7582d23fdf12d2b09f3740eea6b60bb395c3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-04 07:39:16 +00:00
Christian Ehrlicher
8c38b08343 QFormLayout: Fix width calculation when a row has no label
The calculation of the minimum width assumes that when there is no label
for a row, the field occupies the full row. But this is only true when
QFormLayout::SpanningRole is set for this row. This lead to a to small
minimum size for the row / truncated widgets when the row in question is
the longest one in the form layout.
Fix it by checking if it is a spanned row instead if there is not label
when calculating the sizes.

Fixes: QTBUG-18308
Fixes: QTBUG-60800
Change-Id: I1a610c93ab5c7f9cac503721ae99b36f2710c634
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-04 07:00:37 +00:00
Thiago Macieira
652098d40f QTranslator: add initial largefile support
Using QT_MMAP macro instead of mmap() so we could map more than 2 GB of
the file. Not that the file format supports such a thing, but just in
case.

Change-Id: Iae320a2868db402a993dfffd15689bba1d667c7d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-04 06:51:20 +00:00
Thiago Macieira
121b0bfed5 Make qDetectCpuFeatures() return the CPU features it detected
Micro (nano?) optimization.

Change-Id: Iba4b5c183776497d8ee1fffd1564aa53056f343d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-12-04 06:38:31 +00:00
Eskil Abrahamsen Blomfeldt
ffeefaac62 Support style name property in QTextCharFormat
The support for setting the style name in the QTextDocument
API was never added, as revealed by the example in the
linked bug report.

The actual bug reported there (style names not working with
some Helvetica Neue) is not reproducible anymore.

[ChangeLog][QtGui][Text] Added support for setting the font's
style name in QTextCharFormat.

Task-number: QTBUG-22813
Change-Id: I8f4d12151c3611aa30965fd963bc93f7c4264e23
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-04 06:18:00 +00:00
Tor Arne Vestbø
b82559244e macOS: Account for LC_BUILD_VERSION when checking SDK version and deployment target
The more modern LC_BUILD_VERSION load command was introduced in the 10.13
SDK to unify the various versions of the LC_*_VERSION_MIN command. When
building with a deployment target of 10.14, the linker will use this
load command instead.

Change-Id: Ic3571fdbfdf4dfb9346128c6f6e75d1e06f86cd2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-12-03 22:44:45 +00:00
Friedemann Kleint
f213e818f0 uic: Generate correctly qualified invocation of QCoreApplication::translate()
Change QApplication::translate() to QCoreApplication::translate()
in generator and tests.

Task-number: PYSIDE-797
Change-Id: I0bbaf1f280b74b3b2a701a39203c059ab82fce1f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-12-03 19:05:03 +00:00
Friedemann Kleint
68fc972ac8 uic: Remove unused code
Task-number: PYSIDE-797
Change-Id: I6958ad76c138dcb4126cda8b26f23311963d6d37
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-12-03 19:04:55 +00:00
Lars Knoll
7f4d0405b4 Rename QList<T>::swap(int, int) to swapItemsAt()
The old name was confusing as it conflicted with
QList<T>::swap(QList &other), that was doing something
completely different.

Rename the method to swapItemsAt() which is a lot clearer.

Change-Id: Iac77a1e790a7256766f83a24d2a243c880d875f4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-12-03 17:57:09 +00:00
Lars Knoll
972f8845a8 Invert include dependencies between QList and QVector
This is a very slight source incompatibility, but required as
a preparation for Qt 6, where QList should inherit QVector or
share the implementation with it.

This requires some special work to correctly instantiate and
export QVector<QPoint> from Qt Core on MSVC.

Change-Id: I1d042c5fafdde7afe59409eda2580871d4832fcd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-03 17:57:03 +00:00
Timur Pocheptsov
a8412dc020 Enable OCSP stapling in QSslSocket
This patch enables OCSP stapling in QSslSocket::SslClientMode (OpenSSL back-end
only). OCSP stapling is described by RFC6066 and based on the original OCSP as
defined by RFC2560. At the moment multiple certificate status protocol is not
supported (not implemented in OpenSSL). SecureTransport does not support OCSP
stapling at the moment.

[ChangeLog][QtNetwork][TLS] Added OCSP-stapling support for OpenSSL backend

Task-number: QTBUG-12812
Task-number: QTBUG-17158
Change-Id: Id2e0f4cc861311d1ece462864e5e30c76184af8c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-12-03 13:20:05 +00:00
Oswald Buddenhagen
521a85395d configure: actually resolve libraries into full filepaths
this considerably speeds up failures, as no doomed build is attempted,
and produces more reliable results, as no second lookup (which would be
subject to environment changes) is done any more during the build.

in principle, this also opens up possibilities like selecting specific
variants of dependencies, automatically extracting rpaths, etc.

qt_helper_lib.prf also needs to create fully resolved library names now.

Change-Id: I65f13564b635433030e40fa017427bbc72d1c130
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-03 11:25:56 +00:00
Eirik Aavitsland
49319734c1 ico image handler: check for out of range image size
Make the decoder fail early to avoid spending time and memory on
attempting to decode a corrupt image file.

Change-Id: I598db817c387867a449040f5be5427c8b8746483
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-03 11:25:30 +00:00
BogDan Vatra
13ed06640c [Android] Fix the ability to override environment and arguments
This mechanism should only be enabled only for debug deployments, but
the check was removed by accident in ca139228ab.

Fixes: QTBUG-72230
Fixes: QTBUG-72132
Change-Id: I3378436e93314fdf254919aed066f1284a4581b3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-03 11:15:26 +00:00
Lars Knoll
416b4cf685 Set correct vertical position for text following a very large image
If the document is paged and contains an image spanning more than one
page, correctly set the y position for everything following that
image.

Change-Id: I1c584c7a907c1728c2965f1dc3fdc56069ab3172
Fixes: QTBUG-59886
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-03 10:42:00 +00:00
Ivan Čukić
5dde7bd922 Erase password data on QLineEdit destruction
The contents of a deleted QString can still remain in memory
and can be accessible by tools that read the raw process memory.
This means that a QLineEdit that serves as a password input field
can leak the password after it is destroyed.

With this patch, the contents of the m_text string member variable
will be zeroed-out before the m_text is destructed. This is done
only in the cases when the QLineEdit serves as a password field.

[ChangeLog][QtWidgets][QWidgetLineControl/security] Zero-out the string
that contains a password entered into the QLineEdit

Change-Id: I8f88f952244bf8a0399c14acf0869439ca0a60ca
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-03 10:05:33 +00:00
Samuel Gaist
5d276d6a1d QNetworkConfiguration: add missing timeout unit to setConnectTimeout doc
Change-Id: I3738e989a41607244b55245222ec3c83dda68198
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2018-12-01 20:37:20 +00:00
Mårten Nordheim
17ced070fd Read font selection flags and use them when querying for metrics
Certain fonts with multiple styles have the same family name. When
loading these as application fonts we were not specific enough when
querying for the text metrics. This meant that e.g. the bold version in
a font family would get the metrics of the regular one.

Fixes: QTBUG-67273
Change-Id: Ic988d62cddde0a1f77ddcaf2891cadc21c9b31e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-30 16:15:03 +00:00
Allan Sandfeld Jensen
d23d146175 Fix alignment of temporary QRgba64 buffers on win32
The alignment of long long on 32-bit windows is only 32-bits, but we
should be safe to assume it is aligned at 64-bit.

Since QRgba64 is a public type, we can't fix the alignment there without
breaking ABI, so instead fix it where temporary buffers are allocated.

At the same time be consistent about using QRgba64 so we can switch to it
enforcing alignment in Qt6.

Change-Id: Ie15c305bc867c62a13df8eb2b1678e92174e1f97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-30 15:14:26 +00:00
Timur Pocheptsov
096d87c8b0 OpenSSL context (1.1) - make the if-fery/switch less ugly
no need in duplicating DTLS-specific cases.

Change-Id: I475c6fb53daa44d60a5054bf3acc8474355b2186
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-11-30 15:10:07 +00:00
Tor Arne Vestbø
58e66a2573 CoreText: Define font smoothing gamma along with rest of relevant code
Change-Id: I57909603732de6c1a91c744a358968941e64acdf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-30 14:47:50 +00:00
Andy Shaw
2afe4a1a07 Android: Don't use blocking queued when suspending the application
If the application gets suspended when a blocking queued connection is
made then it will cause the application to hang when being resumed.
Therefore a check is needed to still post the event to the other thread
but in a non blocking manner so that it does not cause a hang on return.

Fixes: QTBUG-72101
Change-Id: I6d53c97ed6d9d500559da2a9fd195226d1fc9905
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-11-30 14:47:36 +00:00