Commit Graph

64008 Commits

Author SHA1 Message Date
Thiago Macieira
36805fc3c4 QLogging: call a non-exported message-formatting function
Instead of the exported qFormatLogMessage() that users can use. Because
it's a local symbol (static function), neither dladdr() nor
backtrace_symbols() functions should be able to see them, making their
exclusion from the list a simpler check.

This doesn't apply when the user calls qFormatLogMessage() in their own
handler, unless the compiler either inlines or tail-calls the new,
internal function. The latter case is very likely.

Change-Id: Ifa1111900d6945ea8e05fffd177e187f55512725
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-10-24 04:04:19 -07:00
Thiago Macieira
232f4f14be QMessagePattern: use the system message sinks for parsing errors
Instead of only printing to stderr or the Windows debug buffer. I guess
this wasn't done before because the code could recurse back and cause
stack overflows. We can do it now without recursion problems.

Change-Id: Ifa1111900d6945ea8e05fffd177e14e2f86ae482
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-10-24 04:04:19 -07:00
Thiago Macieira
e85c64bb6d QLogging: use stderr_message_handler() if we fail to grab the handler
Instead of duplicating its stderr handling.

Change-Id: Ifa1111900d6945ea8e05fffd177e149dfa9afff9
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2023-10-24 04:04:19 -07:00
Thiago Macieira
d614067ea0 QLogging: deduplicate the calls to qFormatLogMessage()
Lift it up from inside of each of the message sinks and instead perform
the formatting in qDefaultMessageHandler(). This necessitated having a
trait indicating whether the sink takes formatted output or not
(currently, only the Apple backend is unformatted).

Change-Id: Ifa1111900d6945ea8e05fffd177e155db9a599cc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-10-24 04:04:19 -07:00
Thiago Macieira
039ea9b40f QLogging: simplify qDefaultMessageHandler() with a global constant
Namely, a function pointer to the actual sink function.

This doesn't remove the future ability to iterate over multiple sinks,
but I removed the comment anyway because it doesn't look like we'll ever
implement that.

Change-Id: Ifa1111900d6945ea8e05fffd177de7fa46230259
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2023-10-24 04:04:19 -07:00
Kai Uwe Broulik
a668ed44dc QtDBus: Use explicitly meta type name instead of method type
In Qt 6, QMetaType sees the underlying type the compiler knows,
so a "using VariantMapMap = QMap<QString, QVariantMap>" typedef
will fail to match a signature of VariantMapMap to QMap<...>
because qDBusParametersForMethod looks for the method type name
whose QMetaType::fromName lookup will fail later.

Pick-to: 6.6 6.5
Change-Id: I142dc42ca86aa8a96f73424ec5da5780f2c1e6a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-23 21:58:23 +02:00
Amir Masoud Abdol
d7d144b530 Revert "Make sure that pkgconf can find HarfBuzz"
This reverts commit 885d87488a.

Reason for revert: Issue was caused by a faulty `.pc` file which was reported to upstream, in addition, the patch might not be effective in certain cases as tested by the reporter. See the bug report for further information.

Change-Id: I2b75a79f47b77a660bd23cd41df40df9ea4baef2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-10-23 19:41:20 +00:00
Tor Arne Vestbø
92194ac571 Unify QDialog WA_WState_ExplicitShowHide handling
Instead of checking it inside QDialogPrivate::setVisible and its
overrides, we can check it in QDialog::setVisible, up front.

The logic in QDialogPrivate::setVisible related to modality that
was executed prior to the WA_WState_ExplicitShowHide is now skipped
in the case the WA_WState_ExplicitShowHide condition hits, but this
makes sense as the modality logic has a second part at the end
of the function, restoring the modality, and this part was never
executed as the code was prior to this change.

Change-Id: I9580e91dbc5a981c83538d765b86138afee44f14
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-10-23 19:42:46 +02:00
Lucie Gérard
c0f13eeb99 Modify copyright format in qt_attribution.json
Multiline copyright entries are entered via string array.

Task-number: QTBUG-111873
Pick-to: 6.5 6.6
Change-Id: Ib8203163db8d5d579117f402b7a89b59ae1a5169
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-10-23 17:42:45 +00:00
Volker Hilsheimer
89f0f34db5 tst_QSslSocket: Remove compile-time #ifdef check
Since we use runtime plugins now and the test doesn't use any
symbols from openssl

Amends 486b1aec16

