Commit Graph

66462 Commits (8414a0aa2c22e2656bccc97600a59c7163d040c2)

Author SHA1 Message Date
Giuseppe D'Angelo 8414a0aa2c Tests: check the output of QFile::open
Wrap the call in QVERIFY.

tst_QTextStream::read0d0d0a was also faulty as it *never* opened
the file because of a broken path. Fix it with QFINDTESTDATA.

Change-Id: I61a8f83beddf098d37fda13cb3bfb4aaa4913fc5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-27 04:24:11 +01:00
Allan Sandfeld Jensen cccda0e62d Fix potentially unaligned 128-bit store/loads
QColorVector is not forced to 128-bit alignment.

Change-Id: Ifacc171296ddddda742d49745372b47585e40802
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-27 02:13:27 +01:00
Allan Sandfeld Jensen d89063646e Add QColorSpace::isValidTarget
To indicate color spaces that can not be used as a target,
but only as a source.

Change-Id: Iae79e3533599c112872d171a2f45178029be89dc
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-27 02:13:27 +01:00
Thiago Macieira 58f93994d9 qHash: fix compilation of SipHash64 on 32-bit: shift >= 32
Amends aadf1d447c because size_t on 32-bit
platforms is 32-bit.

qhash.cpp:331:15: error: left shift count >= width of type [-Werror=shift-count-overflow]

Change-Id: I5f663c2f9f4149af84fefffd17c0567b17f832ce
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-03-26 16:14:55 -07:00
Thiago Macieira facb6f9477 QCborMap: add missing comparator to QCborValueConstRef
And ensure all combination of CBOR types are tested.

Amends e5ebb9022a

Change-Id: I5f663c2f9f4149af84fefffd17c02d352cd41f3f
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-03-26 16:14:55 -07:00
Thiago Macieira a30912b906 QString::arg: apply the Qt 7 Unicode digit semantics to the bootstrap
Change-Id: I01ec3c774d9943adb903fffd17b7ef0a106944ca
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-26 15:14:55 -08:00
David Faure 30225da91f qErrnoWarning: downgrade from critical to warning
The name says it's a warning, it's pretty unexpected that it should
lead to a critical message.

One case where this is a problem is QTBUG-48488
where merely printing with "Microsoft Print To PDF" and canceling
the file dialog leads to "QWin32PrintEngine::begin: StartDoc failed"
as a *critical* message. Some Windows applications have a message
handler that shows a msgbox in case of a critical message,
and getting such a msgbox after canceling the file dialog seems very
wrong.

Task-number: QTBUG-48488
Pick-to: 6.7
Change-Id: I1c842340dd2faf2be6e64e0522f9e2b33547d3cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-27 00:14:02 +01:00
Joerg Bornemann c11beb8d32 configure: Fix -c++std and -sanitize options
This amends commit 110f656da9.

Command line options with a TYPE that denotes a custom command line
argument handler cannot set a feature "foo" anymore by just setting
INPUT_foo to "yes". Instead, they must use the newly introduced
functions qtConfCommandlineEnableFeature and
qtConfCommandlineDisableFeature.

These functions will set INPUT_foo and augment the input with the
information "this input is of boolean type". This information is used
when deciding whether to use this input as feature switch.

Change-Id: I83c691cc57424159148f059c2a1c8cd72e39ee63
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-27 00:14:02 +01:00
Joerg Bornemann e685bfe764 configure: Remove the -W argument
This did nothing since the port to CMake, it's undocumented, and we
didn't receive any complaints about its brokenness.

Use CMAKE_CXX_FLAGS to pass arguments like -Wall to the compiler when
building Qt.

Change-Id: Id9976167013607a88959416f789754186a7ed121
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-27 00:14:02 +01:00
Thiago Macieira 1ebee8980b QPolygonF: delegate QDataStream marshalling to QList
Like the QPolygon code. This fixes a mistake in failing to clear the
list before de-marshalling in operator>>.

Updated most of the QDataStream tests to have data in the objects
they're streaming into, to ensure that the stream overwrites everything.

Fixes: QTBUG-122684
Task-number: QTBUG-122704
Pick-to: 5.15 6.5 6.6 6.7
Change-Id: I01ec3c774d9943adb903fffd17b6920c72f5042b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-26 15:20:31 -07:00
Tatiana Borisova e766735771 QJsonArray iterators: use new comparison helper macros
New comparison macros are used for following classes:
- QJsonArray::iterator
- QJsonArray::const_iterator

Replace public operators operator==(), operator!=(), operator!<(), etc
of classes to friend methods comparesEqual(), compareThreeWay();

