Commit Graph

61017 Commits

Author SHA1 Message Date
Volker Hilsheimer
d7aa6109b1 Docs: fix links to D-Bus examples
"Example" was removed from the titles.

Pick-to: 6.5
Change-Id: Ie322180fbda328cd6e3e03c7c15f6255809b619c
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2023-04-11 19:25:42 +02:00
Topi Reinio
45ca5c8585 Doc: Use the \examplecategory macro to tag examples
The '\meta category' command was used for tagging examples with a
specific category, used in Qt Creators Welcome mode.

As we want to also generate lists of examples belonging to a category
elsewhere in the documentation, replace the command with a macro that
expands to the original \meta command and also adds the example to
a group using the \ingroup command. This way, the category names can
be used as arguments to the \generatelist or \annotatedlist commands.

Pick-to: 6.5
Task-number: QTBUG-112731
Change-Id: I46762dabc5f718fecc09a3533235eaa911dda5a0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-04-11 17:25:42 +00:00
Volker Hilsheimer
f334a22eae QAccessible test: skip focusChild on wayland
The test implicitly relies on window activation as QWidget only emits
accessibility events for focus changes in the active window. So skip it
on platforms that don't support WindowActivation and remove it from
the blacklist.

Fixes: QTBUG-109763
Pick-to: 6.5
Change-Id: I67d9a95f4f36b5271fe53ae90140a28770566c83
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-04-11 19:03:52 +02:00
Volker Hilsheimer
3c83b3c010 QImage: when saving fails, print the writer's error string
In debug builds, don't fail silently in QImage::save, but emit the error
string of the QImageWriter to the warning stream so that developers have
a chance to know what's going on.

Task-number: QTBUG-103257
Task-number: QTBUG-41043
Pick-to: 6.5
Change-Id: I29718b1445d0c99a3b35d57b58ec915a503cd5f0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-04-11 19:03:52 +02:00
Ilya Fedin
6f37399cd6 Fix build without egl_x11
Amends 49d2944045

Pick-to: 6.5
Change-Id: I5ff94135245cdb617aa5eea5a0e2782f810b36dc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-04-11 21:03:52 +04:00
Morten Sørvig
01cdda3502 Update QWindow DPR on screen DPI change
The window device pixel ratio may change when the DPI
changes. Call the DPR update function, which will poll
for the current value and update the cached value and
send DevicePixelRatioChanged events if needed.

Change-Id: I5d5ac5d24a693d06eb9b1f005a91677e703f8a58
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-04-11 17:13:14 +01:00
Morten Sørvig
3965d808c0 QWindow: Cache the devicePixelRatio value
Make each QWindow instance cache the current DPR value.
This will make calling QWindow::devicePixelRatio() less
costly, since it now does not have to compute the DPR
value on each call.

The cache is invalidated when the DevicePixelRatioChange
event is sent. The common logic for handling this is
implemented in QWindowPrivate::updateDevicePixelRatio().

Change-Id: I97231a230347358d8e565d2fd62e8a398adaedfc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-04-11 17:13:14 +01:00
Colin Snover
fc9853dcbf QMainWindow: fix potential crash when restoring tab bar state
Don't activate the mainwindow layout while it is being restored.
Otherwise we might end up in recursive calls to setGeometry.

Pick-to: 6.5
Fixes: QTBUG-111538
Change-Id: I4b6cba9e0abfbae479f71a65b1c4526d92dac081
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-11 18:13:14 +02:00
Colin Snover
5b8ffc6d2a QMainWindow: fix potential assert when restoring dock widget state
Don't append separator widgets at the end if their slot in the list is
still free.

Pick-to: 6.5
Task-number: QTBUG-111538
Change-Id: Id9ada2c083345cfd69633e506cceedc9ae6f2ae4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-11 18:13:14 +02:00
Bernhard Rosenkränzer
8f8be55c15 CMake: Fix linkage with lld 16.0
lld 16.0 is more picky about symbol versioning than previous versions
(and other linkers such as ld.bfd, gold or mold).
It now errors out if a symbol is versioned but not defined
(see 8796677de8900dc154aef45f8620c3f987a40291).

Outside of detecting support for symbol versioning (fixed by 462832),
this causes linking Qt6 libraries other than Qt6Core to fail because
their linker scripts try to add versioning to qt_version_tag, which is
defined in Qt6Core rather than the library being linked.

The obvious (and working) fix is to version qt_version_tag only where it is
defined (Qt6Core), but this is not what the original intent seems to be.