Pick-to: 6.6 6.5
Change-Id: Ib66d1ca15835c41fe138c7830ce3edd0bdce0d5f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-10-23 18:00:52 +02:00
Edward Welbourne
51cfc973b3 Add a QDateTimeEdit::timeZone property
This shall ultimately replace its timeSpec property, which had already
been turned into a derived property of an internal timezone.

[ChangeLog][QWidget][QDateTimeEdit] Added timeZone property to enable
a datetime edit widget to control the timezone used. This makes the
timeSpec property redundant; this old property shall be deprecated
from 6.10.

Fixes: QTBUG-80417
Change-Id: I3cdb686bd2dada0e5067f5b4c1828b73892e424a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-10-23 18:00:52 +02:00
Volker Hilsheimer
b7e0f45a85 JNI: simplify code for declared types a bit
Template type is implied, and forwarding to QJniObject implementations
avoids code duplication.

Change-Id: I7c25c93a7fdf20de7a4c61129d9383f0f6f508c7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-23 15:10:28 +02:00
Volker Hilsheimer
72ad419116 JNI: Fix reference leak in QJniArray
When the array type is QJniObject or a subclass, then we need to
explicitly release the local reference returned by GetObjectArrayElement
in the QJniArray::at implementation. Do this by constructing the
QJniObject via fromLocalRef, which does exactly that.
Amends 80d4d55e25.

Add a test case that stresses the local reference pool, and fix the old
test case (which operates on a QJniArray<jobject>) to also release the
local references.

Change-Id: Ie293b1db9f1b6825376bbf12338b22dfc3f8c6e9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-23 15:10:28 +02:00
Øystein Heskestad
fd48ce0b73 Add support for containers > 4 Gi elements in QDataStream
The format is changed from 6.7 to support more than UINT32_MAX - 1
elements. The format used to have a quint32 size. Now if the size is
larger or equal to 0xfffffffe (2^32 -2) the old size is an extend
value 0xfffffffe followed by one quint64 with the actual value. The
32 bit size with all bits set is still used as null value.

Fixes: QTBUG-105034
Change-Id: I62188be170fe779022ad58ab84a54b1eaf46e5d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-23 15:10:28 +02:00
Laszlo Agocs
0d413506a1 Skip Vulkan on Android in QRhi autotest
Fixes: QTBUG-118220
Change-Id: I78b4b8b85f316f087ab7a01c1ee0c4fad46c632a
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-23 12:33:56 +00:00
Giuseppe D'Angelo
4b0d41448f Remove one more QAtomicInt copy operation
This time, `auto` accidentally copied an atomic instead of making a
local non-atomic copy.

Change-Id: I3c6569f6ea1762e7102e1425346aba6d82bf2b00
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-10-23 11:52:26 +02:00
Giuseppe D'Angelo
bb23a05905 QWeakPointer: deprecate its relational operators
They're fundamentally broken and should never ever be used.

* op==(weak, weak) is heterogeneous, but at the same time it's
  unconstrained (!), may trigger UB (!) by doing a static_cast to a
  type which isn't the actual type of the pointee, and may outright
  crash (!) if the pointee has been deleted and there's virtual
  inheritance.

* op==(weak, strong) compares the control blocks, i.e. does
  "owner_equal" comparison, not pointer comparison. Now QSP doesn't
  have support for aliasing, so the pointers stored by the smart
  pointers themselves always point at the owner object.
  Yet: given a QSharedPointer<T> that is the last owning pointer to T
  and a QWeakPointer<T> that tracks it, if one resets the shared
  pointer, then op==(wp, sp) will yield false (wp still points to the
  control block, sp does not), but op==(wp.lock(), sp)  will yield
  true (both shared pointers are null). That doesn't make any sense.

I'm leaving op==(wp, std::nullptr_t) in as a shorthand to check if the
weak pointer is expired, but might deprecate that as well in a future
commit.

[ChangeLog][QtCore][QWeakPointer] The (in)equality operators of
QWeakPointer have been deprecated. Always upgrade a QWeakPointer to a
QSharedPointer (for instance, via lock()) before doing a comparison.

Change-Id: Ia2f5f5e9e5558e1558b6084542532515c80b78b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-22 18:58:43 +02:00
Ahmad Samir
f2e19d37de QStringList: add lastIndexOf() overloads
[ChangeLog][QtCore][QStringList] Added lastIndexOf() overloads that take
a QString/QStringView/QLatin1StringView and a Qt::CaseSenitivity
parameters. Prior to this calling lastIndexOf() would call the methods
inherited from the base class. This change is source compatible and
existing code should continue to work.

