Gets rid of mismatch warnings when looking for various
ECM packages like XCB.
Change-Id: I0bf4db993195993df7789c032454b7883e8efd35
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Don't do any of the MSVC-related instructions when targeting MinGW.
Make sure to pass gcc and g++ as compilers when targeting MinGW.
Don't use any ENV_PREFIX that sets up the MSVC environment.
Task-number: QTBUG-75578
Change-Id: Icf5c39b58391d473d914fe8dc17d062812b07df1
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Enable sse2 and fpmath for modules when appropriate, the logic
is a port of the code in mkspecs/features/qt_module.prf.
Fix qdrawhelper.cpp to always be compiled when using GCC with a
special case. pro2cmake.py failed to handle the source subtraction
correctly.
Fixes: QTBUG-83791
Task-number: QTBUG-75578
Change-Id: Ibe32a250b266d580ad21f6c55f09fd03a14ceb82
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
This will help us get rid of an extremely ugly hack in
QTextStream, where we copy the state.
Change-Id: If3e15eeb4e35c8607be54dd11c09ddfed87a4d93
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
99.5% of all XML documents in the world are encoded in utf-8, not in
latin1.
Also fix the tr() methods to use fromUtf8() in line with the Qt6
policy that source code should be in utf8.
Change-Id: Ie8744786185de839bfa5c9853b7bc36e36af293a
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Firebird supports utf8 properly since version 2.0
(released some time before 2012), so force the client
encoding to it, and remove the QTextCodec related code.
Remove pre Firebird 2.0 code paths at the same time
and add an assertion to test that we have recent enough
client APIs.
Change-Id: I4c23e23f2fb1b4f550eaca63c47587fe9aaf3a6d
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
The code was already trying to set the client charset to utf8. Enforce
this further and issue a warning if it fails.
Remove the text codec dependencies and directly use to/fromUtf8().
Change-Id: Ib75e46aaf0d1a274f6832b19eb38623a5cae5eb3
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
We don't rely on a latin1 locale anymore for the test,
and the other code was not doing anything.
Change-Id: I08bc08d200c9e037884d8b680dfbb24c129f3d2e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Don't use QTextStream to write a QString to a file in UTF-8.
This can be done more easily, by directly converting the
QString to utf-8 and calling write on the io device.
Change-Id: I4b617b342ab339affb396ed49c5a920985d1ddfd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Using a QTextStream to write the file is probably around
50 times slower than simply creating the required string
here and writing it.
Change-Id: Ia848e4ad2688f098c671938d7ad9aaa4764a4158
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
For some reason, snapd doesn't allow dbus activating of xdg-desktop-portal and returns AccessDenied to any request. Qt checks the returned error and if it is not ServiceUnknown, Qt doesn't try to open URL through xdg-open, which encounters into situation that URLs doesn't open until some other app tries to access xdg-desktop-portal.
Fixes: QTBUG-83837
Change-Id: I9e600f734401bd4295d97e2b5686b916c6c7f762
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... and update handling of CLASS_NAME in qt_internal_add_plugin
Change-Id: Iec8e5f9f80df02c9ba21648535872988839f4b64
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
And create one for QtBase at the same time.
Fixes: QTBUG-83835
Change-Id: Icc6b022165a57bd4e22c23bdb0016522b99a5b80
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We must move the functor properly into the binding object, otherwise we
end up with stale pointers as pointed out by ASAN.
Change-Id: Icd84f4c113dd48e1e3e2d744abac0902cdf9339e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
... by using the [[no_unique_address]] attribute, if available, instead
of the union.
Change-Id: Iab4db7039f1140a0005c7dd2fb6e08597ceec8f5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The API reduces the amount of manual plumbing required to offer a
conceptual property through the traditional setter/getter API as well as
through QProperty<T> API. Since the latter would require inlining the
type and thus making it impossible to add new properties without
breaking binary compatibility, this patch introduces a fake API that
behaves similar but does not contain the property by value.
Change-Id: Ib9bccd867f0e4e36a520e5583ba348e728284253
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Recently the moc learned that Q_PROPERTY(int x ...) can mean that "x" is
implemented as QProperty and then allows installing bindings, etc. -
this works by scanning the same class' members.
For our own use of QProperty, we need to place the QProperty member
itself into the d-pointer to be able to maintain the ability to add new
properties without breaking binary compatibility. That however means
that moc can't know that a certain property is backed by QProperty - we
don't scan the members of the private class.
As a workaround, this change enables the syntax where the property type
used in Q_PRIVATE_PROPERTY may be wrapped with QProperty<T>.
In addition this patch fixes the compilation of such declared properties
by ensuring the accessor prefix (t->$accessor) is applied also for the
QProperty related meta call variants.
Change-Id: I8fbdc49319048b57f4eb0b65b56daba0459e9598
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QNetworkConnectionMonitor::start was previously called after checking
d->networkAccessible, unfortunately that means if the network was
unavailable when QNetworkConnectionMonitor was created we don't
subscribe to updates or recheck the status (unless
QNetworkAccessManager::networkAccessible() is called).
Move the call to start to before the offline check. Also update the
Windows backend so that it updates networkAccessible on the call to
start()
Pick-to: 5.15
Change-Id: I37647f19f703947143e7cbdafe09619ce0d98cc1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Otherwise the helper-lib pri file will be unusable when installed.
Change-Id: Id79a61e6ca9bb1b32c82ee158fd18f51319c484e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Traditionally, these make targets generated HTMLs
and QCH only. This change fixes the dependency for
these targets to ensure that behavior.
Fixes: QTBUG-83877
Change-Id: Ic7c8afe5853d33fc4cc4cfd996f87e5f65df31ed
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Instantiated objects are typically passed as an out-parameter to
QJsonDocument::fromJson, but that might only happen conditionally (as in
the jsonconverter example).
Change-Id: I8d4719958b79b656070f085c58559bd97ac4bda2
Fixes: QTBUG-83880
Coverity-Id: 263796
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Attempting to resolve a multisample image into a non-multisample one
is only valid when the formats are the same, as per Vulkan spec and D3D
docs.
With Vulkan, this is sometimes not fatal, some implementations can
apparently deal with some format combinations, so the problem may not be
trivial to catch, although with validation layer enabled a warning is
shown at least. To make it easier to discover, have our own warning.
Task-number: QTBUG-83707
Change-Id: I8fc87471de91cd65a445fbe8cedbf31a8295db53
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
It broke configuration of qtwayland standalone tests, due to qtwayland
doing 3 separate qt_find_package(Wayland) calls with the same package
but different arguments in 3 different directory scopes.
The top scope didn't have PROVIDED_TARGETS argument. The rest of the
scopes did have the arguments with either Server or Client, but because
of the debug behavior above being enabled by default the dependencies
weren't registered in the Qt6WaylandClientDependencies.cmake file (and
the server equivalent).
The registration didn't happen due to the skipping logic, when a package
is found and the targets already exist.
This led to standalone tests failing to configure because they tried
linking against non-existent Wayland::Client and Wayland::Server
targets.
This reverts commit dd7e40b108.
Change-Id: I60e358a4891b84ecec0e127d9de8ab9747a6ab24
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
The linker doesn't have a -rdynamic option. Otherwise the build
fails with
g++.exe error unrecognized command line option '-rdynamic'
Task-number: QTBUG-75578
Change-Id: Ie89a19fd25e90bef14e64d1d98fd973fa0315997
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Previously configuration of standalone tests might have failed
due to CMake trying to create files in the /usr/local default
prefix.
Make sure to use a fake prefix in the binary dir instead,
unless another prefix is explicitly specified.
Change-Id: Icfcb32285aa5596abf1a918396b26673880a8d27
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
They were masked by all QChar ctors being made explicit, except the
char16_t one, which was left as the only viable choice.
Change-Id: I5632795f3c7dd1de3830285d5446d9b994613466
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They leaked through since QChar(char) was explicit and therefore
QChar(char16_t) was the only viable constructor left once we made
all non-character-type QChar ctors explicit, too.
Change-Id: I6d774fc4b0d3b7eb480bdb93afd17c2ee9260b1c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of manipulating a QByteArray, do it with a QLatin1String,
which is free. Also, don't prepend a dot to force matches at label
boundaries, check that there's a dot where the match occurred. Saves
two allocations per iteration. Finally, pull the query's
peerHostName() initialization out of the loop - it doesn't depend on
the loop variable.
Change-Id: I6dfdae711f0bd8941af69bfbcfda7873a40e4b80
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Allows continuing seamless conversion to QChar, unlike ushort, which
is being made explicit or deprecated, or removed.
Change-Id: I95480b013b5fbc95a2b45f860a01f24e6a97e5c8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They were masked by all QChar ctors being made explicit, except the
char16_t one, which was left as the only viable choice.
Change-Id: I210d50dc243391ad2c7dd353ba9ae40147585d04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
They were masked by all QChar ctors being made explicit, except the char16_t one,
which was left as the only viable choice.
Change-Id: I7288e6ae32b2771859a61c0b99783209d47616bc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
They were masked by all QChar ctors being made explicit, except the
char16_t one, which was left as the only viable choice.
Change-Id: I343269b61d555c259b5780011e99f85f5375ef78
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Otherwise, the focusOutEvent to e.g. a QQuickItem losting focus will
be OtherFocusReason when the window it's becomes inactive.
Task-number: QTBUG-70319
Change-Id: Ic3762e68d92a88becd2b35612b14f6af64ee934e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
CMake IMPORTED targets should be namespaced so that CMake knows that
the name refers to a target and not a file.
Use the existing WrapXXX naming scheme where applicable.
Fixes: QTBUG-83773
Change-Id: I5b0b722c811200c56c260c69e76940a625228769
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add a SKIP_AUTOMOC argument to qt_add_3rdparty_library and use it in
BundledHarfbuzz.
Change-Id: Ie4aa61639a5ab64f286ac539989572a9ae6bc3d5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The virtual inheritance causes the issue, when adding
new, non-default constructor to the base ThreadEngineBase
class. It looks like classes derived from it can't
use the non-default constructor, even when it's called
explicilty from the subclass. Instead, the default constructor of the
ThreadEngineBase class is always required during compilation
and called on runtime.
In addition, the only sensible use of the virtual inheritance
is the multiple inheritance, but apparently it looks like
there is no single class in Qt which would multi inherit from
the ThreadEngineBase class, so this change shouldn't have any bad
side effects. This justifies the current lack of info on why it
was introduced originally ages ago.
Change-Id: I08266e6f6865d938d1b1e4243ef94d2c02c3a886
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Also removed add_subdirectory calls for subdirs which no longer exist.
Change-Id: I759f408ca812e1721dde495b0e23feffdeeb9c60
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Also add the missing examples/widgets/gallery project.
Change-Id: Iec3d61881065cf93d90f9fd3da928ffcd4f0c0aa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>