if pid == nullptr, the child process has already exited and the pipe
readers have been stopped. So the call to drainOutputPipes() is
unnecessary here.
Change-Id: I0bed90d08ac879bb0ae178a1cdc37afb9d825314
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Otherwise, the user may receive the readyRead() signal just before
started().
Change-Id: I8d6fd18fdfcef0580a3e609100198b03b18b1175
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
The completion of the child process can take place asynchronously or in
one of the waitFor...() functions. In both cases, we used the same
handler (_q_processDied()), which caused several problems:
a. technically, waitForReadyRead() should have taken into account the
result of the calls to _q_canRead...() slots inside the
_q_processDied() function:
- the user calls waitForReadyRead();
- forkfd descriptor becomes signaled, while a grandchild
process is still alive;
- as readyRead() signal has not been emitted, _q_processDied()
is called;
- the grandchild process writes to stdout pipe;
- now data arrives, and _q_processDied() will collect it, but
won't report it.
b. we had a bug with recursions on Unix:
- death notification comes asynchronously;
- waitForDeadChild() closes forkfd;
- _q_canRead...() emits readyRead();
- a slot connected to readyRead() calls waitForFinished();
- waitForFinished() hangs (forkfd == -1).
c. for blocking functions, drainOutputPipes() was called twice on
Windows.
By introducing a new processFinished() function, we leave the read
operations in the _q_processDied() slot, while the process completion
code is guaranteed to run only once.
Change-Id: I5f9d09bc68a058169de4d9e490b48fc0b35e94cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
The container size change from int32_t to int64_t created a subtle error
during font serialization. The size of a QByteArray was serialized
without a proper cast and therefore now 8 bytes instead 4 bytes were
written to the stream.
Fixes: QTBUG-89727
Pick-to: 6.0
Change-Id: If9255a5a3124038356bc5053810f98c7c88f8a01
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
In construction of QPropertyBindingPrivate was an initialization
of inlineDependencyObservers with a comment that this is necessary
because of a union. But inlineDependencyObservers is not inside a
union. The comment is outdated and the explicit initialization
superfluous. This patch removes it.
Change-Id: I06544a816533c41af8fc5da3ef44ddd7c18ca86e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
SecureTransport does not allow deprecated digest algorithms, and
(depending on ST version) it may or may not accept our server's
certificate.
Funnily enough, they 'fluctuate' between versions again and again.
Fixes: QTBUG-89922
Change-Id: Ie5fbfca316806bd5000ce2d128b81b718bb36624
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is an addendum to commit 0da5726a43b; making the note about paths
starting with ':' being treated as absolute paths by the underlying
QFileSystemEngine, more visible, so that users of the class don't hit
that pitfall.
Add similar docs to QFileInfo.
Pick-to: 5.15 6.0
Change-Id: Ib34d066d31bb673d340ec41422ed4daf911765b8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Speculative fix to get the right keys in WebEngine
Pick-to: 6.0 5.15
Fixes: QTBUG-89915
Change-Id: I79519b715a1415dccfc4601aae5025b3222a79ae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Use upper-level document build directory for generated .qch files. This
avoids copying of .qch with html documents and duplicating them in
the installation directory.
Pick-to: 6.0
Change-Id: I63b2de0047005419d352ea259dec6f17a826a477
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
With the introduction of QKeyCombination, the result of |'ing together
a set of modifiers and a key goes always through the same QKeySequence
constructor, no matter the order.
The implicit conversion through int when the wrong order is used
causes a compiler warning as that conversion is deprecated. So remove
that test case.
Pick-to: 6.0
Change-Id: I04e27bcd51723ee0efc77e52e45ca3eb8bac5fc7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Remove the logic compressing WM_DISPLAYCHANGE signals by the
WParam/LParam since it also triggers when the geometry is changed
by rearranging screens.
Fixes: QTBUG-79442
Change-Id: I00042c9e687bdb67fc17d6c507818b79a7aee0a2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
There is no reason to have the startup notifier and the death notifier
be active at the same time, as the former will detect death as well.
Previously, these notifiers were racing, but _q_processDied() ordered
signals by calling _q_startupNotification() manually. Thus, the
started()/finished() sequence was always emitted if the child process
was killed anywhere. Now this ordering is simply not necessary anymore.
This makes it possible to reuse the startup notifier for death
notification.
Change-Id: I5ebed9b5f28b19fe56c80498977a3b21be9288fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
This is assumed in various places, so best checked explicitly.
Change-Id: I475dcf5cbb60c0272dec560acd2893cff73872ce
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We should use char32_t for the toUcs4() methods of QString and
QStringView and use char16_t for QString::utf16(), thereby matching
QStringView. These naturally imply knock-on changes in various places.
Unfortunately, we didn't make those changes in Qt 6, so they'll have
to wait for Qt 7.
Change-Id: I18451d4b31b76658092e19d3fcbc8bc0fe5ce307
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Test data causes the QBitArray to be read as 0 byte length. Same issue
on all 32bit systems, removing android blacklisting as this was the only
one failing there.
Task-number: QTBUG-87660
Change-Id: I63f0c1c6fa4e2242e6ebe70f50e422ab0fbf1c88
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Use Q_OBJECT_BINDABLE_PROPERTY instead of non-existing ones.
Follow-up to 50e1976437.
Task-number: QTBUG-85520
Pick-to: 6.0
Change-Id: I138f0775d9804029f2ecd6bd3594ab47b247392e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Most tests fail when running on QEMU ARMv7, but not on target HW or
QEMU ARM64.
Task-number: QTBUG-89819
Change-Id: I686268c200cce1a44a717b80c2970f608be44636
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This reverts commit 09ee4282e5.
The commit made the layouting time go from linear to quadratic, which is
problematic when rendering big documents impractical.
I wrote an alternative fix for QTBUG-20354 which will come as separate
change since it approaches the problem in a different way.
Fixes: QTBUG-89599
Task-number: QTBUG-20354
Pick-to: 5.15
Pick-to: 6.0
Change-Id: Ie450332f06ee40e60c8e4c6c7d10834bff1acf74
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Remove the qmake project files for most of Qt.
Leave the qmake project files for examples, because we still test those
in the CI to ensure qmake does not regress.
Also leave the qmake project files for utils and other minor parts that
lack CMake project files.
Task-number: QTBUG-88742
Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
d25589e052 mistakenly changed the code
to use toString() from the QTest namespace. Call toString()
unqualified and move the compareSequence() helper out of the
internal namespace.
Fixes: QTBUG-89737
Pick-to: 6.0
Change-Id: I8452a0aead7771ad13a5b95438b54e202ccce76b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
systemTimeZoneChange() fails also on 32bit QEMU ARMv7.
Task-number: QTBUG-87663
Change-Id: I5c006a8637edff0a95b1f9b76d2c58006aeae6d6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The test case fails also on QEMU ARMv7.
Task-number: QTBUG-88705
Change-Id: Ibe8c777f0205b298f6b9a27c067dd552253fcf33
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The alignment has been recently updated but never correctly tested,
as test has either been disabled or marked as insignificant.
Change-Id: If6e529c290b2057f58c3b27c89279d9e90728ad4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit remove old legacy code that try to deal with clipboard
image conversion in the qwindowsmime class. It now uses
qbmphandler under the hood which is much more complete.
It also add a small fix for the conversion
of BI_RGB clipboard image with an explicit alpha layer (which Firefox
use on Windows).
Change-Id: Iae026378831799dc676e1aba7d5bd6a0d1c01e7f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
QApplication tries to close all windows on quit using closeAllWindows,
but closeAllWindows skips windows that are already closing. This can
happen when calling quit() from a close event for example.
QApplication then tries to verify that all windows have been closed,
and that logic should skip the same kind of windows as closeAllWindows
does.
The fact that these two logics diverge was identified earlier in
5af73cd9db, but aligning them required further work. As that
commit notes, the right fix to align them is building on top of
tryCloseAllWidgetWindows(), which already returns true/false based on
whether it could close all windows or not. But, unlike the existing
logic in QApplication::event(), it doesn't skip Popups or Dialogs,
so that discrepancy needs further research.
Pick-to: 6.0
Fixes: QTBUG-89580
Change-Id: I87bff56f2eb8a539f1c859c957f5f239dc1eb93d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
As lists of QStrings and QByteArrays are sequentially iterable the base
types should really also be.
The only problem is that they don't have methods to remove items from
the back or the front, but that is well within what we can support with
QSequentialIterable.
Change-Id: I2ab551e7b11a092aba363fb4012d131bbc4b11b4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Make it clear that the fast lookup is by key, not by value.
See also discussion in
https://forum.qt.io/topic/121907/misleading-documentation-of-qhash-qmap/
Pick-to: 5.15 6.0
Change-Id: I396297e0e4674e0a1f889f4138ab52ff224c0ee2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
When AA_ShareOpenGLContexts is not set, docking or undocking
will lead to changing the associated top-level window. This
leads to changing the OpenGL context, and tearing down and
then recreating all OpenGL resources (assuming a well written
application). The problem is, there are no paint events after
the Show, meaning the user code's paintGL is often not invoked,
which leads to showing an empty QOpenGLWidget until something
else triggers a paint event. To remedy this, send a paint event
upon Show, which should be harmless enough, while fixing the
case of docking/undocking.
Pick-to: 6.0 5.15
Fixes: QTBUG-89812
Change-Id: I3c4560f8f069d86645a6314bf7ad1b4ee8e2c716
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
...when a QVkRenderBuffer is used as depth-stencil (i.e. a "throwaway"
depth-stencil buffer that is a lazily allocated / transient VkImage
under the hood). Such a resource is not tracked by the
QRhiPassResourceTracker, so do an explicit barrier in beginPass
instead of having it generated by the tracker.
Fixes: QTBUG-89764
Change-Id: Ice794f44342175f712ea56f450270cbb8929f516
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
...encountered in the command list.
Move all, previously local, tracking variables into a struct. This
allows creating helper functions to reduce error-prone repetition in the
executeCommandBuffer() function body.
The only real change in the patch is in the handling of
Command::BufferSubData and Command::GetBufferSubData: here, instead of
calling glBindBuffer directly, use a helper function that also resets
the relevant state tracking variables. A subsequent
Command::BindVertexBuffer or BindIndexBuffer will therefore correctly
rebind the appropriate buffers.
This is particularly relevant with certain command stream patterns
exercised by some Qt Quick 3D scenes:
- A View3D renders a mesh,
- another View3D has some 2D Qt Quick content, as well as a model with
the same mesh.
When both View3Ds use the default Offscreen render mode, the resulting
command list consists of segments along the lines of:
1. prepare resources for first View3D
2. render content for first View3D - this binds the vertex and index
buffers for the mesh (state is tracked; all 1-4 steps are within
the same command list, processed by a single call to
executeCommandBuffer())
3. prepare the content for the "inline" 2D Qt Quick scene - this may
update vertex and index buffers, that may lead to adding
BufferSubData commands to the list (tracked state (last
vertex/index buffer) may need invalidation/updating - and that's
where our problem lies)
4. the second View3Ds 3D content is rendered: a model with the same
mesh as the last (Quick)3D draw call, so same vertex and index
buffers. If #3 did not invalidate and/or update the tracked state,
the glBindBuffer calls are (incorrectly) skipped.
Fixes: QTBUG-89780
Pick-to: 6.0
Change-Id: Icc933252f3993b8727d192e7ba4aa0f842bab51e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
There was a check "if (cd && cd->signalVectorCount())" in the code
which was faulty because "signalVectorCount()" could return -1 to
indicate that no signalVector is available. This patch fixes
the problem.
Fixes: QTBUG-89846
Pick-to: 5.15
Change-Id: I12c512ff8d889ba2bd298789ab6081930f739089
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In latest Oracle Instant Client releases for windows the OCI library
name is 'oci.dll'. Add it as option to find_library call.
Change-Id: I6e6f4a998207d16583a380c1bd95db857051606b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The code using it got removed in qttools commit 01da5d9a
Change-Id: I14d36ac939f2647139fcc42591a044a03e707553
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is standard for all test cases. It matters, because cmake targets
are generated, and e.g.
$ ninja tst_qabstractitemmodeltester
should do what the user expects.
Change-Id: Iac8160c53d5005382e61c03b7daceaba0a4c2596
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
We did set this variable, however after src/gui/configure.cmake
was loaded (it is early-loaded in src/CMakeLists.txt), meaning the
assignment had no effect.
Also, what this assignment tried to achieve is covered by our global
CMake policies now.
Pick-to: 6.0
Task-number: QTBUG-89754
Change-Id: Ie7aeee1505d112d799455b2915acbfa7e9a12a64
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The qt6_android_generate_deployment_settings() command had been
creating deployment settings files with the wrong key name for qml
import paths. This resulted in the QT_QML_IMPORT_PATH target property
having no effect.
The QT_QML_IMPORT_PATH property can also potentially hold a list, not
just a single value. This change now handles the list case as well,
previously qt6_android_generate_deployment_settings() was assuming it
always held a single path if it was set.
Fixes: QTBUG-89628
Pick-to: 6.0
Change-Id: Ibdd74ec8d130f160433a60a14a0a9f496f496a1b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
QMultiHash::equal_range crashes when called in a const member function.
The Data `d` is a NULL pointer when calling equal_range()
before inserting data into an empty QMultiHash.
Then calling`d->find` crashes.
Fixes: QTBUG-89687
Pick-to: 6.0
Change-Id: I10c3d196cbc72aed8c8c922ef16534bba51037b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
There is no need to disable startupSocketNotifier because the call to
QProcessPrivate::processStarted() will do that.
Change-Id: I20b816533d9a5c4b9bf57135d26166c961a07d07
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
If there is an editor in the table then this needs to be updated as
the resize happens, otherwise it will not adapt to the new size
correctly and can appear drawn over other cells.
Fixes: QTBUG-85484
Pick-to: 5.15 6.0
Change-Id: I918c37f1ee1b0614c03c6b38f95f0f8b35a571f2
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
The spec hasn't changed, but I made the same mistake in xdgmime
(the reference implementation) and in Qt: when multiple globs match,
and the result from magic sniffing is unrelated to any of those globs,
then I used the magic result, but that's wrong, globs have priority
and one of them should be picked up.
This is now fixed in xdgmime
(https://gitlab.freedesktop.org/xdg/xdgmime/-/merge_requests/3)
and in the expected results in shared-mime-info
(https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/99)
which this commit is also tested against.
This change also optimizes QMimeBinaryProvider::addFileNameMatches
to have the same logic as xdgmime for glob matching:
literals > extensions > other globs
As soon as one category matches, we can stop there.
This makes no difference in the overall results, in practice.
The user bug report (against the Qt implementation, actually)
is https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/138
as well as https://bugs.kde.org/show_bug.cgi?id=411718
Pick-to: 6.0 5.15
Change-Id: Ia0a34080427daff43c732609443ee6df8f41447c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>