Task-number: QTBUG-116918
Change-Id: Ia50c884c00021bf581c23c12e0e0c22700dae446
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-22 14:37:57 +03:00
Ahmad Samir
c205f05128 QStringList: add filter(QL1SV) overload
[ChangeLog][QtCore][QStringList] Added filter(QLatin1StringView)
overload, which is more optimized when searching for a Latin-1 string
literal as no conversion to QString is necessary.

Task-number: QTBUG-116918
Change-Id: Ieb92f4cfd545b070258dbc5c701ddfb2e6f3fc64
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-22 14:37:52 +03:00
Ahmad Samir
3dffd5aa0b QStringList: add indexOf() QString/QStringView/QL1SV overloads
[ChangeLog][QtCore][QStringList] Added indexOf() overloads that take
QString/QStringView/QLatin1StringView, and a Qt::CaseSensitivity
parameter. Prior to this using QStringList::indexOf() called the methods
inherited from the base class.

Task-number: QTBUG-116918
Change-Id: Ibc42130b6509f6ecfe7de0d6be378f226ae61982
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-22 14:37:47 +03:00
Ahmad Samir
a6ad755734 QStringList: add filter(QStringMatcher) overload
Now that users can pass a QStringMatcher to do the matching, change the
existing overload to not use QStringMatcher.

Thanks to Giuseppe D'Angelo for the idea of passing a QStringMatcher to
filter instead of using a magic number to decide whether to use
QStringMatcher or not.

Results of running filter() and filter_stringMatcher, times are in msecs
and this was compiled with gcc -O3:

              Without       With QStringMatcher
list10        0.00022       0.000089
list20        0.00040       0.00014
list30        0.00058       0.00018
list40        0.000770      0.00023
list50        0.00094       0.00027
list70        0.0012        0.00037
list80        0.0014        0.00041
list100       0.0018        0.00050
list300       0.0054        0.0014
list500       0.0091        0.0023
list700       0.012         0.0032
list900       0.016         0.0041
list10000     0.17          0.045

Drive-by change: optimize tst_QStringList::populateList().

[ChangeLog][QtCore][QStringList] Added filter(const QStringMatcher &)
overload, which may be faster for large lists and/or lists with very
long strings.

[ChangeLog][Possible Performance Changes][QtCore][QStringList] Changed
the implementation of filter(QStringView) overload to not use
QStringMatcher by default. Using QStringMatcher adds overhead, so it is
beneficial/faster when searching for a pattern in large lists and/or
lists with long strings, otherwise using plain string comparison is
faster. If using QStringMatcher makes a difference in your code, you can
use the newly added filter(QStringMatcher) overload.

Change-Id: I7bb1262706d673f0ce0d9b7699f03c995ce28677
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-22 14:37:33 +03:00
Thiago Macieira
feb67bbdd2 QStorageInfo/Unix: exclude invalid volumes from mountedVolumes()
Invalid are usually those mounted on a filesystem we can't access:

$ df /run/user/0/gvfs
df: /run/user/0/gvfs: Permission denied
$ ./qstorageinfo /run/user/0/gvfs
Could not get info on /run/user/0/gvfs

df already doesn't include it by default:

$ df | grep -c gvfs
0

But we were:

$./qstorageinfo | sed -n '1p;/gvfs/p'
Filesystem (Type)                        Size  Available BSize  Label   Mounted on
gvfsd-fuse (fuse.gvfsd-fuse)    RW          0          0     0          /run/user/0/gvfs

Note also how this is showing a total size of 0, which is usually the
type of filesystem we exclude. It's actually -1 but got rounded down to
0 when we divided by 1024.

Pick-to: 6.6
Change-Id: I8f3ce163ccc5408cac39fffd178d7e4f9dc13b24
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-10-21 15:21:39 -07:00
Thiago Macieira
39843b65f4 QStorageInfo/Linux: decode the names encoded by udev in-place
This function is only called with the name of a file coming from
QFileInfo::fileName() so it's usually already detached anyway. And if
there's nothing to decode, pass the string through without even
attempting to modify it.

Pick-to: 6.6
Change-Id: I9d43e5b91eb142d6945cfffd1787651437074d35
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-10-21 15:21:30 -07:00
Thiago Macieira
4107e4d8ca QStorageInfo/Linux: avoid parsing /dev/disks/by-label for every entry
Instead, create a (flat) map of the entries that we can seek on while
creating the list of mountedVolumes(). On my machine, that went down
from 14 times to 1.

