As a drive-by, remove superfluous includes from qnetworkmanagerservice.h
and obey the coding conventions for includes in a few more places.
Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As a drive-by, follow the coding convention when including qobject.h
Change-Id: I73066646d7f03ee0138e70567738e296b2183f63
Reviewed-by: Liang Qi <liang.qi@qt.io>
gcc 10.2 struggles with returning just {} when compiling in release mode
with debug symbols. std::nullopt is also more readable.
Change-Id: Ib050d47e8741ee87bef865dd55ecba622faf25b4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Add a new entry to the Call enum that can be used by dynamic meta
objects to encode their own metaCall variations.
Change-Id: I7890d11924ab99311b6f016ce97d2ab483c26d27
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Connecting to nullptr, or connecting to a non-signal PMF, would result
in a QFuture which would never finish. Catch these cases and handle
them.
Windows+MSVC for some reason fails the test. I can't entirely understand
why, so I've marked it as XFAIL, with QTBUG-101761 to track it.
Change-Id: I314980e7e9b7156d8cddd3b33d5cbf1d0bcd6116
Pick-to: 6.2 6.3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
We want to use configure and qt-configure-module when building in
Coin, rather than pure cmake and qt-cmake.
There are a few benefits:
- CI tests the scripts, making sure we don't introduce regressions
- CI uses the same scripts that we mention in our documentation for
developers to use
- The platform configurations become a bit less verbose and easier to
read due to less shouty-case CMake options
To ensure a more gradual porting, Coin will only use the new
instructions if the 'UseConfigure' feature is set on a platform
configuration in qt5.git. This allows going back to the old
instructions in case if something isn't working properly.
Due the opt-in, we need to support both old and new instructions in
the implementation.
The change strives to remove as much duplicate code as possible,
by moving it into common includes.
The README.md is updated to mention the overview of how the different
environment variables are used.
There are a few important things to point out.
1) Because during the porting we have to allow mixing of the old style
and new style, platform configs have to separate CMake-style options
from configure-style options in different environment variables.
Otherwise the instructions wouldn't be able to create a valid
configure call, where all CMake-style options have to go at the end
after a double dash --.
After all platform configs are ported to the new style, it should be
possible to combine all the options in a single environment variable
if that is desired, but it will require another round of porting to
remove all the '-D' prefixes in CMake-style options, and just use
regular variable assignment which configure supports.
e.g. -DQT_BUILD_EXAMPLES=ON becomes QT_BUILD_EXAMPLES=ON, which can be
mixed in-between configure-style args.
2) Configure is more strict in that it doesn't allow passing
unknown options. Due to that, we can't pass non-qtbase configure
options via NON_QTBASE_CONFIGURE_ARGS. qt-configure-module would
error out in the repos where the configure option is unknown.
Because we don't have a Coin configure variable for each repo,
we circumvent the issue by continuing to pass CMake-style options via
NON_QTBASE_CMAKE_ARGS instead, which does not do validation checks.
In the future, we could introduce a configure flag that disables
the validation checks.
Pick-to: 6.2 6.3
Task-number: QTQAINFRA-4357
Task-number: QTQAINFRA-4815
Change-Id: I72d8ba0b3a543b42982e22ae8d6566c0e885c446
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
This part originates from when the CMake was being introduced and
now things are stable enough that the bug rarely is everywhere.
Pick-to: 6.2 6.3
Task-number: COIN-828
Change-Id: Ifb7b5ce82740f5ae49f712f9666870993ce00b15
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Conditions with the LINK_LANGUAGE genex are not parsed correctly when
generating .pc file. So link options will be added unconditionally.
Amends d1e02c3855
Pick-to: 6.2 6.3
Fixes: QTBUG-101723
Change-Id: Ib837b3f3429d195a469450ef25af9630ad7d15e2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Use VERBATIM option to prepare the correct command line for the
add_custom_command. This especially sensitive when using build
directories with names containing special symbols, that cannot be
handled by shell correctly.
Change-Id: I51d7041cb806411135fd59bf6273c04a3c695443
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QString already has a localeAwareCompare(QStringView, QStringView)
static method. Use it in QStringView::localeAwareCompare(QStringView).
[ChangeLog][QtCore][QStringView] Added
QStringView::localeAwareCompare().
Task-number: QTBUG-98431
Change-Id: Iec3865a5439d9fb653cc1150da21042186bdee98
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
On Wayland, there is no protocol to do it yet.
Task-number: QTBUG-100792
Task-number: QTBUG-101145
Change-Id: Id72625a8161359111a2d0f43f3215e787778ba6b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Remove some kludgy, redundant and never used functionality for setting
project and test case names, as it also hindered overriding those
properties at runtime.
Pick-to: 6.3 6.2
Change-Id: Ibef7d7d0cb5fc1e462752f2ba2db76cc088dbd48
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Instead of using the overly-generic qSwap() monster, use
- qt_ptr_swap() for swapping raw pointers
- member-swap for swapping smart pointers and owning containers
In QtCore, this has proven to give a nice reduction in compile time
for Qt users, cf. b1b0c2970e.
Pick-to: 6.3 6.2
Task-number: QTBUG-97601
Change-Id: I53e031a021031d53a74a712cd0f5e6bb8bf800bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Instead of using the overly-generic qSwap() monster, use
- qt_ptr_swap() for swapping raw pointers
- member-swap for swapping smart pointers
- std::swap() for swapping scalars
In QtCore, this has proven to give a nice reduction in compile time
for Qt users, cf. b1b0c2970e.
Pick-to: 6.3 6.2
Task-number: QTBUG-97601
Change-Id: I26586da1f158fe6b18314abd8cf9bb040bc9cad1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Instead of using the overly-generic qSwap() monster, use
- qt_ptr_swap() for swapping raw pointers
- member-swap for swapping smart pointers and owning containers
- std::swap() for swapping scalars
In QtCore, this has proven to give a nice reduction in compile time
for Qt users, cf. b1b0c2970e.
Pick-to: 6.3 6.2
Task-number: QTBUG-97601
Change-Id: I2cb0dd3cef3a2923e7d08bb9d93c692308797e5b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
In Qt 7 32-bit builds, the ShortData will be larger than the
d-pointer.
So don't swap() the d-pointer, but a) delegate to Data to swap itself
and b) swap the ShortData there, adding a static_assert in the .cpp
file that triggers when the assumption that ShortData is always at
least as large as a pointer is violated.
Found while porting away from overly-generic qSwap(), so done that,
too.
Task-number: QTBUG-97601
Pick-to: 6.3 6.2
Change-Id: I5139da58d99e9491a582ff2cb2f817cd96952044
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We want to pick this change to LTS branches, so we cannot change the
translated string.
Instead of fixing the order of placeholders, use multi-arg, which
performs only a single pass over the input and doesn't suffer from
placeholder injection by interpolation the way .arg() chaining does.
Requires to use QString::number(), though.
Amends 3636325946.
Pick-to: 6.3 6.2 5.15
Change-Id: I6484a052115096c609edfea27dfd36b196efc1b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The compiler doesn't understand understand that the only way ok can be
true is for qstrntoll() to have been executed.
qhash.cpp:158:9: error: ‘seed’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
158 | if (seed) {
| ^~
Help poor GCC by initializing the variable unconditionally.
Amends cc5cc3225d.
Change-Id: Ic8387e0add2291d994f7f4d96c4bc614b2a8aa99
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
INITIAL_MEMORY and PTHREAD_POOL_SIZE are linker flags only
USE_PTHREADS is both linker and compiler arguments.
Also increase default INITIAL_MEMORY
Pick-to: 6.3
Change-Id: Id1998efbf1d6de901f404db7e988f6cafd547a39
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Sprinkle explicit and remove an unnecessary operator in favor
of a named function.
Change-Id: I7e11b3910014827018341fde7d5aba36f9487fc4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These semantics are deprecated and about to be changed.
Drive by, use nullptr instead of 0.
Change-Id: I213bf7d528d2fa312549f9fa49a5533198eddf88
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Connecting to a non-signal should fail, but apparently it doesn't on
Windows+MSVC under certain conditions.
Task-number: QTBUG-101761
Change-Id: I3e014660e4e5b287242e32307f677bb22ab10a39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Installing only pngconf.h is not enough.
This commit amends be2745e478
Pick-to: 6.3
Change-Id: I8de1565434c315c7197d4602a8460ead794176d7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
- The newest GHS compiler versions set the value of has_signaling_NaN to False.
Add compilation and autotest fix for GHS-compiler 2021/2022 releases.
Task-number: QTBUG-99123
Pick-to: 6.2 6.3
Change-Id: I45e5da6759a15c60c17f896e565002cbba8524ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
That is, insert() doesn't overwrite an existing entry, and range
insert inserts the first of equivalent keys' values, not the last.
This allowed this author to optimize the implementation of
makeUnique() to a O(N) algorithm (was: O(N²)). Said optimization would
have been possible with the old semantics, too, but I wrote the
algorithm first and only then noticed the broken insert() behavior is
present on QFlatMap, too, so I decided not to let good code go to
waste and to fix both problems at the same time.
In order to give users a hint of the changed semantics, make the new
API opt-in until Qt 6.5, so Qt 6.4 ships with the both the old and the
new semantics disabled, where they contradict.
Fixes: QTBUG-100092
Change-Id: Ic96d8bfe6bed9068dbe8c0d7171bd8921050fd95
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
It already emits the signal and was merely missing the declaration.
This fixes warnings about depending on non-NOTIFYable properties
when binding to the priority property from QML.
Pick-to: 6.3 6.2
Change-Id: Ia91ae5d00d722bdb2fc1f89671c3e7faab4b129f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Animations in that style depend on the current time, which makes it
impossible to run baseline tests. Introduce a dynamic property that
allows us to set the time that animations use.
This way, tests can turn the animation off, or control which time should
be used.
To keep performance overhead low, check only once whether the dynamic
property is set at all.
Pick-to: 6.3
Change-Id: I9bc57b9867fb0d852e101570eca4c7609e7fe1a8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This makes sure that changes in the debug stream - like nospace() -
do not "leak". Also use the example snippet in QDebugStateSaver
documentation.
Pick-to: 6.2 6.3
Change-Id: I934976d2c7c2335abfec68c763526a5cbb0e6f1e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Add a cmake test that builds a simple widgets application, installs
it, in a shared Qt build deploys the runtime dependencies and then
runs it to confirm that the app works.
With a static Qt, the installation of the runtime dependencies is
skipped, but the app should still run.
The test is expected to pass only when targeting Windows and macOS
(both when using shared and static Qt).
Pick-to: 6.3
Task-number: QTBUG-98545
Change-Id: I41b616e1e1fc463d57c64be9273ed4dc755e9187
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
We shouldn't set CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to BOTH when
cross-building examples without ExternalProjects.
Instead append the $build_tree_prefix to CMAKE_FIND_ROOT_PATH
and $build_tree_prefix/lib/cmake to QT_EXAMPLES_CMAKE_PREFIX_PATH
to circumvent the usual CMake path-rerooting issue.
This ensures that the build-tree Config files are found by the in-tree
find_package calls when cross-building examples.
Pick-to: 6.2 6.3
Task-number: QTBUG-96232
Change-Id: I4e31f0bf3dbfeb4339823fe09addda3ae83f12c3
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
For examples to successfully find not yet installed Config files in a
prefix cross-build, both CMAKE_FIND_ROOT_PATH and CMAKE_PREFIX_PATH
need to be adjusted when toolchain files set
CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to ONLY.
Before this change, we lacked two things.
1) If the chain-loaded toolchain file sets CMAKE_FIND_ROOT_PATH
(instead of appending), then the initial value of CMAKE_FIND_ROOT_PATH
that was passed by ExternalProject's initial cache would be
overridden.
2) The prefixes we passed via QT_EXAMPLES_CMAKE_PREFIX_PATH did not
end in lib/cmake, to work around the path re-rooting problem in CMake.
We can handle both of these points by using
QT_ADDITIONAL_PACKAGES_PREFIX_PATH which was introduced for Conan
usage.
Each value assigned to QT_ADDITIONAL_PACKAGES_PREFIX_PATH
gets prepended to CMAKE_FIND_ROOT_PATH by qt.toolchain.cmake AFTER the
original toolchain file is chain-loaded.
And each value also gets lib/cmake appended and assigned to
both CMAKE_PREFIX_PATH and _qt_additional_packages_prefix_paths (used
by Qt6Config.cmake.in to work with find_package + NO_DEFAULT_PATH).
This is exactly what we need to ensure examples build.
Pick-to: 6.2 6.3
Task-number: QTBUG-96232
Change-Id: I11a52457ff795a6661a3a7b68e823e0615d0ce89
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
We need to hide separator widgets that are unused, otherwise they block
mouse events from the underlying widgets.
Pick-to: 6.2 6.3
Fixes: QTCREATORBUG-24600
Change-Id: I98c6d4860f683a861b89c4cad042bb734f590000
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
left() == INT_MIN or top() == INT_MIN will still underflow
in QRect's ctor, so the check must be more strict
Pick-to: 6.2 6.3
Change-Id: I12ab148934c8c90865ca9247bd8badeedd4a9f45
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
In no particular order:
- use the variable field width feature of QString::asprintf() to
generate the indentation implicitly, instead of fill()ing a
QByteArray with the desired number of spaces
- just default-construct 'flags', don't assign an empty string
- use qUtf16Printable() to avoid funneling UTF-16 data through 8-bit
encodings
- use a C++11 ranged for instead of a counted loop
- remove a pointless isEmpty() guard (the loop won't execute when the
children().isEmpty())
- avoid copying object->children() (returns by cref, so it's also ok
to stuff it directly into the ranged for loop).
Add a test.
Pick-to: 6.3
Change-Id: Ie7314713cb48de7e890cdee0760c0361dd24fd18
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of relying on implicit construction of the d-pointer and then
swapping that with other.d (using overly-generic qSwap(), no less),
simply let the compiler do The Right Thing™ via QArrayDataPointer's
move constructor.
Pick-to: 6.3 6.2
Task-number: QTBUG-97601
Change-Id: I3be30f99f6fb0e17d3550edbe64cbe80880e604a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The libraries linking to QtCore were looking for
__imp_qt_version_tag_6_4 but the exported symbol was
__imp_qt_version_tag_NAMESPACE_6_4 (with the mangled namespace)
Change-Id: Ida7b18bea4b5e7dab9c0efb63279779d1af898cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also remove left-over code paths related to it.
[ChangeLog][QtCore] QElapsedTimer::TickCounter enum is now
deprecated. Qt does not use the Windows API behind this
enum already since Qt 5.9, so it's fair to assume that
any code path relying on the enum is dead code.
Change-Id: I308fe23658835034774e2015a8ee64659102de56
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>