Use *_helper methods to have an access to protected members of
QCborValueConstRef class from friend functions.

Task-number: QTBUG-120300
Change-Id: I9b41b619107ce69d8b6dab4938232fab841aab51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-26 23:11:09 +01:00
Giuseppe D'Angelo 3b186ceef8 QDbusTrayIcon: handle open() failure
QDbusTrayIcon has a convoluted workaround/hack that consists in putting
an icon file in /tmp/ and then using that path as the icon. Opening the
icon file may fail, so handle it.

Change-Id: I5d1c681e2fe3cfb23e93fd20f6758d4c83fe1578
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2024-03-26 21:31:53 +00:00
Giuseppe D'Angelo 9d118af92d QTextStream: discard+comment the possibility of file opening failure
The QTextStream(FILE*) constructor may fail to open the filehandle
through QFile (e.g. if the open mode is incompatible). However
QTextStream has no error report mechanism for this and still reports
status Ok. This is consistent for instance with the QIODevice*
constructor, where even passing a closed device sets the status to Ok.
Add a comment and discard the return of open().

Change-Id: I430b96fd26e0ebca15a4d9ee640b09895bdd0b03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-03-26 22:31:53 +01:00
Allan Sandfeld Jensen e2413660f5 Fix 8-bit mAB tables
We had no examples of this type, and didn't catch the table was parsed as
-0.5 to 0.5 instead of 0 to 1.

Change-Id: I904937a50deaeecfc89e271bf918eedc521bc8a2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-26 22:31:53 +01:00
Giuseppe D'Angelo c24dcef97e Remove a duplicated call to QFile::open
File was opened on the previous line.

Change-Id: I418d616a2f82d9241c37224e4c1a0fb12894eb40
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-03-26 20:43:50 +01:00
Marc Mutz 19aeb431cf QMainWindowLayout: rewrite validateToolBarArea() to return by value
Coverity complains that QToolBarAreaLayout's
addToolBarBreak(QInternal::DockPosition) could access
QToolBarAreaLayout::docks out of bounds if passed
QInternal::DockCount.

That is correct, but a valid pos seems to be a precondition for this
function, judging from its sister functions, e.g.
addToolBar(DockPosition, .) or insertItem(DockPosition, .), which also
don't validate `pos`. All in-module callers of addToolBarBreak() only
pass valid positions, and use validateToolBarArea() to ensure that. So
it seems that Coverity doesn't grok the pass-by-in/out -parameter used
by that function. That, or it doesn't track back far enough.

Before attempting more drastic measures, first try rewriting the
function to return-by-value instead, and see what Coverity has to say
afterwards.

As a drive-by, make validateToolBarArea() constexpr.

Pick-to: 6.7 6.6 6.5 6.2 5.15
Coverity-Id: 444141
Coverity-Id: 444135
Change-Id: I5fcc664c3cea608429036cad75c37f5c38059733
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-03-26 11:26:24 +01:00
Shawn Rutledge 0281005a71 QTextMarkdownWriter: escape all backslashes
A literal backslash needs to be doubled so that the parser doesn't treat
it as escaping the following character when the markdown is read back.
In ca4774131b we tried to limit it to
backslashes that were not already escaped. In case someone really needs
a longer series of backslashes, it's more correct to escape them all;
but this comes with the risk that if they do not get un-escaped by the
markdown parser in some scenario, repeated round-trip saving and loading
could multiply them excessively. So we also add a lot of tests to try
to verify that this is safe.

Task-number: QTBUG-96051
Fixes: QTBUG-122083
Pick-to: 6.7
Change-Id: I64f610d24e99f67ebdc30d5ab5c6cf3985aec5ec
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-26 00:47:37 -07:00
Marc Mutz ae8031b5e7 QStorageInfo: fix use-after-move
Coverity complained about a use of the moved-from (in the first line
of the loop) `info` object in subsequent lines.

This specific instance is harmless, because the field being accesssed
is a scalar and the move SMFs are the default ones, so the field isn't
actually changed when the struct is moved from.

Still, to silence Coverity and to guide other attentive readers of the
code, take a copy of the field before moving from the struct, and use
the copy's value after the move.

Amends ddc39eb3a4.
Amends 3e330a79ec.

Pick-to: 6.7
Coverity-Id: 444199
Change-Id: I26ea8669f27124fb2567b16d803d47ab439f1e41
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-25 23:29:33 +01:00
Tatiana Borisova 25652c2819 QJsonObject: use new comparison helper macros
Replace public operators operator==(), operator!=() of
QJsonObject to friend methods comparesEqual().

