The code was already there, just only implemented for Linux.
Change-Id: Ib709fc1585f647a98d54fffd16663881b6d24d6f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Having a `break` after a `return` is pointless as it's never reached.
Change-Id: I30877e926c006fac45681f547e97a55410f02e43
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Instead of blocking in QProcessPrivate::closeWriteChannel(), we can
handle a pending close in _q_canWrite() slot when there is no more
data to write.
Change-Id: I2a30789b6099a2ec075292348ebe33a11341bca3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Section titles are valid targets for QDoc's autolinker. When
they are identical to other valid link targets, such as for
example a class, these sections may cause invalid links.
Pick-to: 6.0 6.1
Fixes: QTBUG-91141
Change-Id: Ie9a6258d2bf83932335976d8c0b5fc59f2028ae5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The code in qtdeclarative did not do anything at all anymore.
Change-Id: Idd97145cb74aeb4f43dfce2f282a765e90945073
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
There may be a race where e.g. thread 'B' is woken up by a queued invoke.
At the same time thread 'A' asks 'B' to quit, which will set various
atomics (some important ones are 'interrupt' in the dispatcher and
'exit' in the event loop), but it does _not_ try to send another wake
since there is already an unhandled wake triggered by 'B' itself.
Sadly 'B' reads the 'exit' atomic before 'A' updates it.
Then, slightly before, 'B' sets 'interrupt' back to 0, 'A' write 1 to
it, meaning 'A's interrupt is ignored. Then, since there is no
interrupt, 'B' goes back to waiting for events, leaving the thread alive
and running instead of quitting.
Maybe this has unforeseen consequences (one consequence is that it will
return and re-enter the event dispatcher once more, possible
unnecessarily)
Fixes: QTBUG-91539
Pick-to: 6.1 6.0 5.15
Change-Id: Ie6f861f42ffddf4817d5c8af2d764abe9d9103c2
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If the family name starts or ends with a space in the actual font
data, then this would not be selectable by Qt. This is because we trim
the family name before matching it against the contents of the database.
Testing on Windows GDI, it actually does trim the spaces on the
family names (matching a request for "Chibola" with a font called
"Chibola " for instance), but since we read the font data ourselves,
we are not doing this.
To ensure we never have font names that cannot be matched in the
database, we make sure we trim the family names before registering
them.
[ChangeLog][QtGui][Text] Fixed matching against fonts which has a
family name that ends or starts with a space.
Task-number: QTBUG-79140
Pick-to: 6.1
Pick-to: 6.0
Pick-to: 5.15
Change-Id: I9cdb50b78a7da2d2697f992ce462033eb1d7ada7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Do what the Vulkan backend does, and just take the offset
and the QRhiBufferData. There is no reason to store a full
QRhiResourceUpdateBatchPrivate::BufferOp struct within the
backend.
Change-Id: I67528029de40320b3e4f031346d40dfc0bb9ab52
Pick-to: 6.1 6.0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Follow the similar Vulkan change in 20eb40bce9
and drop the queued up buffer data for a given slot when the current update
covers the entire buffer. This is relevant in particular for Qt Quick 3D
where such dynamic buffer changes are common.
Change-Id: If1e70d78968586b552a5357bc97af10cc61d9611
Pick-to: 6.1 6.0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Since qmake links against QtCore, we don't need to check for the
bootstrapping case in qlibraryinfo.cpp anymore.
Change-Id: I644b1e71db727773b3e32ac650481df134acf033
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Now that we're not actually using qmakeconfig.cpp anymore, we can remove
it together with all qmake-related information that was written into
qconfig.cpp.
This also moves the qtConfEntries array back to qlibraryinfo.cpp.
Change-Id: I5e57d8c55613332cc3e57b11df4398d46aed259b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Those have fixed values.
Change-Id: I7f1ba8036f43413d3c805f4b419ae79e037343fb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is not configurable and doesn't have to be in the generated
q[make]config.cpp files.
Change-Id: If294d735800a3b5c6b3e269abdd86df401cf4864
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QIcon::detach can judgment if the d pointer is nullptr
Pick-to: 6.1
Change-Id: I90fd5f50ed2565a5654b978c4603635e62677953
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
...when it comes to the output size.
This mirrors what all other backends do. For example, with Vulkan
the only source of size is the surface (VkSurfaceKHR), never the
QWindow, even though we'd expect that the surface size equals
to window_size * dpr, and that's almost always true, but there
are exceptions. (e.g. we have seen bugs on Windows with some drivers
in high DPI situations where the Vulkan surface did not fully match
the window size, yet it is the surface, and only the surface, that
matters for rendering, i.e. viewports and such must match the surface,
not the native window)
With Metal we hit a similar problem on iOS: the QWindow's size*dpr
and what we calculate from the CAMetalLayer have a height difference
of 1.
Mitigate this by making QRhiSwapChain::surfacePixelSize() and the
calculation for currentPixelSize() done via the same route (the
CAMetalLayer). Otherwise, if there is a mismatch between what the
QWindow and the layer says, Qt Quick will think that there is a
resize happening (has happened) whenever starting a new frame, and that
has far reaching consequences (suboptimal performance, increased
memory usage by buffers, etc.)
Change-Id: I114df92bf35622c99f2747420fdce401db7705a6
Pick-to: 6.1 6.0
Fixes: QTBUG-91438
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If there is a large (3/5 of the screen in portrait or 2/3
in landscape) TextEdit on the screen, and it gets focus
on click, it will be shrank to fit the screen. Next click on this
TextEdit will restore its normal height, the next will shrink.
Pick-to: 5.15
Fixes: QTBUG-91056
Change-Id: I3dbf085cbfdc2739d537a304c16e28c58a6e01ce
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reformat a couple of examples correctly.
Change-Id: I2f0897267b4e3c4d7d2925f2d20cc45687278b0b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
When the source models don't have the same number of columns, the proxy
keeps only the smallest number of columns across all source models.
Afterwards, if a source model emits dataChanged in a column past
that number (a "hidden" column), the proxy needs to ignore it rather than
assert.
But also, if the source model emits a dataChanged signal across both
visible and hidden columns, then the last column number needs to be
adjusted so that the signal is correctly processed and forwarded.
Task-number: QTBUG-91253
Pick-to: 6.1 6.0 5.15
Change-Id: I939e8ec0faf41370472f86785851292e4372f72c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Instead of having so much manual pointer manipulation and duplicated
code.
Change-Id: Ic90d8429a0eb4837971dfffd1664f8f63753440a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Following patterns from the other backends is insufficient with OpenGL
because we do not use real uniform buffers. There is currently a
possibility that a shader program will be bound without following it
with setting uniforms. Correct this by having a second level of tracking
of the associated srb object in the pipelines.
Pick-to: 6.0 6.1
Fixes: QTBUG-91630
Change-Id: I74a012daade826dd22c436bde06381c1233bad11
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
A protected context is required to allow the GPU
to operate on protected resources, including protected
surfaces and protected EGLImages.
For example, GPU can post-process on protected content
like DRM protected content so that complex, nonlinear
video effects or mapping onto textures can be used.
The surface format option may be relevant for DirectX
and Vulkan in the future:
https://microsoft.github.io/DirectX-Specs/d3d/ProtectedResources.htmlhttps://www.khronos.org/registry/vulkan/specs/1.1-khr-extensions/html/chap12.html#memory-protected-memory
Change-Id: I2d155f0e68b830276690b4833b22a2bc452cdcad
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
On Gnome, we will not default to Wayland at the moment, even
if the desktop is run in Wayland mode. In this case, we warn
users that they can still select Wayland manually using
QT_QPA_PLATFORM.
Problem was: We never checked if they had actually explicitly
selected Wayland, so even in the cases where we would end up
using that QPA plugin, people would still see the warning.
This moves the check to the end of the platform selection
algorithm, after we have collected all the information.
Pick-to: 6.0 6.1
Change-Id: I0d734bd0782c5e58d6dc63f69b7d531a479ad942
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
There is a duplicate condition judgment in QComboBox::setPlaceholderText, just delete it.
Change-Id: I570415c5930372866f290216a89260353d3992b7
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Quoting from https://en.wikipedia.org/wiki/ISO_3166:
"ISO 3166 is a standard published by the International
Organization for Standardization (ISO) that defines
codes for the names of countries, dependent territories,
special areas of geographical interest, and their
principal subdivisions (e.g., provinces or states).
The official name of the standard is Codes for the
representation of names of countries and their subdivisions."
In order to prevent the word "Country" from causing ambiguity, the
document should clearly state that this enumeration refers to a country
or region.
Change-Id: I05543faa4193b3ddaf31d02c670b4b5f46e94389
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When using XQuartz on macOS, the virtual pointer device is detected as
a touchpad, not a mouse; but QXcbConnection::xi2HandleScrollEvent()
expects the device to be an instance of QXcbScrollingDevice for storage
of some state. A touchpad that has the scrolling capability must be
that type, not a plain QPointingDevice.
Fixes: QTBUG-91402
Pick-to: 6.1
Change-Id: I1b82766d4a3f87f656e56c0d8904def26fb0979a
Reviewed-by: Liang Qi <liang.qi@qt.io>
We send window id in decimal, however, it is expected to be send in hex.
This causes a mismatch and makes portal dialog to show in background.
Pick-to: 5.15 6.0 6.1
Change-Id: Ibd77199bbb4a2ad4782a0457ddc5506c6b5608fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTreeView's drawTree implementation performs lazy layouting
when calling itemDecorationAt. If animations are enabled,
this can change the list of items, and invalidate the copy
made earlier.
Don't copy the list of items, use a reference instead so that
code iterating over the items later operates on valid data.
Add an assert in the private itemHeight method, it must not
be called with an index that is out of bounds.
Fixes: QTBUG-42469
Pick-to: 6.0 6.1 5.15
Change-Id: Ifdb782881447912e00baffd1c407de10a1d8d0d4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Cleanup the mariadb driver a little bit:
- use nullptr instead NULL
- use unsigned long instead int for blob handling now that QByteArray
can handle more than 2^31 bytes
Change-Id: I79639a42a739aabdf776cc688cb5d664248aa610
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This function returns the size in device independent
pixels, and should be used when calculating user
interface sizes.
Change-Id: I528123f962595a3da42438ca560289a29aca4917
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Draws to a pixmap contents of the requested window. On Android it works
only for QtWidgets application.
Qml application contents could not be grabbed due to lack of access to
the contents of OpenGL framebuffer from QAndroidPlatformScreen
Fixes: QTBUG-63275
Pick-to: 5.15
Change-Id: Ief7de1b709387d798138387bb735f4b48cf2928d
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
this adds emulation for 2 NEON commands that armv7 lacks
this increases conversion speed by around 50% in my simple tests
Change-Id: I4f52d353184e9a8d88089de60e17bd5670637c0c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
[ChangeLog][QtNetwork][QNetworkInterface] Fixed the reporting the "DNS
eligibility" factor (QNetworkAddressEntry::dnsEligibility) for global IP
addresses. Previously, QNetworkInterface interface erroneously reported
all global addresses as eligible, regardless of whether they had already
been deprecated by the OS or were temporary in the first place.
From the tst_QNetworkInterface::dump output (netmask & broadcast
suppressed for readability, IPv6 prefixes changed to protect the
innocent, but the local part is exactly as found on my system):
address 0: 192.168.26.33/24 dns-eligible preferred:33546998ms valid:33546998ms
address 1: 2001:db8::800/128 dns-eligible preferred:264817000ms valid:264817000ms
address 2: fd00::800/128 dns-eligible preferred:forever valid:forever
address 3: 2001:db8::2f5b:342c:fc53:b9b2/64 dns-ineligible preferred:12422000ms valid:264817000ms
address 4: fd00::9351:adff:333d:5c8d/64 dns-ineligible preferred:12421999ms valid:531402999ms
address 5: fd00::7297:9516:fbb4:17ac/64 dns-ineligible preferred:0ms valid:445585999ms
address 6: fd00::fdc8:e620:691:3b44/64 dns-eligible preferred:forever valid:forever
address 7: 2001:db8::ae82:a01:5a8a:e210/64 dns-ineligible preferred:0ms valid:264816999ms
address 8: 2001:db8::c673:e0a2:8927:2118/64 dns-eligible preferred:264816999ms valid:264816999ms
address 9: fe80::bd89:b998:4aeb:a5d0%bond0/64 dns-ineligible preferred:forever valid:forever
Prior to this commit, only address 9 was showing as ineligible.
Addresses 1 and 2 come from DHCPv6 and are thus always eligible.
Addresses 3, 4, 5, and 7 are temporary addresses added on account of
RFC 4941 and are therefore ineligible (they have the IFA_F_TEMPORARY
flag set). Note how 5 and 7 have also stopped being preferred. Address 3
is the one I see when I go to ip6.me and address 4 is the one used to
reach the router.
Addresses 6, 8, and 9 are the "permanent" addresses that would normally
be based on the MAC address of the interface, but are actually in
"stable privacy" mode for me (RFC 8064). Address 9 is the link-local
one, which makes it ineligible, leaving the other two stable addresses
eligible.
Addresses 1, 3, 7, and 8 are global, from a DHCPv6-PD delegation from my
ISP, which is why they have finite lifetime. Addresses 2, 4, 5, and 6
are from my local Unique Local Address (ULA) prefix, which is why 2 and
6 are valid forever.
Pick-to: 6.1
Change-Id: If8b43dc9678c4b4ba9c1fffd1668fdcae873c6bd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Renamed the private part of the namespace to QTlsPrivate.
Fixes: QTBUG-91531
Change-Id: Id2d9c458d8d958b35e437eee42889177dad0a7a7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit e4efa00c72c7011f4e5c27722c2a522b30274610)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The duo Q_OBJECT_BINDABLE_PROPERTY and QObjectBindableProperty
can only be documented together. The documentation is now with
QObjectBindableProperty. This patch adds a documentation entry
for Q_OBJECT_BINDABLE_PROPERTY which links the user to
QObjectBindableProperty.
Task-number: QTBUG-90511
Pick-to: 6.0 6.1
Change-Id: I9af4a99d49f4b02ee9645a2cc9a9a024a6a1a552
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
And refactor the TMP to use std::conjunction and use variable template
specialization instead of template class specialization for the base
cases.
Change-Id: Iea6a03f13ea3443a0fa7365af21c496670c1e07f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This is to avoid false positives.
By default files are large if uncompressed size > 10 MB. Only configurable internally.
Also add auto tests.
Task-number: QTBUG-91392
Pick-to: 6.0 6.1
Change-Id: I32258cb7c957f2a23a05157ba4ed5c0af2ba585e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The return type goes on the same line of the rest of the signature.
Change-Id: Icacf2e00ed2876c4c9b72b8f6c428c2e37ee42a7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
These types can be copied via memcpy, so use the correct tag.
Change-Id: Icba37d42dd8658225ce4889284661d108122d489
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
When editing text the cursor is not placed correctly. So this
has been achieved by tricking Android into thinking that the
input area is only the line where the cursor is, so it is
forced to keep it on screen.
Fixes: QTBUG-91073
Pick-to: 5.15
Change-Id: Icc2e8315deb76ca1a84819d3fdceaa7b027b1174
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
The Android build failed, because the namespace QNativeInterface could
not be found. Include the header file where it's defined.
Change-Id: If53eda4d4d4e6d5e66787d74c714215721ba0b60
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
A way to read the description of the profile from ICC, or set one
yourself.
Change-Id: I68622e30ee209cac99c41f3df934712c3548c0de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Fixes static analyzer warning f03d95823e9f1395d64501cc111f0f63
As a drive-by, plug the potential memory leak if the assigned-to
QDockAreaLayoutItem already holds a QDockAreaLayoutInfo object.
The subinfo is deleted in the destructor, QDockAreaLayoutItem
has ownership for the subinfo.
Pick-to: 6.1
Change-Id: I8546adc6fb0537078eea9dfb45d1bd9967d8d149
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This harmonizes the execution between start() and startDetached(). Both
did QStandardDirs::findExecutable(), but duplicated code. However, only
start() supported launching .app bundles on Mac.
[ChangeLog][QtCore][QProcess] startDetached() now supports launching
.app executable bundles on macOS / iOS systems, like start() already
did.
Change-Id: Ic90d8429a0eb4837971dfffd1664f776b2c0edfd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
qregularexpression.h requires FEATURE_regularexpression to be enabled.
Add a condition to the 'qt_pch.h' header to fix the build when PCH
are enabled and FEATURE_regularexpression is disabled.
It seems that the filter implementation of QSortFilterProxyModel
has QRegularExpression as its base. It's necessary to make
sortfilterproxymodel dependent on the regularexpression feature.
Fix the precompiler condition for the extractSections function in
the QString implementation. Use the same precompiler condition for
the QString::section and extractSections functions, since
QString::section depends on extractSections.
Change-Id: I5b775e0842a0aa1a8d47f8dded376bdfcf63b5bf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Like for LibraryExecutables, we must default to "bin" on Windows for
HostLibraryExecutables in our generated qconfig.cpp.
Pick-to: 6.1
Fixes: QTBUG-91496
Change-Id: Ib5a4b3b3fd6192bd953e615058b482e67ad19462
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This feature only existed to trigger the evaluation of the libs gdi32,
kernel32 and friends. Those libs only were relevant for the qmake build
of Qt and can be removed now.
Task-number: QTBUG-83932
Change-Id: Idfd4d8f70b6dbd1067412fecc1115b504b1ad347
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
For the readers that are new to QtConcurrent, it may be confusing that
unlike the normal usage of QPromise, they don't have to call start() or
finish() when using Qt Concurrent run with promise mode. Be more
explicit about that.
Pick-to: 6.1
Change-Id: I08df6c4ca41bec4120e208a6643ee20c7adf265c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Essentially, the same code re-shuffled and placed behind
the new interfaces.
Fixes: QTBUG-91174
Task-number: QTBUG-65922
Change-Id: I8f14697f10713f9738c5c7805aed0150c084850c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 6c835796c8ea2590008900ffb5f4bf0d902ee73d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
One of the changes done in 902505a058
results in a compilation error: somehow an expression
"int * enum value (with underlying type qint64)" has result type
"long int" and thus the compiler cannot find matching add_overflow
Return the qint64 cast back to overcome this
Compiler: gcc 7.5.0-3ubuntu1~18.04
Change-Id: Iaca882762e812bef69ec325df5f59e02082a0130
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Follow up of 612a01be65
(deprecating QSP::take()): for the same reasons, swap()
functions do not belong to QScopedPointer, or they would
allow the pointer to escape:
QScopedPointer a;
{
QScopedPointer b = ~~~;
qSwap(a, b);
}
// b's pointer escaped its scope
Deprecate them as well.
[ChangeLog][QtCore][QScopedPointer] QScopedPointer swapping
functions have been deprecated, as they would allow the
managed pointer to escape the scope. If you need those semantics,
use std::unique_ptr instead.
Change-Id: I2b0938b62f2ef5a3561f61f595a3fb4c505a8f08
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Variable 'i' is assigned a value that is never used in qt_make_filter_list()
Pick-to: 6.1
Change-Id: Id845ecb5231b97a899443bdcb9f49cccb7f20bea
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The d_ptr is never nullptr. If it could be, then other's d_ptr could
also be nullptr, and we would dereference the null pointer.
Guarding against self-assignment is nevertheless a good practice.
Fixes static analyzer warning
5fc3780532e30c6350a0aa1ad2188a4c.
Pick-to: 6.1
Change-Id: I07ff808e4c4f5bf07b4d6663f1fb4a3301a0fec7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QMetaType::construct will return nullptr if a copy is requested but
if there is no copy constructor. In that case, the memory allocated in
QMetaType::create will be leaked.
This case is covered in the unit tests in
template<>
void testCreateHelper<QMetaType::Void>()
so we can't assert in construct that a copy constructor is present if
a copy is requested.
Fixes static analyzer warning 618b1e6877f737df57c39fd35ad91cd4.
Pick-to: 6.1
Change-Id: Ic439b36b1f120b9d0f888efaeab2801d8acc13de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
In preparation for deprecation of QScopedPointer::swap, port to
other established solutions:
* QPainterPath was basically a QExplicitlySharedDataPointer
re-engineered around a QScopedPointer. Just use the right class
for the job...
* QBrush is in a similar situation, although its deleter is
more complex; port to unique_ptr for that one to minimize the
code impact.
Change-Id: I7f7c1dd8702f84f5146043347af64dda3c7e6f09
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
QMetaType::convert does have code paths where nothing is written to the
'to' out-variable. Those code paths shouldn't run in this particular
case, but it's good practice to initialize out-variables anyway.
Fixes static analyzer warning 1453920f5abe1e30471eca6aa01d22d1.
Change-Id: I6f6d1044759866c405e61cb51147ca0490c4f3a4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The corresponding API is becoming a part of QTlsBackend interface,
since it's too minimalistic and does not require additional
interfaces, unlike certificates or keys.
Fixes: QTBUG-91177
Fixes: QTBUG-91175
Task-number: QTBUG-65922
Change-Id: I44dd0adbdf2427962451998664efe234d59fae24
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit cdf4976b5a01bc5b65aed746acc9cc7f87b0fd97)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It's undefined behavior, esp since we leave it to the compiler to
implement a move constructor for the ButtonInfo struct. So read the data
that we need first.
Fixes static analyzer warning
de76eedae524c86f89d6369c0f5af8c7.
Pick-to: 6.1
Change-Id: I8fc458b7e9ba8904ec7a3b1c26aac0628e336ea2
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Either the condition 'if(oldChild)' is redundant or there is possible
null pointer dereference: oldChild.
Pick-to: 6.1
Change-Id: I28971cfa33294679ddd325158669b422b3a1c2eb
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Before, No matter what the value of "success" is, Will print
the "Xcb EGL gl-integration successfully initialized".
If egl initialization fails, this line of printing will be very
confusing.
Change-Id: I6a06e2c14372913823c56ffe2fd8b831e084c719
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Unlikely that one item is nullptr and the other item doesn't have a
scene, but we do already test for the scene pointer, so don't continue
if it's nullptr.
Fixes static analyzer warning f59576ecf6618447c4f9c7be93fc737f
Pick-to: 6.1
Change-Id: I6d436bb1211ddd412821d6978bab25192033f5e5
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The while loops terminate if focusAfter becomes nullptr (unless we break
earlier), so don't dereference those pointers without checking first.
Fixes static analzyer warnings 979f2d508db4d5838f6c9b296120ce60 and
481f2ec7b5851bf19414478428f944b7
Pick-to: 6.1
Change-Id: I60fc5999907fe3b3146d7047ee1eff197719ab31
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The styleInfo parameter defaults to nullptr, and the scene can evidently
be nullptr since we test for it before ungrabbing the mouse.
Fixes static analyzer warnings
fbd03604cc701651595a2ea33c5562b4 and
30fcb05194f3a2d121fc57b05e0ccf10
Pick-to: 6.1
Change-Id: I8e9d4fe4055115c366ada1cbb22a8f0839ba41da
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When a foreign event loop that does not enter an alertable wait state
is running (which is also the case when a native dialog window is
modal), pipe handlers would freeze temporarily due to their APC
callbacks not being invoked.
We address this problem by moving the I/O callbacks to the Windows
thread pool, and only posting completion events to the main loop
from there. That makes the actual I/O completely independent from
any main loop, while the signal delivery works also with foreign
loops (because Qt event delivery uses Windows messages, which foreign
loops typically handle correctly).
As a nice side effect, performance (and in particular scalability)
is improved.
Several other approaches have been tried:
1) Using QWinEventNotifier was about a quarter slower and scaled much
worse. Additionally, it also required a rather egregious hack to
handle the (pathological) case of a single thread talking to both
ends of a QLocalSocket synchronously.
2) Queuing APCs from the thread pool to the main thread and also
posting wake-up events to its event loop, and handling I/O on the
main thread; this performed roughly like this solution, but scaled
half as well, and the separate wake-up path was still deemed hacky.
3) Only posting wake-up events to the main thread from the thread pool,
and still handling I/O on the main thread; this still performed
comparably to 2), and the pathological case was not handled at all.
4) Using this approach for reads and that of 3) for writes was slightly
faster with big amounts of data, but scaled slightly worse, and the
diverging implementations were deemed not desirable.
Fixes: QTBUG-64443
Change-Id: I66443c3021d6ba98639a214c3e768be97d2cf14b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Weird macro had inverted notion of type safety: instead of casting
parameters and return values (they are pointers) to work with generic
OPENSSL_sk_xxx functions, it was ... casting a function pointer to an invalid
type to get ... nothing, but UB. Home-brewed (un)'safestack'!!!
Change-Id: Ib91a7ba4cd472f370836797e422456f91a4385b0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 9fc2f1f076b953ff0979fb73ed6e70ac9bde278c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also since we have to properly support 'no-ssl' configure option
(alas, we support QSslCertificate on such builds) - introduce
a minimal crippled QTlsBackendCertOnly, which depends on
X509CertificateGeneric.
Fixes: QTBUG-90954
Task-number: QTBUG-65922
Change-Id: Ib9d62903f16b7c0eaaa23e319a822c24a7631dc6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 41fc143635c25f937a557f09890601f6c7d38736)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... which makes me wonder, why isn't this stuff bumped automatically
when a minor version branch is created?
Change-Id: Ia43f898163a4baa0896a09bd13d65cf534fe1df5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Avoid painting errors with dpr < 1, also for the PassThrough
mode.
This limits the minimum high-dpi scale factor to 1,
for the code path which determines the scale factor
based on screen DPI.
Pick-to: 6.1
Task-number: QTBUG-89948
Change-Id: I14b3f130f0ae141d5f05c87437f926a9f76d1dec
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If control is nullptr in the beginning, then it will be nullptr later as
well, and the function won't do anything. And if the effectiveTextFormat
is Qt::PlainText, then the linkToCopy will be empty, and the function
won't do anything, either.
So we can just handle these cases right away, making the code simplier.
Fixes static analyzer warning 43de3f3125108b4353afd94e94f59926.
Pick-to: 6.1
Change-Id: I5b8eb94a1e40c2725de6a168298d8f3bcde748eb
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The graphicsview doc snippet has an explicit
QT_REQUIRE_CONFIG(printdialog) check that will fail the
build if Qt is not configured with "printdialog".
This check should be mirrored in the cmake file, so that
we skip building the snippet in the first place if the
feature is not available.
As it stood, we would build the snippet if "printsupport"
was enabled. But this is too granular, as you can configure
Qt to have general print support, but at the same time, skip
the print dialog. This caused the build to fail on iOS.
This patch will check the correct feature in the cmake file.
Change-Id: I31acc1f7c257e08374ea7b84a7fc38c66f214271
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Do not include the first parameter in the main tag anymore. That is
a left over from before unaligned access was added.
Pick-to: 6.1
Change-Id: I2caf027c6b9930d3e23fe5ec8bdcd45db34835a9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Some popular fonts on linux systems follow a naming convention,
where font styles are named 'Regular', 'Italic', 'Bold' and
'Bold Italic'. Qt so far only accepts the words Italic and Oblique
interchangably, but not with Regular and Normal. This change will
make sure that Regular is interpreted the same as the Normal font
style.
Fixes: QTBUG-90396
Pick-to: 6.0 6.1 5.15
Change-Id: Ibbaf086de742c91f4d380c937ca80e846aa32a2e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Since the QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and
QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH definitions keep the same
value in modern CMake build, no need to have special handling in cases
where these values are used in qmake. Also it will be useful to
specify the relative path to the prefix directory from the directories
different of 'bin' when use QMakeLibraryInfo.
Task-number: QTBUG-75870
Change-Id: I5a777001eb334dcf05e22853a514d4257352d59b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
QT_CONFIGURE_CROSSBUILD is always '0', so it's not necessary to keep
conditional compilation in QMakeLibraryInfo.
Also the QT_CONFIGURE_SYSROOTIFY_PREFIX definition is never used
in the project.
Task-number: QTBUG-75870
Change-Id: I1fe42dce40fddc6a72254736883f93aa4727f6b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Including one entry of the value in the header is pointless after
the unaligned access rewrite, and a potentially dangerous pattern,
though safe here due to overchecking.
Pick-to: 6.1
Change-Id: I4c0380040f89920467c309503408f1df6f88423f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Previously, *datetime was only written to if the parse was a success.
When parsing a date-time that's invalid by virtue of falling in a
spring-forward gap, the parser returns a date-time that is invalid but
has a toMSecsSinceEpoch() suitable for use in creating a sensible
interpretation of the parsed string (in offset by the width of the gap
from the specified position in the gap). It is more useful to return
this value than a default-created QDateTime.
Change-Id: I89f39e729b1f9fede1532d8b82f6f676477ddadb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
When refreshing a QDateTime(,, Qt::LocalTime) we call mktime on data
obtained from it, passing in the DST status (when known; this keeps
two otherwise identical times in a fall-back distinct). One of the
tests relies on changing zone under the feet of such a date-time,
created in Hawaiian standard time; it serializes it, the reads it back
in Western Australian Daylight-saving time and expects the results to
be equal. However, the two differ in DST-ness, which leads to mktime()
failing for the Hawaiian original, with unwelcome results.
Notice this case, failure with DST-ness claimed known, and retry
without the claim, so as to correct the DST-ness.
Change-Id: Id0278df53130f76fc587769efe946ca9af1adc26
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When computing a recent and imminent time, to bracket the time for
which we want data, take care not to cycle round to the other end of
the range of representable times.
Rephrased comments on this function, in the process, to more
accurately reflect what we're doing.
Change-Id: Iacd36186abc6b19d0ca03981aec80b2c5af077b3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The addition of a sanity-assertion revealed that, for an invalid
time-zone, refreshZonedDateTime() left epochMSecs unset but computed
offsetFromUtc from it none the less. Leave it as zero in that case, or
any other where the conversion to UTC didn't give valid date and time.
Change-Id: I0ebd955798532e91e7e211bf065667e313ee5c2d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This take more lines but makes the condition clearer and the lines
shorter, even after converting to use the names for constants in the
condition.
Change-Id: I9e5b7b79ff62095ed11b8723be238444fd32d9c1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Various constants used in qdatetime.cpp were cast to qint64() where
used. There ware also some Q_INT64_C()s, two of which should have used
members of this enum; the third suggested a new addition to the enum.
Adding that and basing the enum on qint64 eliminates the need for
casting, although one asprintf() does now require a cast back to int.
There were also some redundant casts to qint64(), so I removed those.
Change-Id: Ia51ad8020f037badb1506ca379da19098a8655f8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QPointF operator== is fuzzy, hence it can't be hashed efficiently.
Prevent the erroneous addition of the overload by client code
by providing it as deleted.
Change-Id: I2cfaaf5c2c8896ec9a7929f7c7bf52a912d0450f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In QGraphicsScene's function draw, don't copy the children into a
const copy (to prevent detaching in the loops), as they might get
sorted. Instead, use a const reference.
Amends e349f787d5, which introduced
the bug by making a copy of the unsorted list.
Fixes: QTBUG-81316
Pick-to: 6.0 6.1
Change-Id: Iab9b87e75178a883806088a9db234c7a2aaa9301
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
After the unaligned ICC profile fix, we could read 2 bytes past the end
of the buffer for curv elements with 0 parameters, though we wouldn't
use or return the data.
Pick-to: 6.1 6.0 5.15
Change-Id: Ibea9fa2840c01d690716d8f48e301fbfa67aa163
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Before this change, the QMetaType for T const* where T is derived from
QObject would not store the static QMetaObject of T. This commit changes
this. As a consequence, the metatype system can now convert between
const and non-const pointers to QObject. Note that this allows casting
const away; but so does C++ with const_cast.
In addition, a new flag, QMetaType::IsImmutable is introduced, and used
to tag the metatypes of pointer to const types. This allows code to
discern between pointers to mutable and const QObjects, which is
relevant for the QML engine.
Task-number: QTBUG-82354
Change-Id: I3e4e4f39f565bd99a65e161528ce5304df73d6d6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Getters and setters of bindable properties have to be carefully
written to avoid several problems. This patch adds documentation
for this.
Task-number: QTBUG-89505
Task-number: QTBUG-90511
Change-Id: Ib25590b3d8d95c490d9555c0f258f48cb6cfe4a9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Assert the expected side effect of createTLSysExtra, which might not
allocate a window, but must do so in this case (as we have already
returned if the QWidget is not a window).
Fixes static analyzer warning 2f3bbfe8addb586445e96f8906d6769e
Pick-to: 6.1
Change-Id: I4d5b8651b3510eff8e4a7b25889c0521ba6a4247
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Messages about Qt deficiencies reduced to info, and info set as the
default message level.
Pick-to: 6.1 6.0 5.15
Fixes: QTBUG-91401
Change-Id: Ia97438f08de5e0383e77631dca9b253b47ef8167
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Instead of intercepting the WM_QT_SENDPOSTEDEVENTS message in the hook
procedure, we can handle it at receive points, making
qt_GetMessageHook() unnecessary.
Including general performance improvements, this patch fixes the issue
where some applications (e.g. Ableton Live) do not call a chain of
nested hooks for plugins.
Pick-to: 6.1 5.15
Fixes: QTBUG-90949
Change-Id: If8e96848392c6f10d45af2aac0567707d16af673
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Nuno Santos <nunosantos@imaginando.net>
White-point was calculated wrongly and some tables could cause bad
behavior in the tables.
Pick-to: 6.1 6.0 5.15
Change-Id: I24e8f5f3cc1306f5f898a4acbf7b008e26bd04e2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
After QPoint(F), it's now the time of QSize(F) and QVectorND,
which can be unambiguously decomposed.
[ChangeLog][QtCore][QSize] QSize is now usable in a structured
binding declaration.
[ChangeLog][QtCore][QSizeF] QSizeF is now usable in a structured
binding declaration.
[ChangeLog][QtGui][QVector2D] QVector2D is now usable in a
structured binding declaration.
[ChangeLog][QtGui][QVector3D] QVector3D is now usable in a
structured binding declaration.
[ChangeLog][QtGui][QVector4D] QVector4D is now usable in a
structured binding declaration.
Change-Id: I67bb152f4210f2be27607179cd2ec522174cc483
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
If we are connected or bound, then we must have an engine.
Otherwise in code we frequently test for the d->socketEngine pointer,
including in waitForConnected.
Fixes static anlyzer warning 3b37ce4102843c97ceef2b7bb68a409d.
Pick-to: 6.1
Change-Id: Ib9818282ad2813db97859cbe1f184bcfb5ea4ab4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
QIcon::detach might result in the d pointer being nullptr, and other
code tests for that condition and allocates the d pointer explicitly.
Change the order of the tests in setIsMask as well, fix static analzyer
warning 0a4723ca2d216ec8883a3d412aeded4c.
Pick-to: 6.1
Change-Id: Idca12f230036362f13cbaee1ae4f0e5ce6726015
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Move the qmake-specific logic of the QLibraryInfo class to
qmake internals. 'qconfig.cpp.in' now stores information about
the library info entries to keep them consistent between qmake
and the Core library. qmake requires specific features enabled
in the Core library, so building qmake will be skipped if the
features are not enabled.
All flags directly related to the qmake have been removed from
Core lib.
Remove all bootstrap related sections from qmake CMakeLists.txt
Task-number: QTBUG-89369
Change-Id: I26de157d3bfd4a5526699296e9d46e1c180b89ae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Be more precise about attaching a continuation with the default
(QtFuture::Launch::Sync) launch policy after a continuation with
context.
Pick-to: 6.1
Change-Id: I5b80063df2443e5742033864ba012bf34ed4cdf7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Only RGB444 and RGB666 were treated slighlty different from the rest,
but the test had a few additional mistakes.
Pick-to: 6.1 6.0 5.15
Change-Id: I4728b4036affedfffce8bca5c1e7be3869344fbe
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Remove paragraph about long gone methods, and rephrase it
as a note on corresponding getters. At the same time
document 64-bit behavior as undefined.
Pick-to: 6.1
Change-Id: I26ffd95040eb0aea30585aa0fa8526417b0ecc7a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
setCurrentAnimation(0) is expected to set the currentAnimation pointer -
which it does, as long as there are any animations.
Fixes static analyzer warning 106daf11ddfe9bb4fa7cf98c9097962c
Pick-to: 6.1
Change-Id: I3739bcfda103db391d21f135485f0b700c48ead1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
m_view might be nullptr, which is checked before setting up the palette,
so don't set the QTextCharFormat up without checking first as well.
Fixes static analyzer warning 0ef07dd07bebe04b93d1fc802eddb57a
Pick-to: 6.1
Change-Id: Ia1c92eb4183c9e368e92875775cff90e2883ddaf
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The plugin depends on Qt::DBus, so do not try to configure it if
Qt::DBus is not available.
Pick-to: 6.1
Fixes: QTBUG-91155
Change-Id: I70ddca63a277cd57a253092f97160f89ebc76f06
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
In QTimeZonePrivate::dataForLocalTime(), mistrust the Android
backend's hasDaylightTime(), as it has a comment saying it only knows
about future transitions, not past. This caller of it really needs to
query "has ever had a transition", which this doesn't answer. Many
zones that have no plans for future transitions have had transitions
in the past; these were failing the transitionEachZone() test.
In the process, refine the test itself, making sure we catch some
quirk cases that shouldn't arise and making the debug message on
failure more informative (while eliding the zone name, as this is part
of the test name anyway, so added to the output by qDebug() itself).
Fixes: QTBUG-69131
Change-Id: I88a0528182c247acb8b6327b40516178e455bcc0
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The detailsText widget might be nullptr even if detailsButton is not.
Both are tested elsewhere in code, e.g. in the _q_buttonClicked
private slot, so be consistent.
Address static analyzer warning 00b85157447772462c3b8ffc1da0ae3a
Change-Id: Ib8c31b79653a6e8a9011692cb84ffaa2fb8047e7
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Since we test the pointer in the beginning, it might be nullptr.
But if we receive events that require a layout, then it must not be
nullptr. Assert that assumption.
Address static analyzer warning 06f8cc945ead26f20c6b9599faf76c83.
Pick-to: 6.1
Change-Id: I1c6eb9e9d2c9444fcb9bd1d1d9c345237dc72b33
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
If called by QMetaType::canConvert with two nullptr values,
the QMETATYPE_CONVERTER_ASSIGN macro will expand to code
dereferencing both 'to' and 'from' pointers.
Assert that others callers provide two valid pointers.
Fixes static analyzer warning 02dc34cc2ad1d4c3c6e55b44e08983f2
Pick-to: 6.1
Change-Id: I24de914faa25dc7cb1da5eae09a125506caac389
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
It can't be, since then 'o' (which is never nullptr) would be different,
and we'd return in the previous line.
Since we test for d->popup a few lines above, help clang static analyzer
to not report this with hash
27ff831d79d1779825fd964239cbefe7.
Pick-to: 6.1
Change-Id: I9f0b14bd88418b897cee2d7a63e8a10fc4a0b01c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Some plugins need to append additional processing to targets that use
them. This is most commonly needed for static builds to identify
additional plugins that need to be linked, but which cannot be
determined automatically by CMake as part of its transitive
dependency handling. Check for finalizers on directly linked targets
as a way to help automate common scenarios.
Because we need to lookup dependency targets and these may have
visibility limited to the depender target's scope, we now formally
document that finalizers should be called from the same scope as
the one in which the target was created. This was loosely expected
before, but is now made explicit.
Task-number: QTBUG-90819
Task-number: QTBUG-86669
Pick-to: 6.1
Change-Id: I065a3f3a4ab6eeff6a98a655835427949e2fe0f1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The pro2cmake.py conversion script faithfully reproduced the .pro files
for the plugins, which specified the libraries as public. But in CMake,
the implications of this are that public usage requirements should then
be propagated to consumers. We don't expect any consumers, since a
plugin is created as a MODULE library in CMake, so for Windows we don't
even have an import library to link with. The only exception to this is
for static builds where plugins are created as STATIC libraries
instead, but only in certain controlled situations do we then link to
plugins. Even then, usage requirements are not expected to propagate to
the consumers, so these relationships should always be specified as
private.
This change warns on any PUBLIC usage requirements specified for a
plugin. This check is disabled by default to avoid spamming CI builds
for repos that haven't been fixed yet. The check can be enabled by a
CMake cache option, which is intended for developers to use locally
when fixing this issue in other repos (all plugins in qtbase should
not trigger this warning as a result of changes in this commit).
Task-number: QTBUG-90819
Pick-to: 6.1
Change-Id: I09f2c8da77db1193ad3370f85d367dfc6ab7b9a6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
[ChangeLog][Build System] Tools that are called by the build system and
are unlikely to be called by the user are now installed to the libexec
directory.
This is a step towards easier co-installability of different Qt
versions.
Pick-to: 6.1
Task-number: QTBUG-88791
Change-Id: Id19575b5ba27795f7715e4ea6a09391b26dd4942
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Origin patch 359546b069
has following rule:
"the state for processed released points is reset
to zero at the end of the SYN_REPORT handler"
Patch 4e400369c0
changed state according new event refactor, but not fully.
Task-number: QTBUG-86013
Pick-to: 5.15 6.0 6.1
Change-Id: If35b756d5c726533f11d18e7b73c98fffa17d809
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
f92e195369 made sure a new
QAndroidPlatformWindow always has a geometry. However, it did not
take into account HiDPI handling. This patch fixes it and introduces
proper HiDPI handling.
Pick-to: 5.15 6.0 6.1
Fixes: QTBUG-91161
Change-Id: Iddf31b7abfd0a1bada3b051ed4de3bf6c2897d8e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QSplitterPrivate::getRange might return early, and then the variables
will contain garbage.
Fixes warning from clang static analyzer.
Pick-to: 6.1
Change-Id: I0081ad9847f158da4440b945ba2db7e7f5d4780b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This will ensure that the QKeyEvent also has this information passed on
as appropriate.
Pick-to: 6.1
Change-Id: I52436404115b453664b9b3414f8ec4e715dd6a28
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This patch also adds 'isValid()' to know if a backend from a plugin
is in working condition (say, there is 'openssl' plugin but no or
old openssl libraries in some system).
Task-number: QTBUG-65922
Change-Id: I0b846536a069ca8c5a94e7191f11c81bac6ad527
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 573ba145d76f239dbc7464a78aabc06ed4d00419)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Document the isSectionDragTarget variable, and add \inmodule command.
Put code and documentation together.
Amends 4c6579eacd.
Pick-to: 6.1
Change-Id: Id8837ca75cd6af13c8dc4c028b304b279e507ade
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
When pressing the clear button, the editingFinished() signal was not
received when focussing out.
Call _q_textEdited(QString()) when pressing the clear button.
Pick-to: 5.15 6.0
Fixes: QTBUG-83295
Change-Id: Ie4bc6d9a2f27f89163c05c4c15175540c7631a30
Reviewed-by: Liang Qi <liang.qi@qt.io>
We haven't used the spawn functionality on QNX since Qt 5.7 (commit
005a8bfbf0) because that's when we dropped
support for QNX 6.5.0.
Change-Id: Ic90d8429a0eb4837971dfffd1664f9712bdce2d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Use a structure that will automatically close them for us. This doesn't
apply to startProcess() because the pipes there are long-lived (though
each of them in QProcessPrivate could be an AutoPipe...).
The destructor only runs in the parent process, so the child processes
don't need to worry about setting file descriptors to -1.
Pick-to: 6.1
Change-Id: Ic90d8429a0eb4837971dfffd1664ed98f3d74d1c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
This is unnecessary because we can only get SIGPIPE if the reading end
of the pipe is closed. And that can only happen if the parent process
has exited, meaning there's no one to read our message anyway.
Change-Id: Ic90d8429a0eb4837971dfffd1664ec6821993ada
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
This should have been SIG_DFL, as we're about to execute a child
process. It's the child's responsibility to ignore SIGPIPE if it wants
to, or get killed by it when it writes to an pipe with no readers.
Qt itself does this for its own purposes (see qt_ignore_sigpipe() [until
I can get some time to teach Linux about O_NOSIGPIPE]). Therefore, we
ought to reset what we've done.
Change-Id: Ic90d8429a0eb4837971dfffd166585a686790dde
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
And set *pid to -1.
[ChangeLog][QtCore][QProcess] If a startDetached() fails to start the
target application, the QProcess object should now have a proper error
string in errorString().
Pick-to: 6.1
Change-Id: Ic90d8429a0eb4837971dfffd1664e825ffcb923e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
QAndroidApplication provides the Android specific app context() and
isActivityContext() to determine whether the context is an Activity or
otherwise a Service.
Task-number: QTBUG-90499
Change-Id: Iae2eef7ec44859a89825b09f52f09506b20b5420
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
4d94384612 introduced a new data member to
QStyleOptionHeader, and reduced the size of the orientation member.
This changed the binary layout of class instances, and breaks ABI.
180c662b07 added another member within
the new bitfield.
Introduce a new QStyleOptionHeaderV2 class instead with the new members,
and use that in QHeaderView, and the styles using the new members.
Fixes: QTBUG-91224
Pick-to: 6.1
Change-Id: I47e6841e6652e4b67f247b7b4514e90be5609156
Reviewed-by: David Faure <david.faure@kdab.com>
QAbstractFileIconEngine implements the QIconEngine interface
and creates a new interface where subclasses override the
filePixmap() function.
QIconEngine subclasses must now also override scaledPixmap();
add implementation which forwards to filePixmap().
(The intermediate implementation in QPixmapIconEngine is not
used by QAbstractFileIconEngine.)
Pick-to: 6.1
Task-number: QTBUG-91104
Change-Id: I229e3a003ad0c3fff768eac7e75c59fe7145fcaa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Such windows are typically used as mostly transparent overlays on top
of other windows underneath. Letting such an overlay become the key
window breaks cursor updates and focus handling.
Pick-to: 6.0 6.1 5.15
Fixes: QTBUG-83632
Change-Id: I192d419a5bdb8dfa0e9223e9fbbd7876c62fe743
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The idea is to have QSslKey(Private) backend-neutral and hide
all library-specific code inside plugins.
Fixes: QTBUG-90953
Task-number: QTBUG-65922
Change-Id: I2eeee3b2b72c78c2e24f2fb914abce3caa913be8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 0352cf8e1bf57615b9faf3f6f383896444e762ac)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Enumerators initially were to be flags, but this changed later, no
initialisers needed now.
Change-Id: I72b24f979e207e21d6f42a11cf0ae8887df473d3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b6778832636fc8f6911eb30bc9767ea6caaf6642)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>