Task-number: QTBUG-111514
Change-Id: I963d417befb0f6b2260c57f059eeda1fe79200c9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-11 15:19:22 +02:00
Axel Spoerl
74a4f9cb05 Cache null icons and remove them upon system icon theme change
Since Qt 6, qIconCache does not store null icons. In case an icon name
lookup is unsuccessful, the (expensive) lookup is repeated each time.

This patch reverts 9e7c567050, which
removes a null icon from the cache once it has been found in the cache.
In fact, that could no longer happen due to
4dc7102c84, which prevented null icons
from being cached at all. Therefore, it is also reverted by this patch.

The cache will be cleared when
- the system icon theme name changes or
- QGuiApplicationPrivate::processThemeChanged is called (e.g. due to
a change of the system's color scheme)

Fixes: QTBUG-112257
Pick-to: 6.5
Change-Id: I80cd21fa39dc31c4bae60a8e66e78d9da20e9b4b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-11 15:19:22 +02:00
Volker Hilsheimer
70f9158e0f Docs: don't link to removed example
Pick-to: 6.5
Change-Id: I5fcec02cd18971150eec4f119d902c695bf2ebb9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
2023-04-11 14:37:36 +02:00
Marc Mutz
9834e80833 savegame ex.: give some TLC to main()
- include what you use
- make 'args' const, so we don't detach in op[]
- make boolean variables const
- use QString::compare(lhs, rhs, Qt::CaseInsensitive) instead of
  lhs.toLower() == rhs
- use new _L1 UDL
- fix indentation of a return statement

Pick-to: 6.5
Change-Id: If9da4fbe975d9a97939ea01558b2a8cef7ad3a24
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-04-11 12:37:36 +00:00
Joerg Bornemann
26f0657fee CMake: Fix setting Android SDK/NDK from environment variables
The checks for the environment variables ANDROID_SDK_ROOT and
ANDROID_NDK_ROOT were guarded by if(DEFINED) conditions. However, these
variables are *always* defined by the code that iterates over
__qt_toolchain_used_variables earlier in the toolchain file.

Change the existence checks into emptiness checks.

Pick-to: 6.5
Change-Id: I6c87f86068817e45dd2325359827c6fa4dae6279
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-04-11 14:37:36 +02:00
Amir Masoud Abdol
db9fa4a617 Exclude sources from the Unity Build
There are patches for addressing the issues raised by these two source
files; however, it would be beneficial to exclude them temporary while
we are testing, and debugging the unity build on CI.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ie8631cf1df086b22967a8cc41874a3ef856c3ef8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-11 13:41:55 +02:00
Volker Hilsheimer
7199498fb9 QPushButton: use QMenu::popup instead of exec to show menu
QMenu::exec opens a blocking loop, which is problematic for webassembly.
Replace with QMenu::popup, and reset the down-state of the button when
the menu is about to hide. QMenu emits aboutToHide immediately before
existing the event loop in the hideEvent override, so the timing is the
same.

Change-Id: Iccb418d10fcb25f6ad1f73f9cdce6ea6581bd73b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-04-11 12:58:58 +02:00
Volker Hilsheimer
cf5d9e9eb5 QWidget: add overload to set tab order as a list of widgets
The "two widgets at a time" API to set the tab order is awkward and
easily misused (as the documentation explicitly explains). Add an inline
overload that takes an initializer_list, and call the existing function
for each consecutive pair of widgets in the list.

Add documentation with snippet, and a test.

Change-Id: I8e6f14a242866e3ee7cfb8ecade4697d6bdfb4d4
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-04-11 12:58:58 +02:00
Mikolaj Boc
ce5fb1e709 Get http reply text on error in wasm's network reply
A failed response also carries response text. Read it and assign it
to the response.

Fixes: QTBUG-112474
Change-Id: I5565e3809e2c9c95bf8e0744b3ab15a62b07106c
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-04-11 08:47:20 +02:00
Volker Hilsheimer
f04974751d QFileSystemModel: don't emit invalid indexes
A subclass of QFileSystemModel might override columnCount to return a
value smalller than QFileSystemModelPrivate::NumColumns.

In that case, constructing the bottomRight index for the dataChange
signal would fail if we create it for column NumColumns - 1, and result
in undefined behavior where the topLeft and bottomRight indices do not
have the same parent.

So ask for the columnCount of the parent index explicitly to construct
the bottomRight index.

The assert can be triggered via the "filesystemexplorer" example in
qtdeclarative, which overrides columnCount to always return 1.

As a drive-by name the variables correctly, bottom and top where mixed
up.

Pick-to: 6.5
Fixes: QTBUG-110632
Change-Id: I8a635ec733348d1eda2037c156ac0f7b09a2183d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-11 08:46:58 +02:00
Volker Hilsheimer
41a349f004 Refactor QFileSystemModel: use named values for columns
Hardcoded 0, 1, 2, 3 make it hard to follow the logic of this code.
Replace those values with values in the already existing unnamed enum,
and use everywhere.

Pick-to: 6.5 6.2
Task-number: QTBUG-110632
Change-Id: I325ab9edb5f3f996e87c83be1ec7226d5453f2cc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-11 08:46:54 +02:00
Ahmad Samir
7191b8fe38 Fix some narrowing conversion warnings
ioctl call for FIONREAD takes an int arg, it won't work correctly
otherwise. Cast the return of the read() call to int, because it won't
read more than buffSize (which is an int).

Change-Id: I130202a732684257bbb0e79c9358b60a61010c46
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-08 13:24:04 +02:00
Ahmad Samir
db797d19a3 QTemporaryFile: fix narrowing conversion warnings
- Don't use unsigned to avoid negative values (if an unsigned variable
  is assigned a negative value it'll wrap around and become a huge
  positive value, which is usually not what's required)

Change-Id: I5d41280b9ca14c15727f9f2447ed50573b187931
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-08 13:23:37 +02:00
Ahmad Samir
94a01cd6ec QDate: remove an old comment
QDateTime::addMsecs does check for overflow. I don't know when this
 has changed, but it doesn't matter.

Change-Id: I44c6ba5e88cce544c0d1ef33fa38a528a96b0b7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-08 13:23:22 +02:00
Ahmad Samir
3202ab1eb1 QXmlStream: run the test suite from a method other than initTestCase()
Only unzip the test suite in initTestCase(), but run the tests from
runTestSuite(). This is mainly useful when running specific a unittest
locally, no need to wait for the whole zipped test suite to run.

Change-Id: I518a2de716d3d07fb5a78298f1bd3ab2759e744b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-08 13:23:06 +02:00
Ahmad Samir
d1140235e2 QDate: reformat a unittest
Change-Id: I323975db23f40fe2e7fc5062fbc8102dedbaaf5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-08 13:21:51 +02:00
Ahmad Samir
595112ea50 QStorageInfo: mention bind mounts and btrfs subvolumes in API docs
Sepcifically in the subvolume() method's docs.

Change-Id: Ib14492f8366bf00a6a4ab399ff8ad20009be5886
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: hjk <hjk@qt.io>
2023-04-08 13:21:39 +02:00
Ahmad Samir
b58606ed85 tst_qstringapisymmetry: silence a GCC warning
GCC complains:
inlined from ‘constexpr QAnyStringView::QAnyStringView(const Container&) [with Container = QVarLengthArray<QChar, 1023>; typename std::enable_if<disjunction_v<QtPrivate::IsContainerCompatibleWithQStringView<T, void>, QtPrivate::IsContainerCompatibleWithQUtf8StringView<T, void> >, bool>::type <anonymous> = true]’ at src/corelib/text/qanystringview.h:215:64,
    inlined from ‘void tst_QStringApiSymmetry::overload() [with T = QVarLengthArray<QChar, 1023>]’ at /home/ahmad/devo/qt6-git/qtbase-qglobal/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp:1178:17:
src/corelib/text/qanystringview.h:187:47: warning: ‘t’ may be used uninitialized [-Wmaybe-uninitialized]
  187 |         : m_data{str}, m_size{encodeType<Char>(str, len)}
      |                               ~~~~~~~~~~~~~~~~^~~~~~~~~~

Clang doesn't warn about this.

Change-Id: I3476236630e886b087856acd22054bfb35deb451
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-04-08 13:21:24 +02:00
Christian Ehrlicher
40045aeec8 SQL/Tests: use TableScope where possible
Use TableScope helper class to make sure the table used for the test is
really cleaned up before usage.

Change-Id: I45fffcd13acae6032636ae07097b14af174ede21
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-07 20:38:13 +02:00
Volker Hilsheimer
b40df32ea3 QtSql: don't use deprecated QSqlDatabase::exec in test
Change-Id: Id9e88eb874ce70c3dea6ddb0a324e589965ff9d9
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2023-04-07 19:53:59 +02:00
Christian Ehrlicher
ca7e3bcf91 SQL/IBASE: Always escape the table names when creating the SQL statement
Sync the IBASE driver behavior for primaryIndex() and record() with the
rest by assuming that the given table name has the correct casing.
Change the tests for these two function to pass an unescaped table name.

Change-Id: I6d96359f97e1acc6970b9a22fdf0e968a616b7bc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-07 15:48:57 +01:00
Amir Masoud Abdol
f5aa8317d0 Add -Wno-error=stringop-overread to warnings_are_errors_flags
Besides `stringop-overflow`, the `stringop-overread` is also buggy, and
it has some false positives. If not silenced, this will break the
unity build as several warnings are being emitted in qmetaobject.cpp,
etc.

Pick-to: 6.5
Change-Id: I708c81057c01d8d8fc9694c394c89602a2f6867b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-04-07 16:06:22 +02:00
Christian Ehrlicher
3983babd71 QSqlQuery: add boundValueName()/boundValueNames()
[ChangeLog][SQL][SqlQuery] Added two new functions
boundValueName()/boundValueNames() to return the names of the bound
values.

Fixes: QTBUG-97847
Change-Id: I8df5f15e8df13141a34d38b0a2e13b37f4e7829c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-07 14:25:28 +02:00
Amir Masoud Abdol
9db9a836fb Remove unused variable/code
Pick-to: 6.5
Change-Id: I8d28db64c1ae2c57c95b2f9f22303d74172226e9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-04-07 11:12:34 +02:00
Alexandru Croitor
f00280337b qmake: Fix incorrect Info.plist replacement of EXECUTABLE_NAME
The app_bundle_name should be used if it's not empty.
Previously it was only used if it was empty.

Amends 0749ba2c5e

Pick-to: 6.5
Fixes: QTBUG-112668
Change-Id: I4a0e8286eabb5156ad62b448afdf7f54cc78a915
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-04-06 20:39:53 +02:00
Alexandru Croitor
b2e586cf15 qmake: Clarify documentation on how to modify QMAKE_BUNDLE
The value is auto-computed from other variables and should not be set
directly by the project code.

Pick-to: 6.5
Fixes: QTBUG-112667
Change-Id: I6132b98f3a1ac0f9d721f390a065f6fa22db2bf6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-04-06 20:39:53 +02:00
Amir Masoud Abdol
75ea098a16 Use NO_UNITY_BUILD instead of directly setting the property
Pick-to: 6.5
Change-Id: I4f39f7c306cddb3fe6797ac4aa3c3c08d573962c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-06 20:39:53 +02:00
Axel Spoerl
947f4df49c Fix CMakeLists.txt of echo plugin example
This patch adds a missing dependency to the echo plugin for shared
builds.

Since it fixes the last remaining example, it closes the Jira ticket.

Fixes: QTBUG-112300
Pick-to: 6.5
Change-Id: Ib1da2d7d5f5d54d7224f1c65a995f3752037e5be
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-04-06 19:36:48 +02:00
Alexandru Croitor
5e378e7374 syncqt: Add more information to verbose output
Makes it easier to troubleshoot issues.

Pick-to: 6.5
Change-Id: If50fafde8748bb0fde58f54ed55fe1ddf9bcf088
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-04-06 19:26:02 +02:00
Alexey Edelev
55f89c76d9 Guard qopenglcontext_p.h with QT_NO_OPENGL
Fixes the macos build with the disabled opengl feature.
Include inttypes.h that used to be implicitly included by
qopenglcontext_p.h. It's needed for 'PRId64' macro.

Amends: ef27cc126c

Pick-to: 6.5
Fixes: QTBUG-112656
Change-Id: I970329c4aacc70790f50e1ff3a57ab2aa6f6bff7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-06 19:26:02 +02:00
Timothée Keller
a516a368c2 Windeployqt: change qtModule return value to prevent invalid modules
When the change from quint64 to bitsets was originally made, the return
value of the qtModule function was not adapted. Where returning 0 was
fine for the quint64 values which started at 1, returning 0 now adds
the first module instead of adding nothing to the used/required modules

Fixes: QTBUG-111984
Pick-to: 6.5
Change-Id: Id1e2b3237a36335ec5071180b4c73f99d5eb5c8d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-04-06 17:51:36 +02:00
Morten Sørvig
a215e6650a Add DPI change tests
We can expand the testing a bit bit verifying that also
created windows work as expected, and that QWindow DPR
is updated when Screen DPI is changed.

Change-Id: I082aac18b6b086c69c16681977b7eaa6c3e54ee0
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
2023-04-06 14:28:24 +00:00
Amir Masoud Abdol
684d301983 Disable Unity Build for Examples
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I20999512e557db618c14e36d62317680bc17c43a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-06 14:28:24 +01:00
Kaj Grönholm
a2dccbafcf Clear invalid QApplication styleOverride
When QStyleFactory::create() is unable to find/create an override style
set with QT_STYLE_OVERRIDE or "-style", clear the styleOverride. Reason
for this is that Qt Quick Controls otherwise tries to use this invalid
style.

Task-number: QTBUG-100563
Pick-to: 6.5
Change-Id: I48fa6c211ce27d902e2eaf90c34cb5694ad7ecfd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-06 16:28:23 +03:00
Timothée Keller
8009561029 Windeployqt: Prevent '.' and '..' from being added to lconvert
If windeployqt is not able to retrieve any translation information
from the catalog, the translationNameFilters will be empty. This allows
the '.' and '..' folders to be passed to lconvert which in turn causes
an error for the whole deployment. Added a check for the filters being
empty, and a warning in case we have to preemptively return from the
translation deployment.

Fixes: QTBUG-112204
Pick-to: 6.5
Change-Id: I0d114186e630cc3696250006fa093c4c596eb40d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-04-06 12:18:34 +02:00
Timothée Keller
a81fa2047b Windeployqt: Simplify infix detection for --libinfix builds
Removed fetching the infix through the QtCore Module, since
it is already provided by qtpaths -query

Pick-to: 6.5
Change-Id: I844305fc66b21af094724dd3f516078447ee1dd2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-04-06 11:18:12 +01:00
Friedemann Kleint
aa6339594e Fix qdoc warning about missing QMultiMap code snippet
Bring back missing code snippet src_corelib_tools_qmultimap.cpp#19,
fixing:

qtbase/src/corelib/tools/qmultimap.qdoc:1007 Command '\snippet (//!
[19])' failed at end of file
'qtbase/src/corelib/doc/snippets/code/src_corelib_tools_qmultimap.cpp'