Use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of current
comparison methods and replace them with a friend.

Add friend method comparesEqual(QJsonObject, QJsonValue)
to the QJsonObject class, to support comparison between QJsonObject
and QJsonValue elements, see test-case valueEquals().

Task-number: QTBUG-120300
Change-Id: Ibab0b4b39966205447e31c41e94e7e1a4e31e553
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-03-25 23:29:31 +01:00
Wladimir Leuschner f5d5a42dc3 QWindowsVistaStyle:Revert polishing of QAbstractScrollArea/QGraphicsView
Revert the polishing for QAbstractScrollArea and QGraphicsView
introduced in a1f12273b2

Fixes: QTBUG-123722
Pick-to: 6.7 6.7.0
Change-Id: I9db9079c672f4bf70ce3401382a5843855df2c4a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-03-25 19:00:36 +00:00
Morten Sørvig 7b018629c3 macdeployqt: wait forever for otool
The QProcess default wait time of 30s may be too short
in e.g. CI environments where processes may be blocked
for a longer time waiting for CPU or IO.

Task-number: QTBUG-117598
Change-Id: I27dbe83ddbe811ae4ff28767de67cb0ceaab267e

Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-25 20:00:36 +01:00
Morten Sørvig 6272dddadd Fix multiscreen menu popup positioning corner case
A QMenuBar may span multiple screens. Its menus will
then open on the screen which the bottom middle of
the action rect is at, and will snap to that screen's
geometry if needed.

However it can happen that the bottomLeft() of the action
rect is on a different screen from the selected popup
screen, in which case mapping this point to global
coordinates can give incorrect coordinates if the screens
have different scale factors.

The x value will be corrected by the screen snapping
if needed. Use the y from the screen test point, which
will be correct for the selected screen.

Task-number: QTBUG-73231
Change-Id: If9a39f6b832a64f2f701868f2be0d3a6468fe553
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-25 19:52:04 +01:00
Frédéric Lefebvre 36e65785ec tst_QWidget::reverseTabOrder remove QApplicationPrivate::setActiveWindo
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Ifd2c5dcd1cc3d13f689ffd6400ffec0fcc3a6b93
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-25 19:16:19 +01:00
Fabian Kosmale def07f6306 VxWorks: Skip fstack-protector-strong
We do not know yet why it fails exactly to link, and what a proper fix
would be. For now, unconditionally disable it so that we can get
submodule updates in again.

Task-number: QTBUG-123715
Change-Id: I832cc8801c7fcb4b0a755aa4ff0bc65d15bf8230
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-25 17:09:11 +01:00
Marc Mutz 7e8196510d QDebug: fix copy-instead-of-move issues
Coverity correctly complains that we're copying the QDebug object when
calling print*Container() when we could have moved it into the helper.

So do move it.

Pick-to: 6.7 6.6 6.5
Coverity-Id: 406803
Coverity-Id: 407406
Coverity-Id: 408523
Coverity-Id: 408562
Coverity-Id: 418431
Coverity-Id: 424788
Coverity-Id: 425106
Coverity-Id: 426537
Coverity-Id: 427163
Coverity-Id: 428925
Coverity-Id: 444463
Change-Id: Ic80247f315a09fffe9363577dff1d1c781859304
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-25 16:22:05 +01:00
Marc Mutz 73d00d0547 syncqt: remove dead code
Either the code in the try {} block

- doesn't throw, then the return within the try {} block exits the
  function, or it
- throws fileystem_error, then we rethrow in the catch, or it
- throws any other exception, then we leave the function by exception

In no case can control reach the trailing 'return {}'.

Found by Coverity.

Amends 7aecb189d5.

Pick-to: 6.7 6.6 6.5
Coverity-Id: 444466
Change-Id: I1c1bf752453076724c2fa9367ea5309e741d84ac
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-25 16:22:05 +01:00
Assam Boudjelthia 990746096e Android: add core-private to use private permissions API
Amends 7fa6d09ca2.

Pick-to: 6.7 6.7.0 6.6 6.5
Fixes: QTBUG-123353
Change-Id: If79498d28b890772f23963621e6e7bd263a56aca
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-03-25 10:49:44 +02:00
Jøger Hansegård 32b0a27d56 QMap: Use qHash SFINAE workaround with MSVC
Fixes failure to find qHash functions when building Squish. Here, QMap
is used with custom types that do not have any associated qHash
functions. It should therefore not require a qHash function to be
usable with QMap.

There is no indication in the build output where the instantiation came from. There's nothing in the output about the function it should have
called, likely because no qHash functions exists.

