Commit Graph

60566 Commits

Author SHA1 Message Date
Tor Arne Vestbø
a0313c85a9 Plumb QMessageBox::setCheckBox() through QPlatformMessageDialogHelper
Without this plumbing we have no way of knowing if the QMessageBox
has a checkbox set, and can't decide to skip the native dialog,
leaving the user without the expected checkbox.

As the suppression checkbox on macOS can be customized, we can use
this plumbing to actually provide native dialog support for generic
check boxes.

This mechanism can also be used by QErrorMessage, which now matches
behavior between native and non-native dialogs in terms of the label
of the checkbox and its initial state. We might want to tweak this
in the future, since user's might expect the suppression label and
state to match the system default, but that's something we can
expose from the platform theme if so, and should apply equally
to the non-native dialog.

Fixes: QTBUG-111803
Pick-to: 6.5.0 6.5
Change-Id: Ied9fc34383fe79fbd8437592ad1c1993b9396178
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-09 09:41:33 +01:00
Volker Hilsheimer
9255820ad5 Handle tab order inception
If a composite widget is put behind one of it's contained children via
QWidget::setTabOrder, then our logic might replace the composite widget
with the contained child. In that case, we'd end up with a broken tab
chain, possibly resulting in incomplete clean-ups and triggering asserts
when shutting down the UI.

Handle this by stopping the last-child searching logic at the respective
other widget, and by not allowing both widgets to be the same.

Augment test case, and apply some minor refactoring to the code.

Pick-to: 6.5 6.2
Change-Id: I7d97dfa85315b6c01daa283253025d94a1727048
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-03-09 09:41:33 +01:00
Thiago Macieira
06f60b24e2 QCborValue: add missing Q_DECLARE_OPERATORS_FOR_FLAGS
Pick-to: 6.5 6.5.0
Change-Id: Ib1d2fc7100134f7597cdfffd174a650ccda287ea
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-08 22:39:48 -08:00
Tor Arne Vestbø
f2fc2013de QErrorMessage: Reset 'again' check box between each error message
The choice of whether to show a message again is per message,
so when showing a new message we need to reset the check box
back to its default checked state, otherwise the user might
mistakenly dismiss more than the indented message.

[ChangeLog][Widgets] QErrorMessage will now reset the check
box for showing a message again for each new message shown,
as each individual message has its own suppression state.

Pick-to: 6.5 6.5.0
Change-Id: I86d4bb5eabdb5b7a478c03516108a5edf87fcbe3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-09 06:12:05 +01:00
Lisandro Damián Nicanor Pérez Meyer
3f45905953 Prefer the shared version of libzstd over the static one
This is related to QTBUG-110978, but not a complete fix.

Task-number: QTBUG-110978
Change-Id: I91b757addde8213ba3d356a590f6e4cf68187c31
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-08 18:16:29 -03:00
Assam Boudjelthia
5a071f5899 Android: remove sdk version check for old version
current Qt version doesn't even support Android sdk 14 and below.

Pick-to: 6.5
Change-Id: I5e06e375d446639211d97f4792401f0f9f8d62f8
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2023-03-08 17:04:15 +00:00
Santhosh Kumar
87567f3a46 docs: Remove side panel and swipe to remove examples
Removed side panel and swipe to remove examples as part of patchset
3bc6f344a8f10699313c3e0c9236dd6945edd895 and updated docs to reflect
that change.

Fixes: QTBUG-110989
Pick-to: 6.5.0
Change-Id: I6241dd9842b1584e3dd25057591fe29eaa34d579
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-08 15:19:13 +00:00
Mårten Nordheim
1352e294d2 QTest: Rename QCOMPARE_XX parameters to add meaning
The parameter names were previously "lhs" and "rhs", which is incredibly
abstract for a testing framework. One of the parameters will tend to be
a baseline value to compare against while the other is the result of
some action we want to test. Thus I suggest they be renamed "computed"
and "baseline".

This way we can, hopefully, retain the semantic that the 'left'/first
argument is the computed ('actual' in QCOMPARE) value while the
'right'/second argument is the baseline ('expected' in QCOMPARE.)