Pick-to: 6.6
Change-Id: I9d43e5b91eb142d6945cfffd17875458541f28f9
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-10-21 15:21:27 -07:00
Thiago Macieira
3e330a79ec QStorageInfo/Linux: rewrite the label retriever to use device IDs
Instead of the previous realpath() comparison resulting from the symlink
processing. parseMountInfo() was extracting the device number from
/proc, so this information was already readily available.

We must take care of anonymous block devices (major == 0). Certain
filesystems, such as btrfs, always use them, so we must still stat() the
device path to get the real block device.

This implementation assumes that udev only creates entries in the
/dev/disks/by-label directory that are symlinks to real devices, but
that must already be the case because they are in /dev in the first
place. An alternative implementation would be to compare the inode and
host device (st_dev) of the entry, if different /dev entries could have
different labels. I don't think that's possible. But multiple /dev
entries for the same device is definitely possible.

Pick-to: 6.6
Change-Id: I9d43e5b91eb142d6945cfffd1787552af3d09676
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-10-21 15:21:24 -07:00
Thiago Macieira
ddc39eb3a4 QStorageInfo/Linux: fix mountedVolumes() for paths mounted over
This fixes a similar problem as the previous commit. Because Linux
allows one to mount over non-empty paths, it's possible to make
mountpoints unreachable, and yet they will still be present in the
/proc/self/mountinfo listing. Because we have the device ID from the
scan, we can confirm that the mountpoint matches the MountInfo.

 # mkdir -p /tmp/foo/bar
 # mount -t tmpfs /tmp/foo/bar
 # mount -t tmpfs -o size=1M /tmp/foo
 # mkdir /tmp/foo/bar
 $ ./tests/manual/qstorageinfo/qstorageinfo | awk 'NR==1 || /tmp\/foo/'
Filesystem (Type)                        Size  Available BSize  Label                           Mounted on
tmpfs                           RW       1024       1024  4096                                  /tmp/foo

Change-Id: I79e700614d034281bf55fffd178f8b99b10a8b69
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-10-21 15:21:23 -07:00
Thiago Macieira
1cd6c6c69e QStorageInfo/Linux: fix setPath() for paths mounted over
Linux allows admins to mount new filesystems over non-empty paths
(though I managed to do so on FreeBSD and macOS too), so we must find
the most recent mount that applies to this path instead of the longest
matching mountpoint. We do that by scanning the /proc/self/mountinfo
list backwards and thus any matching isParentOf() must be the correct
one.

 # mkdir -p /tmp/foo/bar
 # mount -t tmpfs tmpfs /tmp/foo/bar
 # mount -t tmpfs -o size=1M tmpfs /tmp/foo
 $ ./tests/manual/qstorageinfo/qstorageinfo /tmp/foo/bar
 Filesystem (Type)                  Size  Available BSize  Label                Mounted on
 tmpfs                     RW       1024       1024  4096                       /tmp/foo

But we must guard against an earlier mount still being (somehow)
accessible. We've seen this in the CI, where /run is earlier than / but
still somehow accessible -- I guess this is one or a pair of mount
--move.

An additional benefit is that don't even attempt to compare to the
virtual filesystems mounted by the system early after boot, if what
we're looking for isn't the root.

See next commit for a fix for QStorageInfo::mountedVolumes().

Change-Id: I79e700614d034281bf55fffd178f8befc5e80edb
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-10-21 15:21:21 -07:00
Thiago Macieira
9df2b7ffa4 tst_QStorageInfo: make storageList() test table-driven
Otherwise we have no way of knowing which QStorageInfo entry was being
tested.

Previous:
FAIL!  : tst_QStorageInfo::storageList() 'other.isValid()' returned FALSE. ()

Now:
FAIL!  : tst_QStorageInfo::storageList(/run/user/0/gvfs) 'other.isValid()' returned FALSE. ()

Change-Id: I8f3ce163ccc5408cac39fffd178d786e596ece81
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-10-21 15:21:19 -07:00
Tor Arne Vestbø
70d7c6a937 Avoid creating child windows twice when already visible
When a child window is made visible without its parent having been
created yet, we defer creating and making the child visible until
the parent is created.

But if a child window is explicitly created, we create the parent
first. And creating the parent will in turn apply visibility to
all children that had their visibility deferred. Which includes
creating the child.

This results in child -> parent -> child creation recursion,
which means that when we return from creating the parent window
we already have a platform window for our child, and should
bail out.

