... to make user code buildable with gcc [-Werror=zero-as-null-pointer-constant].
Change-Id: I309953acd7154511660302aa9826410276cfe41b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I5bed1fd690daa72492e7ec5f24e80198a2592986
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
A mysterious file c:\dev\null appeared when running the auto tests on
Windows. Fix by using QMAKE_SYSTEM_NULL_DEVICE.
Amends 5f3529be32.
Change-Id: I0224a9ccd61c4f10b2ddb8f8d690e1849aa88d8a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The test is flaky on Linux.
Task-number: QTBUG-64639
Change-Id: Iec56ebce4f656f52187b34c8f655b137e41c3d17
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
There seems to be an issue in CoreText which may cause an existing
font descriptor to give unreliable results if it refers to one of
the system theme fonts. Since we do not know all function calls
or events that may trigger this bug, the safe route is to always
create fresh font descriptors when creating fonts for these
descriptors. The impact on performance should be small, as Qt has
its own internal caches.
[ChangeLog][macOS/iOS][Text] Fixed an issue where text using
one of the system theme fonts would under certain circumstances
display random glyphs.
Task-number: QTBUG-63476
Change-Id: I9e9b253018c63976345eec1439a6b78de2cab869
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
it could be somewhat surprising that specifying variant-specific libs
would not clear the common libs, so do that. of course, the default
for the common libs could theoretically contain common deps of the
variant-specific libs, in which case clearing them would be surprising
in turn - luckily, we have no such case.
Change-Id: Ifca08b9e1949c6a0cefed6931ade4021927d7c90
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... and not only when the source explicitly specifies build variants.
Change-Id: Iac6c8fda8f431d5fb50fada8338d1b660ab040d7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
unlike for the other fields, we forgot to eval() the values of the
build-specific library values, leading to over-quoting of values which
require any quoting at all.
amends c0cc50520.
Task-number: QTBUG-62521
Change-Id: I4dfce31040dd09248d3f9dd4294f7fb147c13bdd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
qtConfLibrary_inline() used to set $${1}.builds.$${b}.libs, while
everything else assumed no such .libs suffix. fix the former.
amends 9172143f52.
Task-number: QTBUG-61431
Started-by: Konstantin Ritt <ritt.ks@gmail.com>
Change-Id: I0bd81591c46266d81baa9c12315411183bbc7a63
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
flex emits code using isatty(), but fails to include the required
unistd.h. we can work around it by including the header ourselves.
Task-number: QTBUG-64771
Change-Id: I05313eeb79f7a0e25365dee5f05a0142f87209ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When switching on/off multiple time the wifi (mainly, but not only) on
ios/macos the QNAM may wrongly stay on a NotAccessible state while the
configuration is Active.
This change make sure the QNAM::networkAccessible() is correctly
reporting the accessibility.
Task-number: QTBUG-49751
Task-number: QTBUG-58275
Task-number: QTBUG-60366
Change-Id: I238ab32030fbaa8072cce341db8da6bcfc346035
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
In addition to the (deprecated) applicationFrame property, we
base the available geometry on the root view's safe area, which
also takes into account system-reserved areas on iPhone X, and
the screen's bezel in the case of tvOS.
Change-Id: I252d960a0e486dd0c7e30843f88c0bf5684feb24
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
The qtConfAddNotice was a typo, so this note was missing from
config.log and the build would fail with no explanation.
Change-Id: Iae22f92c1ba6bdf96d41a7cc608b9aedd6863b1f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
qprintengine_win.cpp:1502: warning: Missing reference in range-for with non trivial type (QPrint::InputSlot) [-Wclazy-range-loop]
Change-Id: If6e55c1748e05e32aaa32a16063ba491fe242952
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The tests start to show flakyness on Linux in 5.10 (rowCount() check
failing). This seems to point to a race condition between the files
showing up and the file system watchers of QFileSystemModel starting.
To fix this, close the file and wait until it shows up in the directory
before pointing the QFileSystemModel to it. The tests then no longer
rely on the file system watchers.
Change-Id: I39cffb4cacf6843e8e4180efb405345307c78dd8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
The MinGW version we support supports IsWindows8OrGreater so that we can
check the windows version properly. As the OpenGL detection falls back
to WARP in case of RDP it was possible, that shared handles were wrongly
stated as supported, which caused crashes in users' code.
Task-number: QTBUG-64657
Change-Id: Iaca2bd169f2764cf6ec68a1d36112a735246b29a
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Common changes to mingw-w64, ICC on Windows and MSVC toolchains:
- update toolchains description similar to 'gcc-base.conf'.
Change-Id: Ie456c6cec86c0d1c0107ca84a0fa7855666df91e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The NoClip version of the drawTriangle code had the vertices swapped.
Task-number: QTBUG-50845
Change-Id: I731dafee6cc140ea017b3b7d1051a27ad3081aa7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
We actually test for this already in tst_QString::split().
Change-Id: I35fe8f90900ea9c8e6251facdb3326b9226348d0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We were missing some recent iPads, and the iPhone 8 Plus and X.
Change-Id: Ib65644a277a1cbd75ccb360b79b9ac8af935c741
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
We always need to set the QMenu screen explicit also when
it is about to be shown on the primary screen.
The reason is QWidget::metric (called from style/sizeHint)
may use qApp->devicePixelRatioF() when it does not
know about the topLevelWindow. That may not be the same
value as DPR on primary screen. It can be argued that
it likely is a bug in QWidget::metric, but fixing that
looks to be a somewhat dangerous behavior change.
Task-number: QTBUG-59794
Change-Id: I6ed0e808aa31bee5b77c0e19ce61a77548fdbb38
Reviewed-by: Morten Kristensen <msk@nullpointer.dk>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
... just like -xcb does implicitly. Otherwise, failure to detect
system-xcb would silently fall back to -no-xcb despite obviously
contradicting the user's request (-qt-xcb always worked anyway,
as there is no test that can fail).
Change-Id: I6f3145fac0881e7847c4a70547fce206e797a9bb
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This is a follow-up commit to 97eec16e.
Blackberry tries sending touchpad events first, and if not consumed,
it sends synthetic mouse wheel events as a fallback. This makes touch
keyboard scrolling work in native Android ListViews and other views
that do not handle SOURCE_TOUCHPAD motion events. Qt apps, however,
blindly accepted all generic motion events, so synthesized mouse wheel
events were never sent. => Make QtSurface & QtNative accept only those
motions events that are actually handled.
Task-number: QTBUG-51165
Change-Id: Iefbbf1e3e1cc3da86afc4c87c19671cc6c5fa145
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Since removeAll() takes its argument by cref, if passing a reference
to an element of the container to removeAll(), the element may be
deleted (overwritten) by anyother value, leading to UB.
Add a test that actually happens to fail for me without the patch,
even though that might not be guaranteed (we may invoke UB).
Change-Id: If8c795113aeb515f4a9bdf1e072395b932295667
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On iOS we want all delivery of events from the system to be handled
synchronously, as that's what the system expects.
We don't need to add a delivery template argument to each function
in QWindowSystemInterface that we want to delivery synchronously;
that's only needed for functions that a platform normally sends
asynch, but in some cases want to delivery synchronously.
For always delivering events synchronously we just need to change
the default delivery method.
The only events affected by this are the screen changes, and
window state change, which were not synchronous before, but
should be. All other events were already synchronous, though
either explicit delivery, of a flush.
Change-Id: Ib20ca342d1c076be0fbcf018c83735a416769cfe
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
We have had test.qt-project.org for close to 3 years now.
Change-Id: I71488efd29b645f7b228fffd14fadf4627288243
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
WSARecvMsg does not return the sender in WSAMSG::name if WSAMSG::Control
isn't set. This makes no sense, so I'm assuming it's an API quirk we
need to work around.
[ChangeLog][QtNetwork][QUdpSocket] Fixed a regression from Qt 5.9.3
caused by an apparent Win32 API quirk we triggered when using
readDatagram(), resulting in an invalid QHostAddress sender address.
receiveDatagram() was not affected.
Task-number: QTBUG-64718
Change-Id: I71488efd29b645f7b228fffd14f9d84cc205c4b3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Allows categorized logging before QCoreApplication has been created,
which otherwise would silently fail to output anything because the
category would never be enabled, despite QT_LOGGING_RULES being set.
Change-Id: I1861e5366ea980dff2ffa753b137276c77278eee
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Unary ~ is not defined for enum classes, so we need a cast.
Change-Id: I79d495ebcc24ab960da8dae3be08eb307a9de448
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When processing host lookup error if-statement only checks the connection
type SPDY, which is not right - it could also be HTTP/2. As a bonus:
QT_NO_SSL conditional inclusion is not needed - HTTP2 can be 'clear text'
and SPDY enumerator is defined even in no-tls build (and is just a
noop here). Also, improve our somewhat cryptic message in 'Should not happen'
else branch - 'cannot dequeu' says nothing about HostNotFoundError.
Task-number: QTBUG-64721
Change-Id: Ib0346b8717c2dbddaffab690298f3cae01e338ea
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
... and unblacklist it on Windows.
From what I can tell there is no particular reason why this test fails
other than that it is a little too slow sometimes (these things happen).
So, to fix the test I bumped the timeout, but to avoid the test running
for longer on every test-run it now also ends when the socket enters
the "Unconnected" state.
Previously it failed 171/500 times, and after this patch it failed
0/1000 times.
Change-Id: I4266bff6b91aaaf502ee66265d01c3a177706402
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Calling QCoreApplication::applicationDirPath() requires an app instance,
but on Windows the implementation just relies on qAppFileName(), which
does not require any instance. As resolving the standard paths could
be needed before QCoreApplication instantiation, e.g. for categorized
logging, we use qAppFileName() directly.
Change-Id: Id882cebd528bcb8e945e73a83f1dc3d599b74d1d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
When an app is in split-view mode, the app can't use the full bounds of
the screen, but should limit its area to that of its UIWindow.
Task-number: QTBUG-48225
Change-Id: Ia66ad6bba24d9d73a8263ad3f65b9dee9b8a1b37
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
A layoutChange indicates that anything can have moved to anywhere else,
including as a result purely of new items being added. It can also
indicate that items are removed.
The old code here incorrectly assumed that the section count remained
constant over this operation by setting the size of the oldSectionHidden
QBitArray - whose size is the size before the layoutChange operation -
and then calling setBit with model rows numbered after the layoutChange
operation. As the two are not necessarily the same dimensions, this can
result in asserts from the setBit call.
Simplify the handling of layoutChanged entirely by clearing section
information, and using the QPersistentIndexes which indicate hidden
state to restore that state after re-population.
Task-number: QTBUG-53221
Change-Id: I3cda13e86b51b3029b37b647a48748fb604db252
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>