Change-Id: I3e0fdce2a3f1faca06fdf7184ef6e0eb9724d990
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-03-08 15:10:21 +01:00
Andreas Eliasson
12c62dd243 Doc: Update docs to reflect method being renamed
The new method has been renamed from markDirty to notify.

Fixes: QTBUG-111267
Pick-to: 6.5 6.5.0 6.4
Change-Id: Ib7926a315cfd11ca6930c785290089b7031d34ff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-08 08:49:02 +00:00
Joerg Bornemann
565e43fc70 Doc: Fix keyword for CMake commands related to deployment
The pages are supposed to use the \keyword command to provide a target
for the versioned command name.

Pick-to: 6.5 6.5.0
Change-Id: Ic91f5becc80985622a691aba96ce2c4e2984078e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-08 05:47:08 +01:00
Volker Hilsheimer
a9427bedd4 Doc: use () in references to cmake functions
Pick-to: 6.5 6.5.0
Change-Id: Ia4177a293c9c93edb8f27aec237df45b98caf20d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-08 05:47:02 +01:00
Tor Arne Vestbø
c80615b6cc macOS: Remove content border thickness members from QCocoaWindow
They were only set by QCocoaWindow::setContentBorderThickness(),
which was removed in 19fc78e967.

Pick-to: 6.5
Change-Id: Ia1b429c56c9627506023b76bddf878a4321d5f0b
Reviewed-by: Doris Verria <doris.verria@qt.io>
2023-03-08 01:22:19 +01:00
Tor Arne Vestbø
6806ed373c macOS: Class initialize QCocoaWindow members
Pick-to: 6.5
Change-Id: I76e107b676ce27526094f851ec23bb544689e32f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-08 01:22:19 +01:00
Tor Arne Vestbø
f5afbd6d4b macOS: Move setMask call out of recreateWindowIfNeeded
It semantically applies during platform window initialization, and
doesn't depend on the logic of choosing an appropriate NSWindow class.

Pick-to: 6.5
Change-Id: Ia24a2deafc78ed4c79df766b6372ad64de2d0dde
Reviewed-by: Doris Verria <doris.verria@qt.io>
2023-03-08 01:22:19 +01:00
Tor Arne Vestbø
d7e2c9acf2 macOS: Don't set opacity on non-top level windows during NSWindow creation
The opacity is a property of NSWindow.

There's no point in pulling out the opacity from QWindowPrivate,
as QWindow has a public accessor for it. And we don't need to
guard the call with a check for non-1.0 opacity. If we want
logic to avoid redundant calls to the platform APIs, they
should be in the setter.

Pick-to: 6.5
Change-Id: Ic9b8d1051f30d3b7e09dae14b9f22ca899d05865
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-08 01:22:19 +01:00
Christian Ehrlicher
4ec5c0efc7 SQL/ODBC: Return all native error codes
ODBC can (similar to DB2) return more than one native error code for an
error but only the last one was recorded which may made the error
diagnostic more complicated. Therefore return a concatenated list of
native error codes the way it's done for DB2.

[ChangeLog][SQL][ODBC] QSqlError::errorCode() might return a semicolon
separated list of native error codes.

Fixes: QTBUG-45087
Change-Id: I70d02adeb33e72897f13e0c72fbbd2c60f307e2f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-07 22:09:28 +01:00
Giuseppe D'Angelo
4b197c3f52 QRegularExpression: add support for non-filepath wildcards/globbing
A glob pattern has different semantics depending on whether
it's used in "filepath mode" (FNM_PATHNAME) or not.
QRegularExpression only implemented the former, but the latter
is also useful, and possibly more "intuitive" for certain use
cases (e.g. offering users a simplified version of regexps that
however still need "*" to match a "/").

Add this support. The problems highlighted by QTBUG-111234 have
not been addressed, I've just amended a bit of documentation
relating backslashes.

[ChangeLog][QtCore][QRegularExpression] Support for non-filepath
wildcards has been added to wildcardToRegularExpression().