Pick-to: 6.6 6.5
Change-Id: I11dc4864b57f031de2cca70b79cdfc057d4fbd0d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-21 19:23:12 +02:00
Ahmad Samir
341854a4f3 QStringMatcher: add a method that returns a string view of the pattern
The existing pattern() method always returns a QString, which means that
if the matcher was constructed using a QStringView, pattern() would
uncoditionally convert it to a QString.

This is useful to check if a match is exact:
auto pattern = matcher.patternView();
if (pattern.size() == needle.size() && matcher.indexIn(needle) == 0)
    ....

This may be needed for a later change in QStringList::contains();
regardless of that, this change makes sense on its own.

Change-Id: I49018551dd22a8f88cf6b9f878a5166902a26f58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-21 16:50:16 +03:00
Ahmad Samir
90532e0b01 QFSFileEngine: minor code clarification
Change-Id: I44f30f827cdb8e841a43ac911327286db051a725
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-10-21 16:50:14 +03:00
Ahmad Samir
e8909dcfd0 QSystemError: pass errno when calling stdString()
errno should be queried immediately after a libc function call fails,
calling it later on in QSystemError::stdString() may be too late.

Part of the goal of this, and similar, changes is removing the default
value of the stdString() method's parameter, to signify to users of that
method that errno should be stored ASAP if there is an error.

If there is any intervening code that may call a system/libc function
store errno in a local int var, otherwise use it directly in the
QSystemError::stdString() call, which takes by value.

Task-number: QTBUG-115199
Change-Id: If3f601a023ed0014e260089771220668dad88be8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-10-21 16:50:10 +03:00
Giuseppe D'Angelo
313421a73b Apple event dispatcher: fix a last atomic assignment
Amends 1399b3ccce -- this one just slipped through the cracks.

Change-Id: I72c6c93b85cc609546fbd2af7c9a80f3ac360ee2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-10-21 10:56:11 +00:00
Tasuku Suzuki
85d21cec30 Fix build with -no-feature-abstractbutton
Task-number: QTBUG-117698
Change-Id: I0ff494d680626301267e9d415f7fd161366a3932
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-10-21 01:20:30 +00:00
Eirik Aavitsland
071291a0d4 Update bundled libjpeg-turbo to version 3.0.1
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 3.0.1

Fixes: QTBUG-117804
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ia6cdb02eb9c590fe024bdf75566976756c6e13c6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-10-21 02:18:37 +02:00
Thiago Macieira
0cd2158533 qt_safe_poll: round up when converting to milliseconds for poll(2)
When running on operating systems that don't offer modern APIs, we need
to round up to ensure we don't under-sleep and wake up before the timers
actually expire. In most cases, this is not a big deal because we'd go
right back to sleep and then wake up again.

The problem is that this new sleep would be for a duration of 0
milliseconds, so we'd end up busy-waiting until the timers do expire.
It's for less than 1 ms, but it's still power-consuming.

It's also perceptible when someone uses processEvents(), because we
could end up saying we didn't process anything, despite waiting for more
events. Since that violates the guiding rule for processEvents() (don't
ever use it), I don't consider this a big deal.

Fixes: QTBUG-118199
Pick-to: 6.5 6.6
Change-Id: I79e700614d034281bf55fffd178f0611be96bfa7
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-10-20 17:18:37 -07:00
Mårten Nordheim
ef76bd02a6 Remove Qt_6_PRIVATE_API ELF from a symbol used by ~QNetworkDatagram
As in 0f0371c830.

Pick-to: 6.6
Fixes: QTBUG-118229
Change-Id: Ie05c213ceb694413194826e4e119f3fb9ff1f1e8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-21 02:18:37 +02:00
Christian Ehrlicher
01eb95acf0 QCommonStyle: simplify removeAnimation
Simplify removeAnimation by directly passing the pointer to remove to
the function instead trying to figure them out later on and relying on
QObject::sender().

Change-Id: I9de3a138c60b0da8dd1ab23fe8521798b7f4c13c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-10-21 01:14:52 +02:00
Christian Ehrlicher
4d9d66d7a8 QCommonStyle: use pmf-style connect
Use pmf-style connect in QCommonStyle and remove the unused function
animationTargets() as a drive-by

Change-Id: I60e361ab00429a95eeab8799743996cea3f1469a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-10-21 01:14:51 +02:00
Christian Ehrlicher
af5d0b0f0c QStyleSheetStyle: use pmf-style connect
Use pmf-style connect in QStyleSheetStyle. styles subdir is now
old-style connection free.

