It's harmless and enables the pointer-idiomatic assignment of nullptr
without having to resort to reset().
Found in API-Review.
Change-Id: Id3a02f55b3578a29943f729d8d734fc3b1d3af11
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 62d3b3c680ed2c6ca417f30fb3ca57482339c2c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
syscall(2) returns long, not int. Says Clang:
qfutex_linux_p.h:48:18: error:
implicit conversion loses integer precision: 'long' to 'int'
[-Werror,-Wshorten-64-to-32]
int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Don't truncate to int in _q_futex(), pass it as long into the few
callers that care about the result.
Amends the start of the public history, but not picking back all the
way because the code moved around a lot. In 6.7 it found its current
place.
Pick-to: 6.7
Task-number: QTBUG-103528
Task-number: QTBUG-126219
Change-Id: I54ccaf5564bcaf38f05fab153b1b32379a66a178
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 962539d12b5584e28d32dbc8c6d61a509128d910)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When 2cf66d49ef removed support for
c++14, it incorrectly also removed support for explicitly setting the
default, C++17. This broke build scripts for no good reason, and made
it impossible to undo an earlier -c++std c++20 again.
Accept C++17 and C++1z again, as an explicit disabler for C++20 and
C++23 features.
Amends 2cf66d49ef.
Fixes: QTBUG-125015
Change-Id: I99b80cd5f41fa5a23259630eae85ef807982f526
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 68e6406623afe5aaaa79e116cbd6b07e8f295e8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
5b7422f74d fixed falling back to CF_DIB
when CF_DIBV5 is not provided, but the way the logic was written
depended on that typo to load synthesized CF_DIBV5. This change restores
that functionality and simplifies the logic.
Pick-to: 6.7 6.7.2 6.5
Change-Id: Icffbe8d969a47b5337701e13b35ce426e4d32166
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 5eb7141788ae3c0051b9f9c49870c88e209e71b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Implement them out-of-line in removed_api.cpp to call the GLsizeiptr
overloads explicitly.
Change-Id: I7a4b937c2c6f444f2dc8e874ab9e07ddd52437e9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 756e4d463610c27818a86aa5a063f6dbdd623f57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After recent changes to widgets and backingstores, attempting to run
any widget-based application with eglfs resulted in a crash. The
backingstore implementation used here was not fully migrated. Update
flush() to create the rendering infrastructure if needed, and make it
call into rhiFlush().
Amends eb4cb71925
Change-Id: I253c37200f5a902a0e61b62581ac456549f3aeba
Fixes: QTBUG-126221
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0a10d23c4a49dd14a1ded41b7cc6921909b0ee7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Test the setHeaders method and the option of manually setting the mime
type.
Task-number: QTBUG-114647
Change-Id: I86644b243830259156e60239adf370e5894450dc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 132498a69a626be6feaf1855cf63dd79d1ac9445)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This change adds a new -sbom configure option to allow generating and
installing an SPDX v2.3 SBOM file when building a qt repo.
The -sbom-dir option can be used to configure the location where
each repo sbom file will be installed.
By default it is installed into
$prefix/$archdatadir/sbom/$sbom_lower_project_name.sdpx
which is basically ~/Qt/sbom/qtbase-6.8.0.spdx
The file is installed as part of the default installation rules, but
it can also be installed manually using the "sbom" installation
component, or "sbom_$lower_project_name" in a top-level build. For
example: cmake install . --component sbom_qtbase
CMake 3.19+ is needed to read the qt_attribution.json files for
copyrights, license info, etc. When using an older cmake version,
configuration will error out. It is possible to opt into using an
older cmake version, but the generated sbom will lack all the
attribution file information.
Using an older cmake version is untested and not officially supported.
Implementation notes.
The bulk of the implementation is split into 4 new files:
- QtPublicSbomHelpers.cmake - for Qt-specific collecting, processing
and dispatching the generation of various pieces of the SBOM document
e.g. a SDPX package associated with a target like Core, a SDPX
file entry for each target binary file (per-config shared library,
archive, executable, etc)
- QtPublicSbomGenerationHelpers.cmake - for non-Qt specific
implementation of SPDX generation. This also has some code that was
taken from the cmake-sbom 3rd party project, so it is dual licensed
under the usual Qt build system BSD license, as well as the MIT
license of the 3rd party project
- QtPublicGitHelpers.cmake - for git related features, mainly to embed
queried hashes or tags into version strings, is dual-licensed for
the same reasons as QtPublicSbomGenerationHelpers.cmake
- QtSbomHelpers.cmake - Qt-specific functions that just forward
arguments to the public functions. These are meant to be used in our
Qt CMakeLists.txt instead of the public _qt_internal_add_sbom ones
for naming consistency. These function would mostly be used to
annotate 3rd party libraries with sbom info and to add sbom info
for unusual target setups (like the Bootstrap library), because most
of the handling is already done automatically via
qt_internal_add_module/plugin/etc.
The files are put into Public cmake files, with the future hope of
making this available to user projects in some capacity.
The distinction of Qt-specific and non-Qt specific code might blur a
bit, and thus the separation across files might not always be
consistent, but it was best effort.
The main purpose of the code is to collect various information about
targets and their relationships and generate equivalent SPDX info.
Collection is currently done for the following targets: Qt modules,
plugins, apps, tools, system libraries, bundled 3rd party libraries
and partial 3rd party sources compiled directly as part of Qt targets.
Each target has an equivalent SPDX package generated with information
like version, license, copyright, CPE (common vulnerability
identifier), files that belong to the package, and relationships on
other SPDX packages (associated cmake targets), mostly gathered from
direct linking dependencies.
Each package might also contain files, e.g. libQt6Core.so for the Core
target. Each file also has info like license id, copyrights, but also
the list of source files that were used to generate the file and a
sha1 checksum.
SPDX documents can also refer to packages in other SPDX documents, and
those are referred to via external document references. This is the
case when building qtdeclarative and we refer to Core.
For qt provided targets, we have complete information regarding
licenses, and copyrights.
For bundled 3rd party libraries, we should also have most information,
which is usually parsed from the
src/3rdparty/libfoo/qt_attribution.json files.
If there are multiple attribution files, or if the files have multiple
entries, we create a separate SBOM package for each of those entries,
because each might have a separate copyright or version, and an sbom
package can have only one version (although many copyrights).
For system libraries we usually lack the information because we don't
have attribution files for Find scripts. So the info needs to be
manually annotated via arguments to the sbom function calls, or the
FindFoo.cmake scripts expose that information in some form and we
can query it.
There are also corner cases like 3rdparty sources being directly
included in a Qt library, like the m4dc files for Gui, or PCRE2 for
Bootstrap.
Or QtWebEngine libraries (either Qt bundled or Chromium bundled or
system libraries) which get linked in by GN instead of CMake, so there
are no direct targets for them.
The information for these need to be annotated manually as well.
There is also a distinction to be made for static Qt builds (or any
static Qt library in a shared build), where the system libraries found
during the Qt build might not be the same that are linked into the
final user application or library.
The actual generation of the SBOM is done by file(GENERATE)-ing one
.cmake file for each target, file, external ref, etc, which will be
included in a top-level cmake script.
The top-level cmake script will run through each included file, to
append to a "staging" spdx file, which will then be used in a
configure_file() call to replace some final
variables, like embedding a file checksum.
There are install rules to generate a complete SBOM during
installation, and an optional 'sbom' custom target that allows
building an incomplete SBOM during the build step.
The build target is just for convenience and faster development
iteration time. It is incomplete because it is missing the installed
file SHA1 checksums and the document verification code (the sha1 of
all sha1s). We can't compute those during the build before the files
are actually installed.
A complete SBOM can only be achieved at installation time. The install
script will include all the generated helper files, but also set some
additional variables to ensure checksumming happens, and also handle
multi-config installation, among other small things.
For multi-config builds, CMake doesn't offer a way to run code after
all configs are installed, because they might not always be installed,
someone might choose to install just Release.
To handle that, we rely on ninja installing each config sequentially
(because ninja places the install rules into the 'console' pool which
runs one task at a time).
For each installed config we create a config-specific marker file.
Once all marker files are present, whichever config ends up being
installed as the last one, we run the sbom generation once, and then
delete all marker files.
There are a few internal variables that can be set during
configuration to enable various checks (and other features) on the
generated spdx files:
- QT_INTERNAL_SBOM_VERIFY
- QT_INTERNAL_SBOM_AUDIT
- QT_INTERNAL_SBOM_AUDIT_NO_ERROR
- QT_INTERNAL_SBOM_GENERATE_JSON
- QT_INTERNAL_SBOM_SHOW_TABLE
- QT_INTERNAL_SBOM_DEFAULT_CHECKS
These use 3rd party python tools, so they are not enabled by default.
If enabled, they run at installation time after the sbom is installed.
We will hopefully enable them in CI.
Overall, the code is still a bit messy in a few places, due to time
constraints, but can be improved later.
Some possible TODOs for the future:
- Do we need to handle 3rd party libs linked into a Qt static library
in a Qt shared build, where the Qt static lib is not installed, but
linked into a Qt shared library, somehow specially?
We can record a package for it, but we can't
create a spdx file record for it (and associated source
relationships) because we don't install the file, and spdx requires
the file to be installed and checksummed. Perhaps we can consider
adding some free-form text snippet to the package itself?
- Do we want to add parsing of .cpp source files for Copyrights, to
embed them into the packages? This will likely slow down
configuration quite a bit.
- Currently sbom info attached to WrapFoo packages in one repo is
not exported / available in other repos. E.g. If we annotate
WrapZLIB in qtbase with CPE_VENDOR zlib, this info will not be
available when looking up WrapZLIB in qtimageformats.
This is because they are IMPORTED libraries, and are not
exported. We might want to record this info in the future.
[ChangeLog][Build System] A new -sbom configure option can be used
to generate and install a SPDX SBOM (Software Bill of Materials) file
for each built Qt repository.
Task-number: QTBUG-122899
Change-Id: I9c730a6bbc47e02ce1836fccf00a14ec8eb1a5f4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 37a5e001277db9e1392a242171ab2b88cb6c3049)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QUtf8StringView is not a class, but just one of the template
specializations, so use the actual template.
Amends fff6562f8c.
Found in API Review.
Change-Id: I8e28704382765e85096885787172a38ea0f1f23b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit bd581e35e7485cf42fbefd250be7b146737d9d41)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QtFindWrapHelper.cmake file retrieves the version of the
underlying system package version or bundled package version, and
passes that to find_package_handle_standard_args to show which version
was found.
But it did not set a ${PACKAGE_NAME}_VERSION variable, which means
we didn't record the version in qt_find_package, and thus in the final
SBOM.
Make sure we set the variable.
Amends 7ad8c347feb5e336c3833d6d3ac021a0a14b714a
Change-Id: Ia0d5b895de36017949e6607d17093459dca302b3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 0be79f14865c0a19fde0abad7d1722f0bac3b7c2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the variable name but not the unwrapped value.
Pick-to: 6.7 6.5
Change-Id: Ie392a4875fe412b8eb273a457a83cd08cd9f5e15
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e960fb136e77437e158367f86bc926504e0fdab6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The behavior that argument was enabling is the default one now.
Task-number: QTBUG-90492
Change-Id: I11711d4c794f0b22169abb595b8ffad2eeb1300d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 1ef3bd05eb45d53cdcf92b933603b995283b3432)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QtWindow is not at 0,0 of its parent, not mapping the position
leads to offsets in the touched position in Android vs where it is
received in Qt, e.g. needing to touch below a button's actual
position to trigger a click.
Task-number: QTBUG-126178
Pick-to: 6.7
Change-Id: Icd62ed59f0f323ba3977145c3304e4e874aa4fa2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 15674f4ce9ea455b47f68d8871d5676d7a731630)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't move them around during deprecation.
Change-Id: I647fec5a440ea063463dc285def5d793726a9e61
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 70475a652a9a44651c25126f6615770e8b43ca1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
From and to algorithms were accidentally reversed before submitting
final patch.
Change-Id: I16e0afda26b77047facf4f65065224c8f3dce6c6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 1b1f613b56fce643a7565e9280acc90e171caf7c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This enables doing QtGui testing when using QAbstractItemModelTester
in Qt for Python, where the QTestlib binding only links against
QtCore.
Port the code to check against QMetaType constructed from type names.
Task-number: PYSIDE-2772
Change-Id: Ifcd8f1ea4758459d8a178226e3f215e5c2b273b8
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit bb542a55b28dd591709ed2c68e4505ec08fc62b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Delay-load the icon within QPixmapEngine::addFile() when no size is
given and the format supports it (e.g. png) - this speeds up QIcon
creation as the whole image is parsed later.
Fixes: QTBUG-59621
Change-Id: If165ca97c4b91f68a7d98f57de711390de060012
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a843db6e2d80a99be38c2b66aac92cb912613bd6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a note to all functions now taking a QAnyStringView that their
signature changed from QString to QAnyStringView
Change-Id: Ib9743b5b2c437724c6308e74ef3c5820136a34f5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a736a3c670929e3b73e11b33cc1705957c42961b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Pointer handling API was added in Windows 8. As we no longer support
Windows 7, we can make mouse handling code easier to read/maintain be
removing the legacy implementation.
[ChangeLog][Windows] Legacy mouse handling has been removed. It is no
longer possible to enforce legacy mouse handling by passing
"-nowmpointer".
Change-Id: I58387471999a371fd20c644abbcf855e192d220b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 3a38de71da13103fbe5bdf6b822263e282e68368)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the Activity restart path is run while m_layout is null,
it would lead to a NullPointerException when trying to
access m_layout. Moreover, the code here doesn't make sense,
as m_layout.getParent() should probably be only done when
super.updateActivityAfterRestart() returns true because if
it returns false, the app will be restarted anyway.
Testing the restarting behavior of the Activity, it seems
that the code code doesn't really work in bringing the app
to a usable state after an activity restart, and this code
path should be re-evaluated. Thus, I'm simplifying the logic
to only restart the whole app, and later figure out a way to
do a proper smooth transition instead.
Fixes: QTBUG-124786
Pick-to: 6.7
Change-Id: I79f0c53c815bf71c831d0b930f358c9fd820a2d4
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 7602f71aa6cd10ff1b16d154fa967c8fce8e8d0a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is safer against slicing and more explicit, ie. doesn't leave
readers of the code wondering whether the JObject move SMFs are
actually working or call something else, because the JObjectBase move
SMFs are disabled due to the protected dtor.
Change-Id: I5c94c95c2e2b807a8ea3bfbcc2b80b390b2bd837
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 51c5259fe9c5f5e41a22622830f1ca532f989685)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Consider a feature that has ENABLE and CONDITION expressions. For
example, system-libb2 on a Linux machine that does not have the
libb2-dev package installed:
qt_feature("system-libb2" PRIVATE
LABEL "Using system libb2"
CONDITION Libb2_FOUND
ENABLE INPUT_libb2 STREQUAL 'system'
DISABLE INPUT_libb2 STREQUAL 'no' OR INPUT_libb2 STREQUAL 'qt'
)
If the feature is enabled by the user by setting
FEATURE_system_libb2=ON, then there's an error:
Feature "system_libb2": Forcing to "ON" breaks its condition...
This is expected.
If the feature is enabled by the user by triggering the ENABLE condition
via the -system-libb2 configure flag (that sets INPUT_libb2 to
"system"), we did not get an error message.
This was unexpected and inconsistent.
Now, we consider features that are enabled via their ENABLE condition as
set by the user and yield an error if the CONDITION doesn't match.
Fixes: QTBUG-126144
Change-Id: I249baf9ab4f434f5a96894f4ec055f70859ffca9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit ad227368c3ab3a9dc68208bce2d075edefe7e6e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test checks if paths in /etc and /home are properly completed.
/etc and /home do not exist on VxWorks.
Use /tmp instead.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I6203fabb003a9a81eb4cdb666a972f47a53f06d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 843f8fb043a0812ab01f0a378be1a821f2e1534d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The rationale given for the addition of these functions was that they
are a more efficient way to check these things in public API.
If so, they shouldn't cause compilers to insert exception handling
around their calls, so mark them noexcept.
This is safe, as both conceptually and practically, these functions
should not and cannot fail, so we'll never need to remove noexcept
again.
Found in API-Review.
Amends 7a374c38d2 and
a3d50112e4.
These two commits also lacked each the changelog entry, so adding them
here:
[ChangeLog][QtCore][QThread] Added isMainThread() static member
function.
[ChangeLog][QtCore][QThread] Added isCurrentThread() member function.
Change-Id: Iaf39ce2cc0abd45049bff60b24693e84bf76d9e0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d73a2bf0fb3e0a00691c858645a5a5bb2b55b40a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There was a small mistake in:
d2ae5ef51e3339c11b1c0ed0b09f9d17b9708f53 commit, which caused a
regression in the input method.
While the function parameter name has been changed, the assignment name
has not. This resulted in the values never actually getting updated.
Fixes: QTBUG-125410
Pick-to: 6.7
Change-Id: I8e64e991d02546ddd078fd273f0b57491c63b55c
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 79e00b0b25765b85b112b601fee70184b1efe3c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Extending headersclean_check to private headers has shown that
Q_DECLARE_PUBLIC needs to know the Public class in-size, so a
forward-declaration is not enough. Says Clang:
qfuturewatcher_p.h:31:5: error: static_cast from 'QObject *' to 'QFutureWatcherBase *', which are not related by inheritance, is not allowed
Q_DECLARE_PUBLIC(QFutureWatcherBase)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Amends the start of the public history.
Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I1e132aaa844f5c87d57446e8818280fd141d2b1e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b58d926090620079f602f4f2ce9f17fe7025c962)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Replace code that manually operates on jarray with QJniArray.
The comment about using separate jobject and QJniObject didn't make
sense; we didn't construct the QJniObject via fromLocalRef(), so
allocated a new local reference anyway, in addition to the local
reference returned by GetObjectArrayElement.
The implicit code now creates a QJniObject (-like object;
QtJniTypes::String contains a QJniObject) as well, but it's also
just a temporary. It would be cheaper to iterate over a
QJniArray<jstring>, but only if we then duplicate the code from
QJniObject::toString to not create an intermediate QJniObject.
Change-Id: I9f10541f533dd2fbd2f7ba6fdacc7d79b3ac3ae9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 64127a7a0db657cbc844938f02b623f90cdd78ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit f8359084b9.
Lookup-by-string functions should be all taking QAnyStringView, not be
overloaded on QString/const char*.
Found in API-review.
[ChangeLog][QtCore][QStringEncoder/QStringDecoder] The (name, flags)
constructor now takes QAnyStringView (was: const char*).
Fixes: QTBUG-126108
Change-Id: If68343ce5ec2ff60ce55156f9f2dc2bb6938e07f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d4c4e6b876b948c1a34abdd46cf7f5be1c302137)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These kinds of lookup functions are no-brainers for QAnyStringView.
This is required to replace the QStringEncoder/Decoder constructors
from QString, newly added for 6.8, and found in API review to be
better written using QAnyStringView.
Because this is API-Review-relevant, keep the implementation
pessimized. It's not worse than the code that it replaces (toLatin1()
on an unshared QString performs in-place conversion), and can be
improved later.
Task-number: QTBUG-126108
Change-Id: I4a0d1840d4754670b2e2f20d768ed98f7e1937d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f6c11ac4f20a16d0b2113014e2dac63b95d946ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These kinds of lookup functions are no-brainers for QAnyStringView.
This is required to replace the QStringEncoder/Decoder constructors
from QString, newly added for 6.8, and found in API review to be
better written using QAnyStringView.
Because this is API-Review-relevant, keep the QStringView case
pessimized. It's not worse than the code that it replaces (toLatin1()
on an unshared QString performs in-place conversion), and can be
improved later.
[ChangeLog][QtCore][QStringConverter] The encodingForName() function
now takes QAnyStringView (was: const char*).
Task-number: QTBUG-126108
Change-Id: I02cc53bfbc8f1eebe539816487a10b39e96fac2d
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b3edce58e5aea76d1d84c868f76171c2b40520a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We've had this workaround since Qt 5.4. It's due time we get
rid of it. This commit deprecates it, in preparation for removal.
[ChangeLog][QtCore][QExplicitlySharedDataPointer] Support for
QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST has been
deprecated, and will get removed in a future version of Qt.
Change-Id: I3000ea606b37714542916e105ebd50871dc42935
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0ed039fd134fb8025236847295681f13f1775847)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On macOS, we see unexplained white flashes of the UI when
overriding the scheme in the widget's constructor. This only
happens when running the bundle, but not when running the
executable.
Work around that problem by setting the scheme immediately
after constructing QApplication.
Task-number: QTBUG-126248
Change-Id: I4a5fe467d628fca5e52e1e36f43af8143239c7fa
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 88322f69a20fddedd9c45a1bb25f6c1d2dcf31f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That way, an override through QStyleHints::setColorScheme is
immediately respected by the style.
As a drive-by, make the helper static and inline.
Change-Id: Ia6cde1f5099d9194b25fac812c3184f5a61bf1dc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 4245987f6875d01853053c50d13ecf42b61fc0ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simplify the relevant QJniObject calls to not use callObjectMethod,
but rely on the return type that we have to pass in anyway. Replace
manual loop unwrapping with QtJniArray, and declare the QtNetwork
Java class so that we can use it directly.
This removes the last usage of Q_DECLARE_JNI_TYPE in qtbase.
Change-Id: If872684c8b52bc7789e248cfc3046817c411903c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 909493bae27eeb55c985aa9522a57bc4e60d0893)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the forward argument was meant to be 0, it was not forwarded
because it evaluated to false in if(condition).
To pass it along, instead check for empty strings.
Change-Id: Ia366df147de0c2d333017da43dc0643b56a89e9c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 96abceb64e5dc0570ca7c3419f401cfafe946ba0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QGuiApplicationPrivate::processTouchEvent() sees that the
touch event was not handled, and calls processMouseEvent(), the latter
uses the QEventPoint with pointId 0 regardless of the original
touchpoint ID. Now it updates the persistent QEventPoint from the
original touchpoint so that a double-click event will not be ruled out
because of the timestamp delta or position delta (movement since press)
being too large.
Fixes: QTBUG-125993
Pick-to: 6.7 6.5
Change-Id: I8e9b007818107ac2329454e0ccfb2ac9e506b617
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2a0b907f11b9c0ad46322ba06482861423246d93)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The docs claim that this is the default, but in practice it's not
the case.
Change-Id: I5f6184cbfded2efedbac88023644d3c1e80e9901
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit a05f5457ca033214c1efcf528b85a09a9c758920)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We always create UIView via initWithQIOSWindow, so there is no
need to keep part of the implementation in initWithFrame.
Change-Id: I5311ed78fff3294ed49af70d482449cbf3b8211b
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 29b6674d3f8d1012def9dbcf89521e4773175dc1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test checks if two paths test equal if they are pointing to the same
place, but one of them is not a canonical path.
Example of such paths: /tmp/.. and /
The test assumes that /usr is an existing directory on platforms other
than win, haiku and android.
The reason /usr is used instead of /tmp is that /tmp is a symlink on
macos and that interferes with the test (as described in 0b67ad9d).
However /usr does not exist on VxWorks (unless created by the user).
/tmp can (and is in our CI env) enabled by turning on the
INCLUDE_TMP_DIR component.
Solve the problem by using /tmp instead of /usr on vxworks.
Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I98b0d46d1b879f404c0b5bd655031e7c3f19ba33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 70e2fe2bba71ea0a4d1d1e533c1130c97f77df55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The #if-ery on the removed API's definition still needs to match its
declaration. Spotted by Axivion.
Pick-to: 6.7
Task-number: QTBUG-122619
Change-Id: I4e3dc03291a8fb7fbc01065bce8e5dc58a051166
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 76f82b8f1334d8a377630876ef2d9681c05d7ee8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
From the API review.
Change-Id: I74140a9268670575488ddc3c31b09c84bc83eae0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit df85c6fd9d65abf44ccdcd1d6e6594cab3fc7d65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>