Fixes: QTBUG-110901
Task-number: QTBUG-104585
Task-number: QTBUG-111234
Change-Id: If9850616267980fa843bda996fcb4552b5375938
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-07 20:57:43 +01:00
Alexandru Croitor
b3a60e49cd CMake: Fix xmlstreamlint to use the manual test api
Amends e13b57d06a

Pick-to: 6.5.0 6.5
Fixes: QTBUG-111774
Task-number: QTBUG-110647
Change-Id: I585cdf20e2e60d4e11170a6e2131b7abc2b7eaf3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-07 17:39:00 +01:00
Laszlo Agocs
8e27e31649 Add workaround for threeDimTexture case failing with some drivers
Not relevant for the CI as that does not run with any real Vulkan
implementation. (and Lavapipe works if that's used)

As the investigation in the Jira issue shows, there is no proper
conclusion yet on why rendering to a slice of a 3D texture breaks
the content of other slices that have image data written to them
before that render pass targeting the slice. It would seem that
transitioning to COLOR_ATTACHMENT_OPTIMAL has some unexpected
consequences for slices that are not targeted by the render pass
with Mesa on Intel.

(NB rendering to a given 3D texture slice works via
VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT; and how often this is needed
in practice is unclear, typical volume rendering cases will anyway
likely just upload data to the slices of a 3D texture, not rendering
to them)

The problem is still clearly visible in the tex3d manual test (when run
on affected Linux machines), this we keep unchanged for the time being
so that the issue can be examined further. However, the autotest is
changed to prevent the issue from occurring (render to slice first,
then upload to other slices) since it causes confusion when the test
is run locally on various developer machines.

Pick-to: 6.5
Task-number: QTBUG-111772
Change-Id: I4dc4c2413f8c518f377a33065992ad786a5ff44f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-07 16:48:32 +01:00
Laszlo Agocs
9c84036d4f rhi: Clean up 1D and 3D texture feature flags
Separate 1D mipmap generation support from rendering into an 1D texture.
Those are two independent features, so have a separate feature flag for
both instead of using just one.

This will then be symmetric with the 3D texture features, where now we
have a new flag to report support for generating mipmap for 3D textures.
(whereas 3D texture as a render target is already covered by
RenderTo3DTextureSlice)

Change-Id: Ie5e1f056a7d1c341d90cd7fc522877a3f2da3290
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-07 16:48:32 +01:00
Sami Shalayel
5bb745f62b _qt_internal_create_moc_command: clean up MOC's arguments
MOC was failing to compile due to invalid arguments passed by the CMake
scripts. Notably, because of the "-D" without option that might "eat"
the command behind it.

On Wasm, the empty "-D" argument was eating up the following "-o",
leaving MOC clueless about the "extra" arguments that actually followed
the "-o".

Cleanup the passed arguments in _qt_internal_create_moc_command
to avoid passing -D or -I without macroname or include path.
Also, it seems that -D was passed multiple times: fix the remove
duplicates feature of _qt_internal_create_moc_command to recognize all
duplicates: instead of removing duplicates and then joining the argument
lists together, first join them and then remove the duplicates.

Fixes: QTBUG-111717
Change-Id: Ibf8cd69f162e50afa43bc27e8c242240b92b1a25
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-07 16:48:32 +01:00
Tor Arne Vestbø
4e59a5252c macOS: Use non-native app modal message box from nested event loops
The NSAlert does not stay open when ran from a nested event loop,
so we need to fall back to the cross platform dialog. The window
modal dialog does not have this issue.

Fixes: QTBUG-111524
Pick-to: 6.5 6.5.0
Change-Id: I63fba0a092018bb19edeef78c06587455d752235
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-03-07 14:04:09 +01:00
Piotr Wierciński
4d09152344 Wasm: Hide resizing divs when the window is not resizable
Hide divs that are responsible for resizing the window and changing the
appearance of the cursor on this window if this window is not resizable.

Fixes: QTBUG-111618
Change-Id: I1948eaedf02fdd2a5289ae314521b3fd74ad7811
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-03-07 12:50:41 +01:00
Mikolaj Boc
79cc3ae201 Support filter list for file input when opening a file on WASM
The polyfill for file input on WASM now makes use of the supplied
filter list.
Some changes were introduced in the abstraction for filters so that
they are usable both for the new file API and the legacy file input.

Change-Id: Id6341be4d6a1647e17382d13da7be42491cfaf80
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-03-07 12:50:41 +01:00
Mikolaj Boc
c6183cfc7b Make manual tests use the usual wasm_shell.html
Manual tests are supposed to display UI and be assessed manually, but
currently they use the auto test runner by mistake.
Use the normal wasm shell to fix this and make them work like usual
applications.

Fixes: QTBUG-111753
Change-Id: I9d3c0ad56e913b73737c5b72087e82980989d8b8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-07 11:46:36 +01:00
Eirik Aavitsland
9273bcac7f Lancelot: fix a copy-paste error in the new drawPixmapFragment command
Caused crashes because of uninitialized variable

Pick-to: 6.5
Change-Id: I18f96e47b766415ad49e6a8515bbaa372b122cd3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-03-07 08:13:55 +01:00
Christian Ehrlicher
12909d7c3d QSqlDatabase: deprecate QSqlDatabase::exec()
The note that QSqlDatabase::exec() is deprecated was added more than 12
years ago so it's time to also mark the function as such.

Change-Id: Ic5e7c31b3ff5b21e16e2640548cba1a4baaeeb1c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-06 23:14:49 +01:00
Volker Hilsheimer
386dcbf6b9 Silence warning about unsafe sprintf, use snprintf instead
Apple lets us know that:
  warning: 'sprintf' is deprecated: This function is provided for
  compatibility reasons only.  Due to security concerns inherent
  in the design of sprintf(3), it is highly recommended that you
  use snprintf(3) instead.

Pick-to: 6.5
Change-Id: I3130b3c7b636466b5e77adc5cb05ad4ce1faee11
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-06 23:14:08 +01:00
Volker Hilsheimer
cacc53e427 Silence warning, initialize variables before using
Pick-to: 6.5
Change-Id: I0e7db95bac48b5d79897402f23157d00c4abbdff
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-06 22:34:39 +01:00
Volker Hilsheimer
73f04faa07 Silence warning about deliberately using deprecated API
We test moc's support for [[deprecated]], so don't warn about it.

Pick-to: 6.5
Change-Id: Ifda2b81c14cb9802db4bb1d0a1eb17d978ad492a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-06 22:34:39 +01:00
Kuntal Majumder
05a7cbef5b Allow building with llvm-clang in macOS
Supressing the linking warnings on macOS are relevant when we are
using AppleClang and not upstream Clang.

The provided arguments do not apply to llvm-ar and llvm-ranlib.

Change-Id: I8b664c01802b47077eb0ab80dab7681ee0bfcaa9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-06 21:54:43 +01:00
Alexandru Croitor
a804ac3d88 CMake: Relax example dependencies to be per-repo
When doing a top-level build with ExternalProject examples, it doesn't
make sense to make qtbase examples depend on e.g. qtdeclarative
plugins. Instead the qtbase example should only depend on plugins
built in qtbase.

Create per-repo custom targets that depend on all plugins built within
that particular repo.

Create an additional per-repo target which depends on all
plugins built in that repo, as well as plugins from dependent repos.
Use the latter as a dependency for examples built as part of the
current repo.

Repo dependencies are parsed from dependencies.yaml.

Pick-to: 6.5
Fixes: QTBUG-110913
Change-Id: I149860cc549caf53271c9ea296eb7bac2a663715
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-06 18:54:00 +01:00
Volker Hilsheimer
2e6de6f8b2 Doc: fix links to changed or renamed i18n pages and sections
Pick-to: 6.5 6.5.0
Change-Id: Ibe00b793ae0943cdbbcfa272e5cae4e91da5bf7d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-03-06 18:52:35 +01:00
Amir Masoud Abdol
93a378b295 Silence a few unused-but-set-parameter warnings in some of the tests
Change-Id: I8cf3e4764ae50011d691dec6f52a355ddfb0ce7b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-06 17:16:14 +01:00
Morten Sørvig
ba724a2ded wasm: set stack size to 5MB again
Recent Emscripten 3.1.27 reduces the stack size to 64KB,
which is way to small for Qt-based applications.

Restore the previous stack size (5 MB) by setting STACK_SIZE.

Change-Id: I6c25e31b32dc1d551fa423655fcef4891830bcd1
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-03-06 14:06:07 +00:00
Christian Ehrlicher
28d5da386f SQL/Tests: remove some unused functions
remove toHex() as it's not used at all and qTableName() with two params.
Also remove some SQLite 2 specific stuff

Change-Id: If285febdfbee5833f7174d70f386bd54674bd539
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-06 15:06:07 +01:00
Ulf Hermann
5123645831 QMetaObject: Drop hand-optimization of strcmp
Comparing the first character ahead of a strcmp() call is unlikely to
result in faster code than just calling strcmp() right away these days.
Any compiler worth its salt should have a specialization of strcmp()
that uses platform-specific tricks to produce the best performance.

Change-Id: I80b74e698a6636d056b44cbef372edcb417534eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-06 08:41:19 +01:00
Marc Mutz
b955648224 QDBusError: don't refer to a QT_NAMESPACE'ed get() as ::get()
This code predates the public history. I don't know exactly how this
worked before, but I guess it's because the QT_USE_NAMESPACE in our
headers.

If there's _any_ get() function at the global scope, then name lookup
stops there and considers _only_ that function. And if that happens to
have a compatible signature, good night.

Use unqualified lookup instead. That will find the QT_NAMESPACE one,
ignoring other overloads at global scope. And when non-namespaced,
will emit an ambiguity error in the presence of another matching get()
function at global scope.

Task-number: QTBUG-111598
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Iea141ea543193394ba527b414caf31c1f3a2355b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-05 21:57:21 +01:00
Marc Mutz
28f56f29bb Short live q23::forward_like!
Following https://eel.is/c++draft/forward#lib:forward_like
step-by-step.

Temporarily add a q23utility.cpp to contain the static_assert()
tests. There's no point in establishing a tst_q23utility just to run
six static assertions. Should remove the .cpp again once an in-tree
user exercises the function with the same coverage.

Task-number: QTBUG-111598
Change-Id: Icb18eae089d65ca4e555921dbb71e74a7e255645
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-05 21:57:18 +01:00
Ahmad Samir
4bc0f4fbec QMutex: add missing include
Change-Id: I43dba6811e7a31990e767d7ca13fdd518109217e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-05 14:24:34 +02:00
Ahmad Samir
0f0b9bd2cf QCompilerDetection: fix compiler warning about undefined macro
build/include/QtCore/../../../src/corelib/global/qcompilerdetection.h:546:7:
warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef]
 #  if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
      ^