Change-Id: I926ff308a823212b0512328b96dd6779d6cb30fa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-10-21 01:14:51 +02:00
Christian Ehrlicher
be8607d5de QFusionStyle: don't use xpm files for standardIcon()/Pixmap()
Don't use pixelated xpm files for SP_TitleBarNormal/Min/CloseButton -
use the high-res icons from QCommonStyle instead.

Task-number: QTBUG-118122
Change-Id: Ie187eac29b75084abf9151a0f6921b1276be1419
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-10-21 01:14:51 +02:00
Christian Ehrlicher
e0395cdbf7 QFusionStyle: remove dead code from drawItemText()
The !enabled branch does nothing so it can be safely removed. Also
remove the unneeded documentation since it's a simple reimplementation
from the base class.

Change-Id: Iea6e77ab42b09a30f73ae2f1f671eb4198a31c41
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-10-21 01:14:51 +02:00
Volker Hilsheimer
f1c2a24255 JNI: clean up QJniEnvironment a bit
Remove superfluous explicit function prototypes in documentation, and
remove the unused QJniScopedLocalRefPrivate specialization of
QScopedPointer<_jobject>.

Change-Id: I6407522746bc9756cdaceea8e0e0a32d0830eeee
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-21 00:55:04 +02:00
Volker Hilsheimer
8cf199077f JNI: make converting QJniArray constructors explicit
Amend 80d4d55e25. It should not be
possible to convert a QJniArray<jobject> to e.g. a QJniArray<jstring>,
so SFINAE out any construction that would convert between unconvertible
element types. To prevent the fall-back to constructing from QJniObject,
make those constructors explicit, which they should have been anyway.

Change-Id: I17fd9dfcea425a7bfa34d7bef736bab2be42a536
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-21 00:55:03 +02:00
Volker Hilsheimer
66b5803ab9 Adapt QRawFont to use QFont::Tag
Add an overload for fontTable (we can't deprecate the const char *
overload as it will be used for string literals, even if the tag-
overload would work), and use the tag type in the test instead of
QByteArray.

Task-number: QTBUG-117046
Change-Id: I104f11a25e9c453a5d1081b6cf320bdc186b7e80
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-10-20 21:37:15 +02:00
Volker Hilsheimer
19bc5de296 Remove obsolete font tag helpers and \preliminary tag from documentation
Fixes: QTBUG-117046
Change-Id: I7e68298ba1c52bea9bdc2fca0c1f082df76d952e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-10-20 21:37:11 +02:00
Volker Hilsheimer
61ceff89f7 Replace MAKE_TAG macro with QFont::Tag
Task-number: QTBUG-117046
Change-Id: I26e0af634fed87199bb49d57e3aa3f4e3fea0e39
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-10-20 21:37:02 +02:00
Volker Hilsheimer
eb02561f58 Use QFont::Tag in the Windows font database implementation
Replace the local MAKE_TAG macro definition with QFont::Tag's support
conversions to and from big endian byte ordering.

Also replace the incorrect usage of the big-endian-producing MAKE_TAG
macro in the DirectWrite implementation. The IDWriteFontFace
documentation suggests to use the DWRITE_MAKE_OPENTYPE_TAG macro for
producting the tag, which is equivalent to the LittleEndian
implementation of QFont::Tag::value.

Task-number: QTBUG-117046
Change-Id: I1e522c1c6006b8bcf66110bd74a36a42ed28f7e4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-10-20 21:36:59 +02:00
Volker Hilsheimer
bde443801f QFont: add a tag type for features and other advanced properties
Instead of overloads and generic string literals with runtime checks,
use a dedicated Tag type for specifying the font feature. The Tag type
can only be instantiated with a string literal of exactly 4 characters
(plus the terminating null)l; longer or shorter literals result in a
compile time error.

Constructing a Tag from any other string type is possible through the
named fromString constructor, in which case we can only check the length
and warn at runtime.

The type's API is almost completely constexpr so that we can use it to
calculate e.g. enum values.

Task-number: QTBUG-117046
Change-Id: I31038c7c6fd2b843a105b032f021e506b0b60822
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-10-20 21:36:52 +02:00
Mårten Nordheim
fa8943640c Schannel: Enable ALPN for some mingw configurations
... by checking if SECBUFFER_APPLICATION_PROTOCOLS is defined.
In this case, we assume that the current environment supports ALPN.
Then we no longer do a blanket block for all mingw configurations.

Pick-to: 6.6
Change-Id: I2eedb813a5bdc3b1a5097053b04aa45d25d175aa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-10-20 18:08:20 +00:00