As a drive-by, use a more modern form, avoiding repeated invocation
of end().

Amends 3236b64db8.

Task-number: QTBUG-105109
Pick-to: 6.5 6.2
Change-Id: I09635eedd773ed16517773a9bf282b0386beba26
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-04-06 10:43:22 +02:00
Christian Ehrlicher
be8b3efae6 SQL/QSqlRelationalTableModel escape the auto-generated alias
The alias created by QSqlRelationTableModel to avoid duplicated field
names was not escaped which lead to an inconsistency in the returned
alias name from the database (e.g. postgres lowers all unescaped column
names).
Also adjust the test for QSqlRelationTableModel to use escaped table
names for it's tests and fix it for QIBASE.

Change-Id: I01426320c0c1a70cb9bf8e6dfa2f8b07dbb1c06b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-06 05:41:16 +01:00
Christian Ehrlicher
39fab09aad SQL/MySQL: add option MYSQL_OPT_TLS_VERSION & MYSQL_OPT_SSL_MODE
Add the two options MYSQL_OPT_TLS_VERSION and MYSQL_OPT_SSL_MODE to
properly support encrypted connections to MySQL 8.0 servers.
MYSQL_OPT_SSL_MODE will not work when compiled against the MariaDB
C-Connector since it's not supported by the MariaDB client.