build/include/QtCore/../../../src/corelib/global/qcompilerdetection.h:648:7:
warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef].
 #  if __cplusplus > 201103L
      ^

Change-Id: I8ed8e0c4b93977238986df0b3339ffae4d1d0fda
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-05 13:22:01 +02:00
Piotr Wierciński
073848f3c4 wasm: fix respecting minimum size of QWasmWindow
Minimum size of QWasmWindow was not properly enforced.
Make sure that minimumu size constraints are respected
when the QWasmWindow is created, resized manually or
changed by setGeometry().

Fixes: QTBUG-111162
Change-Id: I2984b0836b5b53f9163275153d734cb1d81ef3b6
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-03-05 09:31:06 +01:00
Volker Hilsheimer
9e31631557 Doc: fix link to QTest::failOnWarning
Also fix incorrect failOnWarning*s* elsewhere in comments.

Pick-to: 6.5 6.5.0
Change-Id: I0bbc5e71060348153876f3d9a7c77c67f3c2e00d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-03-05 06:00:39 +01:00
Volker Hilsheimer
9ec61d4460 Port QPathClipper test away from home-grown QCOMPARE
Use a scope guard to print debug info in case of an early return.
Silences clang warning about sprintf being unsafe and deprecated.

Change-Id: Idcbfde1a6f2eb1143f51c1e5ecedbf3fe90d8ec8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-03-05 06:00:18 +01:00
Volker Hilsheimer
47df0eb513 Doc: fix QOpenGLWidget::defaultFramebufferObject documentation
Fix the link to QSurfaceFormat::StereoBuffers, and clean the text up
a bit. If everything is a \note, then we might just as well not have
notes, so move the statement about when this function is useful out
of a note, and combine the statements elaborating on ownership and
lifetime of framebuffer and contexts into a single note.

