- Replaced the usages of deprecated QWheelEvent::delta() and
QWheelEvent::orientation() with QWheelEvent::angleDelta().
In most of the examples it is acceptable to use only the vertical
component of angle delta.
- Made the docs APIs to build conditionally, based on the
deprecation version.
Task-number: QTBUG-76491
Task-number: QTBUG-76540
Change-Id: Id4230d483f724af49e4b6349b44881c3944de2a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Is pretty common on some architectures so we can avoid swizzling by
supporting it.
Fixes: QTBUG-45671
Change-Id: Ic7a21b5bfb374bf7496fd2b2b1252c2f1ed47705
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
For tst_QFrame and tst_QOpenGLWidget, force scaling off
since they do screen captures which would fail with
scaling activated due to different device pixel ratios.
For tst_QGraphicsItem and tst_QHeaderView, force
scaling on for Windows since some tests otherwise fail
due to violation of the minimum size constraints of
framed windows on Windows.
The tests will then pass regardless of any environment
setting of the scaling variables on a developer
machine.
Change-Id: Iefa4e84b433f7e51dce4e416546a9eda8ee6d0f1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The test contained outdated baseline images for
1) Windows Vista: They were only used for OS version Vista
and do not match any more.
2) macOS: They were apparently were not in use any more
Remove the testing and image comparison code.
Task-number: QTBUG-76493
Change-Id: I91cec5113db8d1845b43f97ad2987e63d9f86ac7
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
The commands are separated by "if errorlevel 1 goto VCEnd" lines to
make sure we abort on the first failure. However, we also insert magic
comments starting with "Rem" for IncrediBuild. These do not need
error checking. Also, the last command does not need error checking.
The XML line ending entities are also unneeded. By using proper line
endings we ensure that commands appear on separate lines in Visual
Studio's property editor.
Change-Id: Ifbf7525281e892c820034fafc64b555fff3dc756
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Add support for specifying the blend operation used when alpha-
blending KMS planes. Only available with atomic modesetting.
Set the environment variable QT_QPA_EGLFS_KMS_BLEND_OP to
the enum value of the 'blend_op' property.
Task-number: QTBUG-75659
Change-Id: If0ef5ba314b88adb530113b608d20fc9c027c5ec
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
And send it in our 'SETTINGS' frame. Add an auto-test
for this and (as a bonus) - fix a bug accidentally
introduced by the previous change.
Task-number: QTBUG-77412
Change-Id: I4277ff47e8d8d3b6b8666fbcd7dc73c827f349c0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Otherwise, we get a warning:
QWARN : tst_NoQtEventLoop::consumeSocketEvents() QWindowsContext::windowsProc: No Qt Window found for event 0x2a3 (WM_MOUSELEAVE), hwnd=0x0x9b80646.
in the event loop which is running by another test. So, add missing
'delete' call.
Change-Id: Ib9b24155bdd6e78062a5234c317c9f878906e413
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Follow Google's BuildSystemMaintainers doc to simplify (a lot) the clang support
It is needed to support future NDK releases painlessly.
Also remove old workarounds.
[ChangeLog][Android] Android depends on NDK r20+
Change-Id: Ib4c07fc71e0f5a264d804b0b3baa18ff79d07630
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Now that result objects can't alias source ones anymore, the order of
writes no longer matters, and we can clean this function up. The
pattern of the algorithm now becomes visible. Before, it was just
drowing in noise.
Change-Id: I36c55ce09d6e13a994c7eda17d96cfe960e7fb95
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
If b becomes false, we won't call setData ever again.
Just bail out the loop early and return in that case.
Change-Id: I4b0ed7e21546d686bc3f785209a314a8bed08471
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
At least QBezier itself is calling the old function with *this aliased
to one of the arguments. Consequently, the implementation looks rather
... shuffled, to avoid writing into members that it will read once
more later.
Fix by returning a std::pair<QBezier, QBezier> instead. This
simplifies the code that doesn't actually pass existing objects in,
and avoids aliasing problems cropping up under seemingly innocuous
reorderings of statements in the implementation going forward.
While I'm usually vehemently against use std::pair or std::tuple in
APIs, preferring simple structs with aptly-named members instead, this
is one case where the .first and .second actually fit, and pair allows
us to use std::tie, which was handy in qbezier.cpp.
This patch preserves the body of the function as much as possible. A
follow-up patch will clean it up.
Change-Id: I017dfee4a0e69a2e171ce21b89ba04654772c33d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
These functions tighten the integration of QMargins(F) with the rest
of the geometry classes by providing a way to apply margins to sizes
(and later, rects).
Apply them in a few obvious cases across QtWidgets.
[ChangeLog][QtCore][QSize/QSizeF] Added grownBy(QMargin(F))/shrunkBy(QMargin(F)).
Change-Id: I8a549436824cdb7fb6125a8cde89d5bf02826934
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is really just an optimization, but I suspect the author of the code
assumed that the bitwise &= operator short-cicuits. (It doesn't). So this
patch should then fix the code to have the intended behavior.
We don't have to check for failures in the remaining output files once
we've found one. pullFiles() returns just a bool indicating if one of the
output files has a recorded fail, so checking the remaining output files
after the first found failure is just a waste (and ideally they should
contain the same failure (however, flaky tests might break this ideal)).
Drive-by fix.
Change-Id: I951e500a69198e7ed124be32199ac81bbddb9bf7
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
QHttp2Configuration is using entities (read definitions) from http2,
which is only conditionally included in the *.pri file (requires http).
So as a result we had linker errors.
Fixes: QTBUG-77759
Change-Id: I8b33b0a4802a295f67edad03da3743b24f7ce514
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The VS project generator never calls the Win32MakefileGenerator code
that sets up DEST_TARGET which is used for checking for conflicting
DESTDIR/TARGET combinations on Windows. Replicate the setup in
VcprojGenerator::initProject().
This amends commit e75aed1a.
Change-Id: I4238eb2f57615095c372cee9ada9fc961cc36133
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It's temporarily storing QByteArrays before we copy them directly to
QIODevice's internal buffer. We can save the extra work by just push
them directly into the buffer.
The signal compression is no longer useful performance-wise, but is
kept as it will throttle the amount of readyRead emissions the users has
to handle.
Reorder some of the operations as a result to make it more natural.
Change-Id: Ifc0481d56fec42545e95970125d883a5c68d647a
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This is a follow-up to commit b7d073e990,
which refactored memory allocation of QMetaCallEvent.
Change-Id: I363256c80ee941b545e6f9c659c65556fff5c907
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
QFontPrivate::screen was not used anywhere so remove it.
Change-Id: Ie9381d08b59b93c4e7bcaad58ebf1b389aa0a2e6
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Upon reading the Apple's documentation it would appear the indexing
is more complicated (they name the specific fields and which kind
of indexing must be applied to each). This requires a finer level
of configuration/control and probably a separate class (aka
QHpackConfiguration? ;). We'll provide it in future, if requested
by our users.
Fixes: QTBUG-77412
Change-Id: I6e9461b3966ed59c8b70873eab999a07a04eb289
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
And either compress or not.
Task-number: QTBUG-77412
Change-Id: I3b09385d2b3caf4f7de0455ad6e22c0f068c33a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Simplifies the code a bit and will be helpful when I add the Linux
equivalent.
Change-Id: Iec9c051acd73484c8d94fffd15b99879dc269db9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
For forkfd, this is extremely useful, since users can rely on proper
atomic API, not the old GCC API or the internal API that backs the C11 /
C++11 implementation itself.
This also caught one more mistaken use of seq_cst.
Change-Id: Iec9c051acd73484c8d94fffd15b9985fe545e8b5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Missing one "struct" and one #include <sys/wait.h> for
struct rusage.
Change-Id: Iec9c051acd73484c8d94fffd15b9a1274703afca
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It couldn't find the test images if not build in sources.
Change-Id: Ieeb5a76694a37d05b3e9a4ed0154885040b0812f
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Sub-projects in VS solutions must have unique project names. If there
are multiple projects with the same TARGET then QMAKE_PROJECT_NAME must
be set to different values.
The .sln generation code did not use QMAKE_PROJECT_NAME and produced
.sln files with equally named sub-projects.
Replace the 'orig_target' member of VcsolutionDepend with a
'projectName' member and use it when writing the .sln file and for the
misnamed "GUID map" that's supposed to have unique keys.
This commit amends 9e750d34 (qt/qt.git).
Fixes: QTBUG-77639
Change-Id: I81c64f8bc6baeb6d99e9d5808fb73dfd7aaaeeb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Since its introduction in commit
65bb1a25419210e6097cad973fb847aa3719c09b (old internal history, 2005)
with the commit message "optimizations I've been sitting on here"
we're dragging along this dead code. It is time for removal.
Change-Id: Ic7902ebb8c402734974ad6651a1371d1e5bf93c5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Saves a file by file download, where the user can choose
the file name and location using a file dialog.
Change-Id: I4d2ecc76fc33bb65fdf3d7ca3fcd9566c62547dd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
- Build the docs for deprecated APIs conditionally, based on
deprecation version.
- Remove the docs of methods deprecated since 5.0.0, these methods
are not compiled anymore.
Change-Id: I2c1b038ce125ca737944f4fc4a28e2f6852eaded
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Had to port a lot of caching temporaries, too. Decided to leave them as
crefs to unique_ptr to catch any mischief users may be doing with the
raw pointer instead (like deleting it).
Also fixed a use of 0 as nullptr (by standardizing on pointer-to-bool
conversion, as is done everywhere else in qwidget.cpp), and made one
impregnable if condition readable.
Change-Id: Ifdc240bf352c52de0bc3c186fa7a5f4cb2882dd0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
That way the image formats with color space supports all have both read
and write support.
Change-Id: Ib52ebd56192c4a8a0897a6afc7c4a26020319270
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Similar to TLS configuration that we can use on QNetworkRequest,
we can configure different options in our HTTP/2 handling by
providing QNetworkAccessManager with h2 configuration. Previously,
it was only possible internally in our auto-test - a hack with
QObject's properties and a private class. Now it's time to provide
a public API for this.
[ChangeLog][QtNetwork][QNetworkRequest] Add an ability to configure HTTP/2 protocol
Change-Id: I80266a74f6dcdfabb7fc05ed1dce17897bcda886
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
With C++11, all compilers support thread_local, which replaces the non-
standardized __thread attribute as a storage class.
The storage class was specifically introduced so that applications do
not have to deal with pthread APIs for TLS key management. We still
need to have some of that logic for adopting foreign threads, but we
can rely on thread_local so that we get a fast implementation of
QThread::currentThread() on all platforms.
Change-Id: Iba2b35d014044c4ab317a0e127c5d1f1fa4ecd4a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Supported style attributes:
<table>
style: supports "border-collapse: collapse" and "border-color".
border: width of the outer border
bordercolor: basic color for all borders
<tr>
style: not supported
<td>/</th>
style: supports the "border", "border-[top|left|bottom|right]]"
shorthand styles and the "border-width", "border-color"
and "border-style" (and the top/left/bottom/right variants)
attributes
<table border=1 style="border-collapse: collapse"> will render
a simple 1px table grid.
Notes:
The QTextDocument table model is much simpler than the HTML table model.
It basically only has <table> and <td> support. So the HTML parser is
forced to map markup and styling to the QTextDocument model which
is not without loss.
In other words: While QTextDocument -> HTML -> QTextDocument should
preserve the QTextDocument structure, HTML -> QTextDocument -> HTML
does not preserve the HTML DOM at all.
So for now the HTML importer and writer only support border styles on
the <td> and <th> nodes. In future updates, the HTML parser might be
enhanced to map <tr> and <table> CSS styles to the cells.
Change-Id: If9e7312fa6cbf270cf8f7b3c72ba1fa094107517
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Replace foreach with range-based for loop, replace some int values with
the correct Qt flag enum as drive-by.
Change-Id: I41c52f6ae6c537fa9ad4f9e169485533936952d1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This patch was generated with tooling from patchset 31 of
https://codereview.qt-project.org/c/qt/qtqa/+/267034 in interactive
mode. General platform names were chosen if greater than 60% of the
currently active platforms of a given type in COIN recently failed.
Change-Id: Ia4bde7f0ec422bbb727dc9d7151295159094f146
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
It was added for Symbian almost 10 years ago (d7057e7c1f1a), for a somewhat
dubious use-case. The Symbian code is since long gone (ae30d7141), so the
remaining pieces are just adding complexity to the already intricate workings
of the QtWidgets backingstore/painting logic.
Task-number: QTBUG-8697
Change-Id: I82af610a8ac26719c588ac63f06b4501f59b400d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
As exposed by tst_QObjectRace::destroyRace we would sometimes end up
with a double-free when destroying a QSlotObject in multi-threaded
scenarios. One free would be done in ~QObject as the receiver was being
destroyed while the other free was done when deleting a QMetaCallEvent
object after we realized it was not needed because the receiver was
destroyed.
Since we can be in a separate thread from the receiver we should lock
before referencing the connection object.
Amends b7d073e990.
Change-Id: Icb53862dc880ae9a4e5581a1a9ee693573f7d9c7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
env var values might contain '=' char, so we can't use split.
Change-Id: Iedf3ea46a847acaaf02f51bc80586a519fe7a310
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Use FLIP_DISCARD swapchains only on Win10, stick
with DISCARD otherwise. This may fix the swapchain
creation problems on Windows 7.
Add a QT_D3D_NO_FLIP env.var. to make it possible to
disable using FLIP_DISCARD even on Win10. This is there
for troubleshooting purposes.
Finally, fix the backbuffer handling. What we originally
ported from the D3D12 backend of Qt Quick is not quite how
DXGI used to work with D3D11 and earlier. GetBuffer() can
only be used to query index 0, and that's the backbuffer,
the rest is managed internally. Follow this model.
As an added bonus, disable Alt+Enter.
Change-Id: Ie5c7a1e813864e7f873d55bc72cb22fc09213a05
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Qt Quick apps feature an occasional flicker which seems to be caused
by updating the contents of a Static (or Immutable) QRhiBuffer in a frame
where the QRhiBuffer in question is read in the previous frame as well.
On macOS these types map to a Managed MTLBuffer and only one native buffer
object (MTLBuffer). It seems modifying such a buffer is not safe if the
previous frame has not completed. (this may be as expected, but hard to
tell due to Metal's underdocumented automatic hazard tracking which we
rely on atm)
So for now switch to having 2 native buffers, like we do for Dynamic
(on iOS/tvOS this would be the case anyway since there all buffers are
host visible and slotted regardless of the QRhiBuffer type).
This seems to solve the issue.
To be seen if we want to move to a more Vulkan-like setup where Immutable
and Static map to device local (Private).
Change-Id: I76013f58a2e183ad8eab0705b28a03b395c4530c
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
create_cmake.prf populates the values of CMAKE_RELEASE_TYPE and
CMAKE_DEBUG_TYPE depending on if Qt was configured with debug, or
release, or the build_all feature was set (which implies
debug_and_release).
simulator_and_device also implies build_all. This
is a problem when configuring a Qt simulator_and_device build with
only a "debug" configuration, or only a "release" configuration.
In that case we would try to parse prl files for both configurations,
even though only one configuration exists.
Switch to checking for debug_and_release scope explicitly instead of
build_all. This allows configuring and building a Qt iOS
device_and_simulator debug configuration which is usable from CMake.
Task-number: QTBUG-38913
Change-Id: Ife6d5d34d2b6bb1ac787d901a166e41c6e0c844b
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>