Commit 6b875f0625 created a macro for it,
but in the multiple updates to find the best solution, we forgot to use
it.
Fixes: QTBUG-72429
Change-Id: I4ac1156702324f0fb814fffd156f27c1789d1409
Reviewed-by: Thomas Miller <thomaslmiller91@gmail.com>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Fixes: QTBUG-72489
Change-Id: I4ac1156702324f0fb814fffd156fcecfa95a1a2d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Prevent passing a zero argument to the cbMultiByte parameter of
MultiByteToWideChar. According to the documentation this will always
fail.
This is triggered when calling convertToUnicode with a state having
remainingChars of one and a length of one. The remaining chars will be
completed and the length will be reduced to zero before the actual
convert.
Adding an early return after the completion to prevent calling
MultiByteToWideChar with the invalid zero argument.
Fixes: QTCREATORBUG-21622
Change-Id: Ic6a433dd929e97b1681583cb1b9a347afaa9a09f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Firefox, Chrome and various http libraries normalize /./ and /../ from
urls, but retain multiple adjacent slashes as is. Qt removes
duplicated slashes which makes it impossible to access some web
resources that rely on those.
Fixes: QTBUG-71973
Change-Id: Ie18ae6ad3264acb252fcd87a754726a8c546e5ec
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In the handling of pointer messages for touchscreen we use a queue that
is flushed when mouse messages synthesized by Windows are received.
However, these fake mouse messages should be otherwise ignored. Their
handling was causing issues with PointHandler in QtQuick. This change
fixes the part of QTBUG-71431 that causes a single touch drag to behave
unexpectedly with PointHandler.
Task-number: QTBUG-71431
Change-Id: Iccdd554876f411bce2dd1f922a3d889e61b7bb1c
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
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>
It is not available in the GNU C Library.
Change-Id: I36dc92fca283c126669885b75406c8e57f563ce3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
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>
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>
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>
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>
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>
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>
we already knew the dependencies (as they are declared in the json
files), but failed to export them in any way, which made linking against
statically built external deps which have deps in turn fail (unless the
project happened to pull in the dep anyway, as is the case with qtcore +
zlib).
the previous assumption was that the USE-able library objects would be
self-contained, but that is conceptually unclean. instead, properly
export the raw dependencies and resolve them only in qmake_use.prf.
note that pkg-config produces self-contained output, so we need to
actively subtract the dependencies we know.
Change-Id: I4b41a7efc05bbd309a6d66275d7557a80efd5af4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
clearly, nobody told clang that on windows you're supposed to use
semicolons instead of colons to separate elements of a path list ...
Fixes: QTBUG-72268
Change-Id: Ia7adc8de3bca586d4c15b069cb04e4cb647ae823
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
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>
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>
I was getting:
Actual (reader.validate()) : <null>
Expected (QCborError::NoError): NoError
Change-Id: Ib47c56818178458a88b4fffd1554f1751f447086
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
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>
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>
It was added in c3a963da1f.
wayland was updated in a8fed20181729cae70de43079c4a34ad1780cfd7.
Change-Id: Ibf458815c3b61c5f936f147086db3d2b5782c175
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
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>
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>
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>
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>
note that pkg-config is a tad stupid: it won't tell us if the package is
built statically, but one needs to explicitly ask it to output
transitive deps for static packages. we can do that, as we resolve the
pkg-config output to actual libraries, so we know if they are static.
always asking it would print the transitive deps also if we found a
dynamically linked library, which would inappropriately extend the link
interface. the latter actually happens on windows (because we can't
easily tell apart real static libs from import libs), but that doesn't
matter, as under windows, the linker transitively resolves dlls anyway.
Change-Id: If1be3b3df476374d5c8e62f4b185477c988223b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
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>
Xcode 10 ships version 921.0.1 of cctools, which otool is part of. The
defaults have changed in that version to no longer print verbosely
(symbolically), which we relied on. We now request it explicitly.
Change-Id: Ifbe0c97462b9f78cf128c820847eff9c72f17065
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tim Blechmann <tim@klingt.org>
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>
amazingly enough, android has different sysroots for the compiler
(shared includes full of #ifdefs) and the linker (per-platform
libraries).
this patch supports only clang for non-darwin, which notably covers all
supported android ndks.
with this fixed, we also remove the hard-coded setting of
QMAKE_DEFAULT_*DIRS from the specs.
amends 353fb118c.
Change-Id: Ie0513de0f7123d7f5b8ca1ffcc72c017cddd126c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
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>
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>
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>
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>
When running configure on a Windows host, it would fail with the
error that the copy statement was invalid, due to the forward
slashes. This makes configure finish without errors.
Task-number: QTBUG-72000
Change-Id: Id315d7436bbbfd2cd5c5f2dfcfe0c3dc3b9e34c2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>