The code introduced by 54d5ca0c27
did not work since the variables parentIndex/numRows
were local to the lambda and the outer code would not wait.
Move the widgets population into the lambda to fix this.
Modernize the remaining code a bit.
Pick-to: 6.4 6.3 6.2
Change-Id: I2a09878987df9edb9ff04f0ac4ad82af1a8b52c8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
There are three characters with diacritics that have been missing from
the mapping table+ I acute, I grave and Y acute. Added those to the
mapping table in QWasmEventTranslator.
Pick-to: 6.4
Change-Id: Iab53e79b84cee39e4a050b05b9eff54f3ad64f6c
Reviewed-by: David Skoland <david.skoland@qt.io>
Add the support of pre-cooked content for the LD version script. The
content can be generated without using the perl script at configure
or build time.
Change-Id: I1316e114a1d5550b2fdcf3482a51f336fb311a29
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add the qt_sync_skip_header_check and qt_sync_stop_processing pragmas
to:
qtbase/src/corelib/global/qsystemdetection.h
qtbase/src/corelib/global/qprocessordetection.h
qtbase/src/corelib/global/qcompilerdetection.h
to avoid checking by synqt. These files were previously blacklisted
in syncqt.profile.
Change-Id: I268a3063e7eafb9a78e9e8d1cb67cd2def490b35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add headersclean_check that allows to run all module-specific
'_headersclean_check' targets in single command. Also add
dependency on input header files for the headers clean custom
commands.
Also adjust the '_headersclean_check' target names to match
the naming of module targets - the 'Qt' prefix is removed.
Change-Id: I17c3442c3c51ce99cd9b38c85d606e9ababbb013
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
[ChangeLog][CMake] The target-based variant of qt6_add_resource gained
the option BIG_RESOURCES. This can be used instead of
qt6_add_big_resources, which is not target-based.
Fixes: QTBUG-100268
Change-Id: Ib3fa783cbfbfd10f59c2f952bc88508a91f25e26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Previously configuration would not error out if you configured Qt
with -DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo;Debug -GNinja
instead you would get an error like
CMake Error at cmake/QtBaseConfigureTests.cmake:51 (message):
Failed to find compiled architecture detection executable at
qtbase/build/config.tests/arch/RelWithDebInfo/architecture_test.exe
Note that Qt code tries to find the arch test in a RelWithDebInfo
directory but due to using single-config Ninja,
CMAKE_CONFIGURATION_TYPES is ignored, and the executable is placed
in a non-config specific folder.
Error out early in such a case, and mention that for multi-config
builds, the Ninja Multi-Config generator should be used.
Pick-to: 6.4
Change-Id: I0192185123be563671cbe154f968a03b7458e327
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The metal profiler reports many redundant state changes of
MTLDepthStencilState which can be reduced by checking if the current
depthStencilState is the same as already set before setting it again.
Pick-to: 6.4
Change-Id: Ie14f0491ad2cb1c3ce13c1cf3992d06561fbb826
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The intialSize bug has been fixed in Qt Wayland Client, and thus
this test will now start XPASSing.
Pick-to: 6.4
Task-number: QTBUG-66818
Change-Id: I4b9cb8bd9306a67f04295eb23f09574dad0e97f7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Use qCWarning instead of qWarning, to give users more control over
debug output if needed.
Fixes: QTBUG-105332
Change-Id: I830dd160f75eb9885d80b80336bfb27da676e4bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This amends commit fc2e40e88d.
For Qt plugins, we do not add 'dlltarget' to INSTALLS but only 'target'.
In this case we must add the .dll.debug file to 'target' like we did
before fc2e40e88d.
Fixes: QTBUG-105374
Pick-to: 5.15 6.2 6.3 6.4
Change-Id: If495548dfca55d02e1c5884e03e281e27ee07ccd
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
All supported CMake versions provide this file, and we did not modify
it.
Pick-to: 6.4
Change-Id: I4b21a99159ba8315491dc64ab737b7e5a28a6966
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
And instead base the isValid function on the success of registering
callbacks.
The registerReceiver call has no way to report failures so I assume it
always succeeds.
Task-number: QTBUG-104188
Change-Id: I2b002f791d03f2ebc72fe5cfa215f8f8a1dabdf8
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The closing parenthesis ends up in the output.
As the fix to QDoc is rather involved, clean up the docs
to fix the symptom.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-105339
Change-Id: I35a1e7615125781d950649213c08e5760b0235e7
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
There was a typo in the used macro name.
This commit amends 0a3ff69738
Pick-to: 6.4
Change-Id: I6b8cb1e3872cb96780af26bfaf722d83d17ba4fe
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Reorder the class declarations, moving private sections last
- Make constructors explicit
- Add space to the comments
- Introduce auto
- Replace slot MainWindow::showWindowTitle() by a direct
connection to slot QWidget::setWindowTitle().
Pick-to: 6.4 6.3
Change-Id: Ic229162434dfef5f2767d0b4e186759ca0f821f3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The meta object is actually uint, even though we end up treating it as
int elsewhere. I've also replaced one flags use with quint32.
That leaves int in this file for meta type IDs only. Replacing them with
QMetaTypeInterface pointers is left as an exercise for the reader.
Task-number: QTBUG-103548
Change-Id: Ie4bb662dcb274440ab8bfffd17096e0f85e4ea5a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Even though the meta object format stores 32-bit integers, which means
we can't have anywhere near 2 billion properties, methods, method
parameters, etc. This suppresses the warning that we may be trying to
allocate a negative amount of data in
qdbusmetaobject.cpp:438:60: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
Task-number: QTBUG-105388
Task-number: QTBUG-103548
Pick-to: 6.2 6.3 6.4
Change-Id: Ie4bb662dcb274440ab8bfffd17096df93614be8e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Also suppresses the warning that we may be trying to allocate -1 items
in call to new[].
Task-number: QTBUG-105388
Task-number: QTBUG-105471
Pick-to: 6.2 6.3 6.4
Change-Id: Ie4bb662dcb274440ab8bfffd17096d3606354647
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This is required to make the header file self-contained from the
syncqt procedure point of view.
Change-Id: Ic32e12bc914c62b907bbc75909d9b4e26994d696
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Fairly minimal for now, just enough to verify a bug and serve as the
sign of success when it's fixed. Tests fail in ways they shouldn't,
for now; see expected_eventloop.* for details, notably "Earlier test
failed to clean up" messages.
Pick-to: 6.4 6.3
Task-number: QTBUG-104441
Change-Id: I59be4aa5f21fed23b19a0593a8c2f6c9956507df
Reviewed-by: Jason McDonald <macadder1@gmail.com>
We need to skip the exifReadComments test case if reading text from
image has been configured off, like in webOS's Yocto recipe for QtBase.
Fixes: QTBUG-105393
Pick-to: 6.4
Change-Id: If45872ca7ed26620fa38bc6b47132363d661acdc
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Mention that the C locale is an exception on group separators.
Rewrite a "It is thus recommended to use" - which is garblage induced
by addiction to passive voice ("We recommend use of ..." would be
better) - to actually say what needs to be said.
Actually say what the standard and scientific notations are, explain
which parts are locale-dependent, \sa some relevant QLocale docs (from
which the other relevant docs are easily reached).
Rephrase the explanations for validate()'s returns. Address validity
of the string before constraints on the value it wouldn't represent if
it weren't valid.
Change-Id: I5e677f00e5146a44eea5b08c5e0146cd235b95b1
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Using convertDoubleTo() to get a whole number, from which to determine
the number of digits we're allowed before the fractional part, fails
if the double isn't a whole number, which lead to the skip being
checked. Use qFloor() of the double (as this should have as many
digits as the double had before its decimal point, which is what we
care about; qCeil() might round up to a power of ten).
This amends commit ff6d2cb0d5
Fixes: QTBUG-105341
Pick-to: 6.4 6.3 6.2
Change-Id: I4e0105d4602682c59e9830ec9a37556c96db884e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change 7f72622c0f caused a regression where the input panel
would not close automatically when the focus object was
cleared. The reason is that it's apparently not enough to
just release the first responder, we also need to
explicitly tell it to release it's first responder status.
Before the failing patch, we did this from within update().
This patch will instead/in addition do an extra check from
inside reset().
Fixes: QTBUG-105323
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I00bdd44fe54db69f44232226291e3c5715935749
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add basic tests for timers and event processing, for
different use cases such as on the main thread, on
a secondary thread, and with asyncify.
Pick-to: 6.4
Change-Id: Ie0f82b5de97f639867b1e65dbb0ab8b11db86f85
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The new name was introduced in 6.4, but the documentation stayed the
same since it was initially written.
Amends 8367be8ede
Pick-to: 6.4
Change-Id: Idb27b551760f0d0cb41220be18a4d87e5875baae
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Matches qt_generate_module_pri_file and allows using genexes in the
content of the file.
Change-Id: I5ee7a973d3e27a721e31315d3ebe2c88ffa1db42
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Adds scrolling to basic layouts example because the user interface in
the example doesn't fit properly on smaller screen sizes.
Fixes: QTCREATORBUG-27634
Pick-to: 6.2 6.3 6.4
Change-Id: I61e6eac2b28e5b3ff0f984894fe38167b3f46a9c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Markku Nokkala <markku.nokkala@qt.io>
The same way qt_generate_module_pri_file does it.
Change-Id: I42047ce7d23e8a289535041ccace8b0f0140ea12
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Allows adding additional properties to the target after the initial
call to qt_internal_add_plugin.
Change-Id: I7998c906e53699ec41b44b51aabbe480ae698b21
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
For non-scalable fonts, we calculate the underline thickness
based on the font size. To make the lines slightly thicker
for bold fonts, we also multiply a fraction of the weight of
the font into it. In Qt 6, however, the weight scale was
multiplied by 10, but the formula was not updated, hence
all underlines for bitmap fonts would be 10x too thick.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-105010
Change-Id: I108baed495048783b14afca6bd4c67dc83816c17
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
If the window is manually exposed and the window is invisible, the result
is blocking the visual sync and repainting of the window, which makes
the window 'dead' from user perspective until they click/activate it,
which again sends an expose event to the window, restoring its updates.
Fixes: QTBUG-105363
Change-Id: Iaa42f3ffeca179b8e6da19c9c02a6f01458ca66a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The vast majority of in-tree users pass simple and short C string
literals as the value. By porting to QByteArrayView, we document that
we'll accept non-NUL-terminated data, and do the NUL-termination
internally, using SSO'ed std::string, saving memory allocations in the
common case of short strings.
I didn't bother to check which direction std::string takes for
nullptrs these days (there was a change accepted in that area for
C++20 or 23), so play it safe and protect against them.
Follow-up to
Task-number: QTBUG-105302
Change-Id: I2369acc62f1d5cbc26135396cfe0602d8c75300c
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
See also QX11EmbedWidget::QX11EmbedWidget() in src/gui/kernel/qx11embed_x11.cpp in qt4.
https: //github.com/qt/qt/blob/4.8/src/gui/kernel/qx11embed_x11.cpp#L475-L477
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I47504a2d8f3e33c367f092d01ee5d7e1b16b5106
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
All linux CI machines have gtk3 installed. And Python GTK things
are too complicate to setup.
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I3c0d967f61aebea508784df79569b9d0064f66e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The logging category lcQpaDockWidgets was explicitly declared in
tst_QDockWidget. That failed to complile on static builds.
This patch replaces the explicit declaration with
Q_DECLARE_EXPORTED_LOGGING_CATEGORY(lcQpaDockWidgets, Q_WIDGETS_EXPORT)
Pick-to: 6.4 6.3 6.2
Change-Id: I1cad0e672313be84297eeddf992f6cafe9a35977
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The previous commit, b0e4d53b63, missed
this one. Same rationale as back then.
Pick-to: 6.4 6.3
Change-Id: Ibad4c130e0d61c64808275fa7b97b58ebd479acc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The old code assumed that a QByteArray's data() is always
NUL-terminated. Due to the conflation of owners and non-owners in
QByteArray (but also in case we ever get efficient substringing), this
is not always the case, e.g. QByteArray::fromRawData() does not ensure
NUL-termination.
From QString::utf16(), we learn that the condition to check for is
QArrayData::isMutable(). After working around the fact that
QByteArray::data_ptr() doesn't exist for const QBAs and that empty
QBAs always refer to QByteArray::empty_, which is !isMutable(), we can
detect this situation and re-allocate without introducing new API.
This is the fix for Qt ≤ 6.4. For Qt 6.5, we'll port the function to
QByteArrayView.
Pick-to: 6.4 6.3 6.2 5.15
Fixes: QTBUG-105302
Change-Id: I3416535ab09d601e0e87b2767f2c024ba1217e64
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Processing shortcut events may result in the window being deleted, so
we need to check if m_platformWindow is still valid before continuing
with the key press event.
Pick-to: 6.4 6.3 6.2 5.15
Fixes: QTBUG-105160
Change-Id: I9cd362873b19c078a4fced3ac3c815d70bfc7fbe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Those operators return a value, not a reference.
Fixes: QTBUG-104940
Pick-to: 5.15 6.2 6.3 6.4
Change-Id: I117892f12d20c6bf32a12f37c1bdfec1817614c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>