Amends: e1f45ad818

Fixes: QTBUG-123310
Change-Id: Idb12fb6ffab06ce242c43f2c42ea7a105e8fa0f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-03-24 22:12:39 +00:00
Axel Spoerl c0511410e5 tst_QWidget: use focus abstraction instead of focus_next/prev
Focus abstraction in QWidgetPrivate makes direct access to
QWidget::focus_next and focus_prev an antipattern.
Remove usage.

Add object names for better diagnostics when debugging focus issues.

Task-number: QTBUG-121478
Change-Id: Iecd3bdc824bf77c519951f8f7801eb50b29a6e00
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-03-22 22:42:16 +00:00
Tatiana Borisova 839cffd521 QJsonValue: use new comparison helper macros
Replace public operators operator==(), operator!=() of
QJsonValue/QJsonValueConstRef/QJsonValueRef classes to friend
methods comparesEqual().

Use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of current
comparison methods and replace them with a friend.

Delete non-exported public operators operator==(), operator!=()
for QJsonValueConstRef/QJsonValueRef classes.

Add comparison check to auto-test.

Task-number: QTBUG-120300
Change-Id: I01434af4ce5a7589733db4a9b14f54ad42e852ed
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-03-22 21:01:59 +01:00
Frédéric Lefebvre e73295f908 tst_QWidget::tabOrderWithProxy remove QApplicationPrivate::setActiveWind
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Id3b9967ddaa7dbb87eef9faaf4681d7cb014ba8c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-22 20:23:53 +01:00
Frédéric Lefebvre 3cbb6e0e5f tst_QWidget::tabOrderWithProxyDisabled() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I88d39def0e85e147b3621d98d150ee65463be94f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-22 20:23:53 +01:00
Frédéric Lefebvre e4dcebc19b tst_QWidget::tabOrderWithCompoundWidgets() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: If805bc0e021625b94edc83d7abccc435c1880bea
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-22 20:23:53 +01:00
Frédéric Lefebvre 6d5880d81b tst_QWidget::tabOrderWithProxyOutOfOrder() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I7a4b21018216c2b7cced8d4aa5084c527b694f4a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-22 20:23:52 +01:00
Alexandru Croitor 3b30b0fc2e CMake: Add deployment API to our examples
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor

A couple of examples had to be adapted manually, due to them including
more than one app per example subdirectory.

The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were
removed.

The install(TARGETS) calls were modified according to our
documentation snippets for qt_generate_deploy_app_script.

A qt_generate_deploy_app_script call was added for each executable
target.

Note that the deployment step will be skipped in the CI for now,
because we enable QT_DEPLOY_MINIMAL_EXAMPLES and thus
QT_INTERNAL_SKIP_DEPLOYMENT, and also because standalone examples
are not enabled yet, and deployment is disabled for in-tree (so
no-standalone-example) prefix builds.

The install(TARGETS) calls for each example will still run,
installing the examples into an installed_examples directory, that
will not be archived by the CI.

Pick-to: 6.7
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: Ida389bbad41710b2ae5da4d95e2d85be9e0cd9ce
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-22 20:23:52 +01:00
Frédéric Lefebvre 84dc1f2123 tst_QWidget::tabOrderWithCompoundWidgetsNoFocusPolicy remove setActiveW
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Ieb516cc4fd02230c0ec6bb189da049c3741358dd
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-22 20:23:52 +01:00
Alexandru Croitor b84e7a6bb0 CMake: Move various rcc generated files into .qt subdirectory
So we have a single central location for all generated files.

[ChangeLog][Build System] Generated resource files (and supporting
files) will now be placed into the .qt/rcc subdirectory of a project
build dir. The location is an implementation detail that might still
change in the future, so it should not be relied upon.

Pick-to: 6.7
Change-Id: Id21df22cac832b618e98c25e0e134f4cf70ed9bd
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-22 20:23:52 +01:00
Alexandru Croitor 51aa9c6163 CMake: Fix semicolon warnings for generated resource init code
Fixes clang warnings when -Wextra-semi-stmt is enabled.

Sample warning:

 warning: empty expression statement has no effect; remove
   unnecessary ';' to silence this warning [-Wextra-semi-stmt]
   resourceReferenceKeeper() { QT_KEEP_RESOURCE(qmake_foo); }

Amends 11259972a3

Pick-to: 6.7
Fixes: QTBUG-123588
Change-Id: I7ffc23cf00d8e2741e91c4d0b4056b0c89057dc2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-22 18:50:36 +01:00
Assam Boudjelthia 619570f23d Android: don't append slash for content paths under QAFE
content URI obtain permissions when selected by the Android file
provider, and the Android APIs will treat them as different URIs if
a slash is added and thus such paths will be unaccessible the same way.

