droparea.h has been removed. Remove all code that depends on that header
except the one snippet that is still used. Add minimal code to allow
the snippet to be compiled.
Done-with: Nico Vertriest <nico.vertriest@qt.io>
Task-number: QTBUG-81486
Change-Id: I58c80d3527c82389ccff97567f4c75c33aec0f5e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
When a signal/slot connection is activated, a lock on the receiver
object is taken (to be sure it doesn't get destroyed).
The path for blocking queued connections however took the lock on
the sender by accident, fix that.
Pick-to: 5.15 5.12
Change-Id: I8cd938a50eca2bf71e7bfb86768ee0c8431afdfa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We need to add these two classes at the same time, because
QAnyStringView makes all QUtf8StringView relational operators moot. We
might want to add some later, esp. for UTF-8/UTf-8 comparisons, to
avoid the pessimization that we can't early-out on size() mismatch in
QAnyStringView equality operators, but that's an optimization, not a
correctness issue, and can be fixed in a source-compatible way even
after Qt 6 is released.
To deal with the char8_t problem in C++20, make QUtf8StringView a
class template out of which two UTF-8 views can be instantiated: the
Qt 7 version, which depends on C++20 char8_t as value_type, and the Qt
6 version where value_type is a char. Use inline namespaces to map the
QUtf8StringView identifier to one or the other, depending on the C++
version used to compile the user code. The inline namespace names must
needs be a bit ugly, as their inline'ness depends on __cpp_char8_t. If
we simply used q_v1/q_v2 we'd be blocking these names for Qt inline
namespaces forever, because it's likely that inline'ness of other
users of inline namespaces in Qt depends on things other than
__cpp_char8_t. While inline'ness of namespaces is, theoretically
speaking, a compile-time-only property, at least Clang warns about
mixed use of inline on a given namespace, so we need to bite the
bullet here. This is also the reason for the QT_BEGIN_..._NAMESPACE
macros: GCC is ok with the first declaration making a namespace
inline, while Clang warns upon re-opening an inline namespace as a
non-inline one.
[ChangeLog][QtCore][QUtf8StringView] New class.
[ChangeLog][QtCore][QAnyStringView] New class.
Change-Id: Ia7179760fca0e0b67d52f5accb0a62e389b17913
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
High-DPI pixmaps are always enabled, and cannot be disabled.
Change-Id: I01a006b404e5431582b64ef812974c1c022b39ae
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Since 5.0: assignment/construction from QObject pointer
Since 5.14: data() to recover the packaged pointer
Change-Id: I5d6ab561ce39bc0d9d3e5035eb2ca38139cd76b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The project isn't included as a subdir of the parent because
the project file name doesn't follow proper convention. Fix
by renaming the project file.
Task-number: QTBUG-81486
Change-Id: Ie32aaa587cdaa6802644588d6631b14e61558ae2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Content for the deprecated SAX interface was removed, remove rest of
the linking as well.
Pick-to: 5.15
Change-Id: Idd233a821139837b779e551aeba914114500e39e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
We want a suitable alignment to hold a double even on
32bit systems.
Change-Id: I35145ded9320c147d4fcd7a04c4b3630912cc00a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com>
In core profile contexts a line width other than 1 may not work
as expected since it is deprecated in the core profile.
Change-Id: I3fc33cf90c65156aa87d04f08518c9ddcfb62625
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The silly fine-grained enabling of features on the VkDevice
seems to be ignored in practice by the implementations, but
wideLines becomes relevant because the validation layers warns
if a line width is set on the pipeline without enabling the feature
on the device. So to play nice, enable the features we care about.
Change-Id: I0c64a0d10a8279fe43d899118b0d6f0e4f875d41
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
By default, only the legacy family names are populated on Windows,
since we are using GDI to do the population.
The actual typographic names are added later as aliases when
the font is loaded.
This can cause us to fail matching a font against its typographic
name before it has been loaded and e.g .in Qt Quick we will cache
the glyph indexes for a fallback font instead. If the font is later
loaded and aliases are populated, we will use the cached glyph
indexes and get seemingly random glyphs displayed.
We reuse the mechanism invented for CoreText to do lazy population
of aliases. The population will now happen when the first non-match
occurs, and a second attempt will be made after we populate aliases.
[ChangeLog][Windows] Fixes an issue where fonts would sometimes not
fail to work when selected using typographic names.
Fixes: QTBUG-84786
Pick-to: 5.15
Change-Id: Ic7b65cde26ddcbf1a257f1673b9af37154660c2f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Display QCompoBox popups on the correct screen, also
when the parent window spans multiple screens. In this
case, QWidget::screen() will return the main screen for the
window, which will not necessarily be the screen at
the combobox popup position.
Change-Id: Ib8a8163a757f7b849883b833fbde27a1e01af49a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Currently when copying from an item view, only QString value types are
considered. This severely limits the usefulness of the feature as it
does not even allow to copy number nor dates that can be translated to
text.
This merge request changes that by checking if the content being copied
can be converted to a string rather that just being a string. This will
also allow for custom types to be handled.
Fixes: QTBUG-86166
Pick-to: 5.15
Change-Id: If57c986ef5831d59eeb59f9c4b900fa126ec31ea
Reviewed-by: David Faure <david.faure@kdab.com>
Address ### Qt 6 comment; the information is already stored in the
state variable, using the QStyle::State_Horizontal bit.
Change-Id: I61d143ba057776f9d622793a0592b5dd4726f25d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We shouldn't expose it inline in the header file.
Change-Id: I400d805fd0769f788f257bbf78311fe1fb56df79
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Allow comparing variants of different types, if both types
are pointers to related objects.
Amends change 4a69cd7f72
Change-Id: Ib52b17781b0b7f60cfd5da42fce733faacfa0ae8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The Unicode table code can only be safely called on valid code-points.
So code that calls it must only pass it valid Unicode data. The string
iterator's Unchecked Unchecked methods only provide this guarantee
when the string being iterated is guaranteed to be valid UTF-16; while
client code should only use QString, QStringView and friends on valid
UTF-16 data, we have no way to be sure they have respected that.
So take the few extra cycles to actually check validity in the course
of iterating strings, when the resulting code-points are to be passed
to the Unicode table look-ups. Add tests that case mapping doesn't
access Unicode tables out of range (it'll trigger the new assertion).
Added some comments to qchar.h that helped me understand surrogates.
Change-Id: Iec2c3106bf1a875bdaa1d622f6cf94d7007e281e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>