When calculating the header section size based on its contents when a
stylesheet is used, the size hints from the stylesheet are used. In case
if the stylesheet specifies only one of the sizes, the other is set to
-1. Because of this the actual content size is ignored.
The solution is to calculate the size based on the application style, in
case if it's not specified in the stylesheet.
Fixes: QTBUG-75615
Change-Id: I3453fa623d75b6b32832edf753de6e3e4e7f5a22
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
From macOS 10.15 and iOS 13 forward it's not possible to create font
descriptors for system fonts such as .AppleSystemUIFont based on the
family name.
This means we have to preserve the font descriptors we get from CoreText
for fallback fonts, so that we can populate them along with the family name.
Task-number: QTBUG-78821
Task-number: QTBUG-77467
Change-Id: Ifce01da65f90afb7dc2bc3005c3c5870b9c116de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This reverts the x86 F16 part of commit
9649c41ed9. Unfortunately, it is perfectly
valid to compile coe without F16C an link to a QtCore that was compiled
with it. That's the case in Clear Linux where there's
/usr/lib64/libQt5Core.so.5 and /usr/lib4/haswell/libQt5Core.so.5.
Change-Id: I907a43cd9a714da288a2fffd15baacace8331403
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
qmake.conf(25) incorrectly sets QMAKE_CFLAGS_DISABLE_LTCG to -Qno-ipo.
The correct form to disable IPO on Windows with ICC 18.x and 19.x should
be: -Qipo-. The implication is that the CONFIG feature in simd.prf (31)
modulating the compilation of specific ISA optimized sources now
successfully disables IPO on intel_icl when needed.
Fixes: QTBUG-78976
Change-Id: Id691f69b909d2bbba77402ff4f0b17b3b07ad6f3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
- Replaced the usages of the following deprecated APIs:
* QDesktopWidget::screenCount() -> QGuiApplication::screens().size()
* QDesktopWidget::screenGeometry(int) -> QGuiApplication::screens().at()
* QDesktopWidget::screenNumber(QPoint) -> QGuiApplication::screenAt(QPoint)
- Added notes for the QWidget *QDesktopWidget::screen(int), which
currently has no replacement.
- Fixed the tests to build conditionally, only when these APIs are
enabled.
Task-number: QTBUG-76491
Change-Id: I2fdec96d0a6a4fc782c53549b05a5556412b8305
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This gives the user the opportunity to employ BASH_ENV to circumvent
macOS System Integrity Protection and set variables like
DYLD_FRAMEWORK_PATH.
Fixes: QTBUG-57204
Change-Id: Icd99d903a3be76fabd509e204ea61a254a96609c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Always try to create the runtime directory and never change
the permissions of an existing directory. Conform to the
XDG Base Directory Specification:
"If, when attempting to write a file, the destination directory
is non-existent an attempt should be made to create it with
permission 0700. If the destination directory exists already
the permissions should not be changed."
Fixes: QTBUG-68338
Change-Id: Iaf854d69225fc46e43abae86232d749e5c247df0
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The Y coordinate needed to be reversed to produce expected results.
Fixes: QTBUG-69803
Change-Id: If349912cd078d17ce69d207c2ed35cf781c1a14d
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
A previous fix has caused a performance degradation while adding a
check for avoiding adding duplicated rectangles to the update list.
This patch fixes it by using a std::set instead of a QList, avoiding
duplication while using an O(log N) operation, instead of the O(N)
used before.
Fixes: QTBUG-77952
Change-Id: Ifa9fbf110e0bad60ee02a42d91281981fd98ceab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Only allow implicit conversions when the types involved are compatible.
That means, only allow construction and copy assignment when the type
X* is convertible to type T*. This is done using SFINAE and the
std::is_convertible type trait, which makes the previous
QSHAREDPOINTER_VERIFY_AUTO_CAST obsolete.
This patch fixes compilation when a function is overloaded with
Q{Shared,Weak}Pointer of different, incompatible types. Previously, this
resulted in a compilation error due to an ambiguous overload.
Change-Id: I069d22f3582e69842f14284d4f27827326597ca2
Fixes: QTBUG-75222
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When this was refactored in 3bc10fb9bb to use unique pointers, a move was
added before the connection, so it would essentially always try to connect a
nullptr.
Change-Id: Iab7fce88bc73afd78e6b63ffaef7358f3f4ce7e3
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
The childEvent handler sets the enabled property of children as they are
added to the groupbox, but applications might later enable children and
check/uncheck the groupbox's checkbox in undefined order. In that case,
we would end up with enabled children inside a conceptually disabled
groupbox (the groupbox's checkbox represents the logical "disabled"
state), which breaks documented QWidget::enabled rules.
To make sure that all children are disabled as per the state of the
groupbox, we need to run that logic once the UI has been set up, and
before it becomes visible. This is what polishing is for, so listen
for that event in addition and handle it the same way as adding (which
duplicates things, but keeps existing code that might depend on things
being updated as they are added working).
Adds the case to the existing enabledChildPropagation test case.
[ChangeLog][QWidget][QGroupBox] Always disable children of a checkable,
unchecked group box before showing.
Change-Id: I978bd27b6f1a3f54ec745faeea529a98d0d93619
Fixes: QTBUG-25938
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Pass the QWindow as context to QIcon::pixmap(), which
enables it to return high-dpi pixmaps when needed.
Fixes: QTBUG-74100
Change-Id: I4556f0a98df8b6ba65376778379a03eb8c470d00
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The evdev touch handler is thread based and calls
QWindowSystemInterface::handleTouchEvent. The global variable
in qwindowsysteminterface.cpp is used without being protected by mutexes
which causes data loss and crashes when multiple touch screens are used.
Fixes: QTBUG-63584
Change-Id: I8b5bb04cc517fab96ac428b2bd2bc128b2ca1a54
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Both the spline curves and (most of) the predefines curves are defined
as having start value 0.0 and end value 1.0. The spline and In/OutBack
functions would sometimes not produce that result precisely, so code
could not reliably depend on expressions like (easedValue < 1.0)
becoming false. Fix by explicitly handling endpoints.
Fixes: QTBUG-76781
Fixes: QTBUG-72630
Change-Id: I21be43af469a76c090154bffef8406a9baf2d0b1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
When we're flushing the backingstore to sub-views with their own layers
we don't want to pay the cost of uploading the whole backingstore to the
GPU in the case where we're dealing with a discrete GPU.
To work around this we make a copy of the appropriate part of the surfcace.
This results in additional copies of the data, and will need further
investigation to limit these.
Task-number: QTBUG-77447
Change-Id: I318ae80e433dd7b0a55fd5a598b19f114d8bd28e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The implementation of the default handler, [NSApp _handleAEQuit],
does a lot more than just terminating the application, including
sending NSWorkspaceWillPowerOffNotification if appropriate, and
deals appropriately with state restoration.
Change-Id: If725838fc0f40d09a0b8885eb3e7239499d8fea0
Fixes: QTBUG-18624
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Sending a message to a nil object returns nil, so there's no reason to
check the delegate before calling respondsToSelector, and we can use
the implicit _cmd argument to pass along the selector for the method
we're in.
For applicationShouldTerminate, if there's a reflection delegate but
it doesn't answer to applicationShouldTerminate it makes no sense to
skip our own logic.
Change-Id: Iafcd883a5c8cec1b35d2f95238de55eff060d71f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
when it's in 'ON' state ("inverted" color in 'Dark' appearance).
Number are rather arbitrary and extracted with 'Digital Color Meter'
app to make it look similar to the native panel (to be honest,
this tool button on a toolbar not to be found in many native apps,
they use different buttons anyway).
Fixes: QTBUG-71526
Change-Id: Ie61e60b77f097f04550006612e4aab6f11bb954b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
A default-constructed QDateTime is invalid, but compared equal to a
valid one referencing the start of 1970. This lead to date properties
in QML being initialized invalid but not getting an onChange if the
first value they're set to is the start of 1970.
Fixing that then lead to some tests failing. Indeed, the original
equality check involved using toMSecsSinceEpoch(), whose value is
undefined unless the datetime is valid, without a prior check on its
validity: so ensure all uses of toMSecsSinceEpoch() are guarded with
isValid() checks.
Reworked tst_QDateTime::toSecsSinceEpoch() to use its bool column
(previously unused, after separating from toTime_t(), which uses this
column for "out of time_t's range") for validity of the datetime.
[ChangeLog][QtCore][QDateTime] Invalid datetimes are now treated as
equal and less than all valid ones. They could previously be found
equal to valid datetimes.
Fixes: QTBUG-79006
Change-Id: Ie72deb8af4350a5e808144d0f6e42dc8eb3ff5ef
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Cleanup QtWidgets examples:
- use nullptr (clang-tidy)
- use member-initialization
- adjust the style
- fix includes
Change-Id: Ic5448606aacc525ea60b615a69227017aa2b821a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QWidget::mousePressEvent is documented to implement the closing of
popups if the widget is a popup. QAbstractScrollArea is one of the
QWidget subclasses that might be used as a popup as well, so instead of
just ignoring mousePressEvents, pass the event on to the QWidget
implementation for regular popup handling.
Change-Id: I05f77a334945f3c167f729f30bc022599230379b
Fixes: QTBUG-60885
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The snippet uses the Unix touch command, not qmake's touch function.
Change-Id: I71d1460447249b8941ce4bdbb494bb419e13b119
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Since Qt 5.3.0 we recommend that Linux distributions place a
SSE2-enabled copy of QtCore in a $PREFIX/lib/sse2 subdirectory (see Qt
5.3.0 changelog for details). Same for other hardware capabilities like
AVX2 and AVX512.
This use case was broken with the introduction of the 'relocatable'
feature, because the prefix is determined from the location of
libQt5Core.so and the relative path from libdir to prefix, which is
baked in at configure time.
We now try to locate the libdir below the prefix, and if that fails try
again in the upper directories.
Fixes: QTBUG-78948
Change-Id: Ieec6e1484974e19335cf08ae0df3ee5c0e316d28
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Clipboard retrieval sometimes fails due to the other application
having the clipboard locked. Retry opening the clipboard.
The choice of parameters is empirical, they have been observed
to prevent failures for MS Office applications at least.
Fixes: QTBUG-53979
Change-Id: Icbcaee149f0d377f33b222cdafbb2a21a7f1cf9d
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Add a comment for fixme comment added in
f1268d137e.
Change-Id: I08cd104442b13925be2aa5a48e64e391c9903099
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Widgets might be destroyed when handling a dragMoveEvent, in which case
the following code will operate on dangling pointers or null pointers.
Use a QPointer to watch for the original event receiver to disappear,
and add the necessary checks for the objects we deliver events to being
null.
Change-Id: I4ca2f182540ae21113f4bea4e5c569e983cc58bf
Fixes: QTBUG-78907
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
A certain geometry adjustment was (practically) introduced in Qt 5.11,
and caused very surprising behavior, where item widgets will often
overwrite neighbouring cells. This has resulted in a number of bug
reports. Since the adjustment has such serious side effects, and does
not seem to be relevant any longer for the issue for which it was
intended, remove it here.
More details: From early Qt 4 times, QStyledItemDelegate would do some
automatic expansion of the geometry of editor widgets - but only if
the layout was RightToLeft. Hence, the effect of it was rarely
seen. QTBUG-37433 did, for Qt 5.10, and complained about it. However,
the resulting code change did not remove the adjustment, but instead
extended it to apply to the normal LeftToRight layout also. Hence,
more users experienced it, and reported it as a regression.
Also, now in Qt 5.13, it seems Qt has changed in other ways, and the
geometry adjustment no longer seems to help (or indeed make any
difference to) the original case in QTBUG-37433.
Fixes: QTBUG-78495
Fixes: QTBUG-76011
Fixes: QTBUG-68476
Change-Id: I4a4e873969eb1d89843f98fc63d90371207515d1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
qmake build fails:
qrandom.o: in function `QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*)':
/home/tjmaciei/src/qt/qt5/qtbase/src/corelib/global/qrandom.cpp:333: undefined reference to `qRandomCpu(void*, long long)'
Fixes: QTBUG-78937
Change-Id: Ib5d667bf77a740c28d2efffd15cb4236f765917c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The xcb platform plugin uses this category for detailed input event
logging, so we might as well be consistent in evdevtouch. When hardware
supports pressure sensing, it's likely to need extra debugging.
Task-number: QTBUG-77142
Change-Id: I7682bb5d49e669054523f9cf556715e511bcd572
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
that was accidentally introduced this week.
Change-Id: I0731c7c64e51b40f230b42694603056d89a05712
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
There is no onscreen support for WinRT in the D3D11 backend yet.
However, offscreen operations (rendering into a texture) should work.
One catch is that there is no D3DCompile available for deployed WinRT
apps. So ship the intermediate format (DXBC output from fxc) in the
.qsb files.
Change-Id: Ic0aba4b817c27d13dcf3af41bf7612d799382655
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When the source size is not explicitly specified, we take the entire
subresource. However, just using the texture's size is wrong: when the
source level in a copy or readback is not 0, the size for the corresponding
mip level has to be used instead.
This fixes occasional crashes with Metal in the autotest.
Change-Id: I99f689feef93ec86dffdc9e82d6bfdaf5c1eb041
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Also improve (docs and runtime checks) and test the minimum set
of required data to create a graphics pipeline.
Task-number: QTBUG-78971
Change-Id: If5c14f1ab1ff3cf70f168fde585f05fc9d28ec91
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The joys of "level - Specifies the mipmap level of the texture
image to be attached, which must be 0." for glFramebufferTexture2D
in OpenGL ES 2.0.
Change-Id: Iaf19502f48d7ba73b26abb72535bfa6696a1e182
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Use only APIs that are in GLES 3.0.
glMapBuffer() is an old OES extension, stop bothering with that.
Not the least because ANGLE claims supporting it and then fails the
map. (not that we care much about ANGLE, but, for instance, the qrhi
autotest is run with ANGLE configurations as well in the CI, so have
to still take care of it for the duration of Qt 5.x)
Change-Id: I29140402cedffe0430f920ee0c061673257c3aa1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>