Pick-to: 6.5 6.5.0
Change-Id: I7cb1f9ff78ba760e99d639550130f5c833ad684a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-03-05 06:00:11 +01:00
Volker Hilsheimer
3ff66569ea Doc: Fix syntax error
Amends e0ecb0ded2

Pick-to: 6.5 6.5.0
Change-Id: If315d97e93047a8bece36c727c7646d30eb7458b
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-03-05 06:00:02 +01:00
Thiago Macieira
8413824ca0 qsimd_p.h: remove LZCNT feature from the ARCH_HASWELL list
And for good measure, I'm also removing BMI2. The one we really care
about ensuring gets enabled instead of -mavx2 is FMA anyway.

Complements commit 29d3938aa5 (which in
turn complemented commit a98cf15ed1),
which removed BMI1 because AMD introduced it before AVX2. Looks like
they also introduced LZCNT in some earlier processor too (family 10h) or
GCC 12 began emitting __LZCNT__ for that family -- IIRC the AMD feature
list was bigger than just the lzcnt instruction.

Fixes: QTBUG-111698
Pick-to: 6.4 6.4.3 6.5 6.5.0
Change-Id: I7f354474adce419ca6c2fffd1748f5b24f69a692
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-03-04 10:59:56 -08:00
Thiago Macieira
2a19c7ed13 QNetworkInterface/Unix: replace one Q_ASSERT with static_asserts
This requires compilers with constexpr offsetof(), which Clang seems to
be since at least 3.0 and GCC since 4.7, both of which are way older
than anything we need to support.