[ChangeLog][QtSql][MySQL] Added the two new connect options
MYSQL_OPT_TLS_VERSION and MYSQL_OPT_SSL_MODE.

Fixes: QTBUG-84797
Change-Id: Iec7d682fc00072ce5b2a824c4ea00fca4575a93e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-06 04:41:15 +00:00
Volker Hilsheimer
27867de8ca Permissions: respect context object's thread and life time
When a context object is provided, then callers expect that the functor
or slot is executed in the thread of the context object. And if the
context object has been destroyed by the time the permission response
is received, the functor shouldn't be called at all.

To implement this, we either have to plumb the call back through a
signal/slot connection and benefit from QObject's infrastructure. This
is not practical here, as we don't have an "engine QObject" that would
emit a signal.

Instead, we can create a QMetaCallEvent explicitly, following what we do
in e.g. QHostInfo, and using a temporary QObject that handles the event
to then call the functor.

Add test coverage.

Pick-to: 6.5
Change-Id: Id878e45b304857304165ab4a7c6aae76fbee46ce
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-06 00:21:50 +02:00
Alexey Edelev
ef27cc126c Guard qopenglcontext_p.h with the QT_NO_OPENGL check
QtGui/private/qopenglcontext_p.h needs to be guarded to avoid
compilation errors when building Qt with openGL disabled.

Fixes: QTBUG-112656
Pick-to: 6.5
Change-Id: I21d120ed2bdb22e7aa2338e396a9a426adb80dbe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-05 21:30:29 +02:00