Amends d89c32140a.

Change-Id: I8107c7d482dee75f4637e13400b8844b3d3ff804
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-03-22 19:50:36 +02:00
Paul Wicking 34b15dcc8a Doc: Replace obsolete <acronym> with <abbr> html tags
The html element <acronym> is obsolete in favor of <abbr>.
Replace the use in Qt's documentation templates.

Task-number: QTBUG-81209
Pick-to: 6.7 6.6 6.5
Change-Id: I19817fb7f3ab3c23aefeae480f270123d2253569
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2024-03-22 16:28:12 +01:00
Timur Pocheptsov 128645d023 Clarify the priority in selecting TLS backends
In case a custom TLS plugin is provided, the order can be unclear
(next after OpenSSL is either Schannel on Windows, or Secure Transport
on Darwin, then a custom plugin, if any, and the last one is 'cert-only').

Pick-to: 6.7 6.6 6.5 6.2
Fixes: QTBUG-123092
Change-Id: I02bcc1fa5448f64846d561a72b2522af3286c66c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-22 16:28:12 +01:00
Frédéric Lefebvre fbcd223507 tst_QWidget::defaultTabOrder() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I2faaf575a04652a395956c7d790ac18d9f3ec9e6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-22 14:54:48 +00:00
Alexey Edelev 018504f4f3 Move QtInstallPaths.cmake to the Qt6 package
QtInstallPaths needs to be loaded at early stages

Change-Id: Ie275ad2a8855b7555b110c35814ebadafe1817c6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-22 15:31:40 +01:00
Marc Mutz b4c5887939 QSignalSpy: inline verify(obj, func) into the only caller
First, realize that we don't need the isObjectValid() call, because
that's done by verify(QObject*,QMetaMethod) later.

That leaves said fromSignal() and verify(QObject*, QMetaMethod) calls,
which we can just inline into the (QObject*, Func) ctor, thus making
said constructor SCARY, having extracted all template-independent code
into other functions/ctors.

Task-number: QTBUG-123544
Change-Id: I6b8afc541f75936045e2d28cfde51a34f98a1fdd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-22 15:31:40 +01:00
Tor Arne Vestbø da51b957c0 Revert "QTypeInfo: add detection for Clang's __is_trivially_relocatable"
This reverts commit f4bac3ca17.

It broke builds with Xcode 15

Change-Id: Iee232658ede3dfb09d65f3f6a95410c069941421
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-03-22 14:31:39 +00:00
Marc Mutz d2dbe2d7f7 QSignalSpy: separate messages for invalid and non-signal meta-methods
If a signal was invalid, the code still called messageSignature(),
which returns a null QByteArray, and passed its constData() to
qWarning("%s"). That probably worked in our implementation, because it
falls back to QString::asprintf(), but it raised eyebrows, so avoid
calling messageSignature() on invalid QMetaMethod.

This changes the warning output, so adjust the test.

Task-number: QTBUG-123544
Change-Id: I41bc6650de091f61354ff91ee45659668f0e0223
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-03-22 15:31:39 +01:00
Marc Mutz fa5cb84069 QSignalSpy: inline init() into its only caller
Following the verify() Extract Method refactorings, this function has
only one caller left, so it doesn't pull its weight anymore,
esp. considering that it'll be exported soon.

Task-number: QTBUG-123544
Change-Id: I1690b4b6e5a0e0c56fcc9c34544fca3b34e2f9a6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-03-22 15:31:39 +01:00
Marc Mutz 2f39027232 QSignalSpy: move signal verification from init() to verify()
... where it belongs.

Amends e68edd6a07.

Task-number: QTBUG-123544
Change-Id: Ic0e5128555465485b579607a61925cefa5f4716d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-03-22 15:31:39 +01:00
Liang Qi 2862cdb7ba xcb: try to repopulate xinput2 devices when needed
And try to not call Q_ASSERT() to avoid crash.

Fixes: QTBUG-123554
Pick-to: 6.7 6.6 6.5
Change-Id: I9443c5f0ab4ca7a858df9b328f517b48ab8f122d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-03-22 14:31:38 +00:00
Even Oscar Andersen 6f68cb9a60 wasm: Fix openglwindow example
Use QOpenGLBuffer to satisfy WebGL

Change-Id: Id40a85feb329a85844637c5f5a7a8ae534969086
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-03-22 14:15:54 +01:00