Pick-to: 6.5
Change-Id: I7f354474adce419ca6c2fffd1748b3dcfc616f4a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-03-04 10:59:44 -08:00
Tor Arne Vestbø
e2446afaa1 qmake: Resolve target suffix based on Qt build config for static plugins
The qtPlatformTargetSuffix() function is used in various places to
determine the suffix of targets based on the config, which for macOS
will result in a _debug suffix in debug mode.

This becomes tricky when one project built in debug mode tries to depend
on the libraries/plugins of another project (Qt) built in release, as
the qtPlatformTargetSuffix() function uses the current CONFIG as input,
which may be different than the QT_CONFIG (or CONFIG of whatever project
is being depended on).

For libraries this was fixed in 50e664835b
by iterating all known library paths, and trying the CONFIG suffix before
falling back to release version.

For plugins this was never solved, which becomes an issue when linking
to static plugins, either in a fully static build of Qt, or when some
of the plugins are static (permission plugins e.g.).

In this situation, the user project has to have the same configuration
as Qt was built with, to avoid errors like:

 error: no such file or directory: '~/6.x-static/qtbase/plugins/platforms/libqcocoa_debug.a'

To work around this, we assume that a plugin installed into the Qt
tree has the same build configuration as Qt itself, then then use
QT_CONFIG as the determining factor when linking to the plugin.

This still ties the build config of the plugin to the config of Qt,
but relaxes the relationship to the application, allowing it to be
built in either debug or release, which is an improvement to the
current state.

Pick-to: 6.5 6.5.0
Task-number: QTBUG-110356
Change-Id: Icee67fc01313a6c6f34178a6345ccae1b57429d7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-04 16:54:56 +01:00
Tasuku Suzuki
0bbf817589 Fix build with -no-feature-animation
Pick-to: 6.5
Change-Id: Ibd786bc140051ed09d65c6a784ad52c6a1ef7987
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-04 09:45:41 +00:00