Commit Graph

64351 Commits

Author SHA1 Message Date
Matthias Rauter
304eca394a Draw ItemViewItem icon after the background in QStyleSheetStyle
Fixes: QTBUG-118870
Pick-to: 6.5 6.6
Change-Id: I8aad9aa3b4e7e92e96039313bda3e80281523594
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-10 20:02:14 +01:00
Mårten Nordheim
52b6258ec8 Fix compilation with MSVC 17.8
stdext is deprecated, slated for removal.

The macros were used to work around a compiler warning generated
when using the 3-arg overload of certain STL algorithms even when
the 4-arg version (added in C++14) was not available.

These deprecation warnings seem to have been discontinued as of
  MSVC++ 14.15 _MSC_VER == 1915 (Visual Studio 2017 version 15.8)
so making the macros no-ops from VS 2022 17.8 onward is not expected
to trigger these warnings again.

Pick-to: 6.6 6.5 6.2 5.15
Fixes: QTBUG-118993
Change-Id: I2c3b69d46d13f6fcccf0ffce186b984b7758f287
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-11-10 18:29:41 +00:00
Marc Mutz
b113b01a71 QStringConverter: harden encodingForName() against nullptr
The nameMatch() function has an implicit precondition that neither
argument is nullptr: it immediately dereferences both arguments.

Prevent the crash by checking for name == nullptr early, before
passing to nameMatch().

Add tests for null and empty.

As a drive-by, make variables in the test const (needed for the
QByteArray to avoid detaching, peer pressure for the others).

Amends a639bcda1e.

Pick-to: 6.6 6.5 6.2
Change-Id: I4a30f6c130310eb701ba7c7251168294489c34db
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-11-10 19:24:33 +02:00
Volker Hilsheimer
8753bb3045 Cocoa MessageBox: don't use native message box if detailed text is set
As per the documentation: A message box displays a primary
text to alert the user to a situation, an informative text to
further explain the situation, and an optional detailed text to provide
even more data if the user requests it.

The AppKit NSAlert doesn't provide such a "detailed" section, and our
code just added this "even more data" detailed text to the primary text.

This breaks the UI when the detailed text is very long, perhaps a
complete log output with dozens or even hundreds of lines of text.

Since NSAlert doesn't provide a "details" space, fall-back to the non-
native message box if detailed text is provided.

[ChangeLog][QtWidgets][QMessageBox] On Apple platforms, the native
message box is no longer used when detailed text is set.

Pick-to: 6.6 6.5
Fixes: QTBUG-118992
Change-Id: I6f4764ceb8f8e57d641c0b0660223a9c26f5bd26
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-11-10 11:20:56 +02:00
Shawn Rutledge
68369237bf iOS: Make nextTouchId static, unsigned and let it overflow
If an application has two windows, and the user tries to do multi-touch
gestures with different fingers in each window at the same time, we want
the touchpoint IDs to be unique. m_nextTouchId was a per-window variable
before; the result was that the QEventPoint delivered to the second
window was replacing values (including QEventPointPrivate::window)
in the persistent QEventPoint that was still being held in the first
window; then when the release of the first point occurred,
QGuiApplicationPrivate::processTouchEvent() saw its destination window
pointer as null because the second touchpoint had already been released.

QEventPoint::id is of type int, with negative values being invalid.
nextTouchId is of type quint16 so that it will always be positive, and
we can let it eventually overflow (wrap back to 0) rather than resetting
it to 0 after each touch gesture. The only requirement is that the IDs
need to be unique and positive (and typically they are sequential: that
makes debug output easier to understand).

Task-number: QTBUG-118909
Change-Id: Ia0f1edc9a5e2b362028bed4418fed228814cddb6
Pick-to: 6.5 6.6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-11-09 12:10:52 -08:00
Alexandru Croitor
f639c04f84 CMake: Document Android per-abi limitation of QT_ANDROID_EXTRA_LIBS
When the per-abi external projects are built, specifying a dynamic
path in QT_ANDROID_EXTRA_LIBS based on CMAKE_ANDROID_ARCH_ABI would
not propagate that value back to the main project's deployment json
file.
While the actual library files would be copied into the apk, they
would not be loaded because the generated libs.xml file would be
missing per-abi entries in the 'bundled_libs' array (except for the
main abi).

Document that project developers should explicitly specify all the
libraries in the property.
androiddeployqt then takes care to filter out unsupported architecture
libraries in each abi build dir, but it will still copy all of them
into the final apk, as well as list all the architectures in libs.xml.

A proper fix would be to generate additional files with information
from each per-abi external project, that would then be read by
androiddeployqt (basically merge specific target property info from
each sub-project).
Hopefully this can be done without introducing new API.

Pick-to: 6.5 6.6
Fixes: QTBUG-117206
Task-number: QTBUG-118838
Change-Id: I181a170cffdb49b0b0d455d997cfae90ada312f0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-11-09 20:57:44 +01:00
Christian Ehrlicher
e0b09e86d8 QAbstractSpinBox: use pmf-style connects
Use pmf-style connections instead old string-based ones.

Change-Id: Idab3a9d60e7cddcd2076476a21dbb1b5d2e4189c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-09 20:57:44 +01:00
Christian Ehrlicher
83e92e2557 QTabWidget/Bar: ignore hidden tabs for key events
Even a tab was hidden it could be accessed with the key navigation or
a scroll event which lead to painting artifacts.

Pick-to: 6.6 6.5 5.15
Fixes: QTBUG-101219
Task-number: QTBUG-63038
Change-Id: I58be694eef5f86cccecbe528891a39a4acdda15f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-09 20:57:43 +01:00
Mårten Nordheim
96e3d06b6f Revert "QTextDocumentPrivate::plainText: simplify code"
This reverts commit a83a818791.

Reason for revert: It's causing asserts, solution to fix is unclear

Change-Id: I33ef760a9402c096d3d7487e777c3ccdbb626d39
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-11-09 18:18:27 +00:00
Allan Sandfeld Jensen
b637607789 Fix findNearestColor for semitransparent colors
The two destcolors and the buffer are all already premultiplied. This
would double premultiply them.

Pick-to: 6.6 6.5 6.2
Change-Id: I235bee616d8e0033b87c6f96464f0926af7bd29a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-11-09 18:17:33 +01:00
Laszlo Agocs
9ee30b1dc2 Fix broken capture in hellovulkancubes example
Amends 339323b999

Capturing a function argument (or any local variable)
by address is a bad idea.

Fixes: QTBUG-118912
Fixes: QTBUG-118986
Change-Id: I521d319a37f7acd6c66732f5f7d3cf1be4d49029
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-11-09 18:17:33 +01:00
Eirik Aavitsland
2ac50bb0f5 QPrinter: allow any margins when setting a fullpage QPageLayout
By default, QPrinter::setPageLayout correctly rejects a layout that
specifies margins outside the printable area. However, when the layout
specifies fullpage mode, that check should be skipped, since then one
should be allowed to target the unprintable area, by definition.

Fixes: QTBUG-118580
Pick-to: 6.6 6.5
Change-Id: I8bd93d11aefee0344725ac51c2490d029657f483
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-11-09 16:52:45 +00:00
Jarek Kobus
52eae99b51 QtConcurrent::run() test: Add tests taking static function
Change-Id: I75d862a756d0543d8925459b3871abb979ffd481
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-09 16:52:44 +00:00
Allan Sandfeld Jensen
6532dc5d37 Fix multiple threads accessing same byte
We can not thread mono image formats as the bit access isn't atomic.

Pick-to: 6.6 6.5
Fixes: QTBUG-117494
Change-Id: Ica8e08fc3da73983f6b4da2a133f5e715fd0d787
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-11-09 16:52:44 +00:00
Friedemann Kleint
78512135c8 Windows QPA: Fix wheel events when using -platform windows:reverse
Wheel events in WM_POINTER messages use global coordinates.
Move the code doing the RTL correction into the local coordinates branch.

Fixes: QTBUG-117499
Task-number: QTBUG-28463
Pick-to: 6.6 6.5
Change-Id: I10e965da9e9660985eaa2681fcf780b5388299a2
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
2023-11-09 15:59:41 +01:00
Axel Spoerl
c93ab8c2a0 QDockWidget: Remove "group" bool trap
The unplug() and startDrag() functions of QMainWindowLayout and
QDockWidget used a boolean argument specifying whether a single dock
widget or a group of dock widgets should be unplugged. The argument
defaulted to true.

That has lead to inconsistent unplug operations, broken item_lists and
crashes, especially when the methods were called without an argument.

To improve code readability, replace bool trap with a meaningful
enum. Remove default arguments, in order to force explicit calls.

This patch does not change behavior, it is just carved out to
facilitate reviews.

Task-number: QTBUG-118578
Task-number: QTBUG-118579
Pick-to: 6.6 6.5
Change-Id: I50341b055f0bb76c2797b2fb1126a10de1fee7dd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-11-09 14:59:41 +00:00
Axel Spoerl
c02f8b9d4d Fully export QDockWidget debug operator
Amends bbeff2a335.

Task-number: QTBUG-118578
Task-number: QTBUG-118579
Found-by: Friedemann Kleint <friedemann.kleint@qt.io>
Pick-to: 6.6
Change-Id: I60d8d11a82ff5de8b9641c86b824969fc9a34b91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-11-09 13:09:55 +01:00
Assam Boudjelthia
b5d615f964 Android: remove redundant manifest android:label tag for <activity>
This is also highlighted by Android Studio Manifest editor.

Change-Id: If159405b0fceeb955e26f3916dd0e96b6ca76003
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-11-09 12:09:55 +00:00
Christian Ehrlicher
c63a21ae5c SQLite: Update SQLite to v3.44.0
[ChangeLog][Third-Party Code] Updated SQLite to v3.44.0

Pick-to: 5.15 6.2 6.5 6.6
Change-Id: Ibdf8a6e0baf3d2b1bf0f9ffb48e908e2691b6a8d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2023-11-09 13:09:55 +01:00
Mårten Nordheim
26ded9dedf tst_QDockWidget: use local context for timer
If we use 'this' as context it might still try to invoke
the timer after we have left the function, leading to
stack-use-after-return.

To avoid doing an in-depth dive if it's okay to use mainWindow as the
context or not, I just added a new local QObject.

Amends 9ff40b59da

Pick-to: 6.6 6.5
Change-Id: I2c3bdc1eb06731d9c38979610303876c2748fb73
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-11-09 13:09:55 +01:00
Lu YaNing
c524ca342b QXkbCommon: Use isKeypad() to replace duplicate logic
This amends 298c950912 .

Pick-to: 6.6 6.5
Change-Id: I44696464817d6d3f6b1b3a7d005334805fb1cc38
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-11-09 08:18:04 +00:00
Sérgio Martins
e6a0b6b3c9 Add .cache/ to .gitignore
It's generated by clangd, when used for example from vscode.

Pick-to: 6.6
Change-Id: Iac65face9634c869eaf94881edff82471a33742a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-11-09 02:42:40 +00:00
Thiago Macieira
8739963c81 QBitArray: fix GCC 13 warnings by improving code
GCC 13 has been complaining that QBitArray could be accessing past the
end of an array (specifically, the 1-element array QByteArray::_empty).
That's caused by the 'QByteArray::data() const' being:

 #if QT5_NULL_STRINGS == 1
     return d.data() ? d.data() : &_empty;
 #else
     return d.data();
 #endif

A way to avoid this is to use operator[], which doesn't attempt to hide
null pointers (it has an assertion).

This is accomplished by writing nicer, more readable code, which is a
nice benefit.

Fixes: QTBUG-118631
Pick-to: 6.6
Change-Id: I85b3fc2dd45c4693be13fffd179579615a6ac98d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-11-08 12:48:13 -08:00
Assam Boudjelthia
5b5f4344da Android: move referral global field to local variable in QtActivityBase
Keep the variable where it belongs, it's not used anywhere else.

Task-number: QTBUG-115017
Change-Id: Ia421eb0cd3f57be3601754f1df11e64f0267fa5d
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-11-08 19:40:18 +02:00
Assam Boudjelthia
4265245506 Android: fix a11y method name notifyLocationChange
Amends 0f3dbd6dc7.

JNI was calling notifyLocationChange(I)V method but it doesn't exist,
instead it was named notifyAccessibilityLocationChange(I)V.

Task-number: QTBUG-118077
Change-Id: Icc29d4aad97e730af7165d5e057d228bee9c8976
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-11-08 19:40:18 +02:00
Jan Grulich
63fa92f2ef QCryptographicHash: fallback to non-OpenSSL implementation for Keccak
Current versions of OpenSSL 3 don't support Keccak hashes as these are
going to be introduced with OpenSSL 3.2 so we should rather fallback to
the non-OpenSSL implementation instead of using SHA3.

Fixes: QTBUG-118814
Pick-to: 6.5 6.6
Change-Id: Iedeb81cd76d43d920fc10e1efdac261bc12a394c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-11-08 18:40:14 +01:00
Piotr Wierciński
d544c0ff58 wasm tests: Fix and clean manual Selenium test
Remove obsolete parent_window_limits_moves_of_children test of moving
child window in parent. Child windows no longer have decorations,
therefore they cannot be dragged by a title bar.
Fix child_window_activation test, which now uses correct coordinates
to probe for stacked windows.

Change-Id: If5ddd8d4486673a961572de7c57df72c3cea9350
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-11-08 18:24:18 +01:00
Jøger Hansegård
70404a2773 Prevent oversized QToolButton menu from moving to primary screen
The QMenu pop-up used with a QToolButton could unexpectedly move to the
primary screen if it was too big to fit on the owning widget's screen.

The cause of the issue is that QMenu is a top-level window, and can not
infer its screen from any parents. Its positioning is therefore done
using heuristics in QToolButton. These heuristics attempt to calculate a
best guess point relative to the screen that contains the QToolButton.
If these heuristics result in a point that is outside all screens, the
QMenu's own screen takes precedence, and this is always the primary
screen. This way, the QMenu ends up at the calculated position, but
relative to the wrong screen.

This patch works around this issue by ensuring that the first estimate
for the pop-up position is always within the same screen as the
QToolButton. The danger with this workaround is that the menu may end up
in an inconvenient location. This does, however, seem to be handled by
subsequent adjustments in QMenuPrivate::popup.

Fixes: QTBUG-118695
Pick-to: 6.6 6.5
Change-Id: Ibb4a1c82e827c57bbb0798a6c6f5eecb6d639c62
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-08 18:24:18 +01:00
Jonas Karlsson
a8df174369 QHeaderView: relayout on resetDefaultSectionSize
We now call setDefaultSectionSize with the new default section size.
This clamps the value to min/max section size and it will resize
affected sections.

Pick-to: 6.5 6.6
Fixes: QTBUG-116013
Change-Id: I39849aca8d0672629ce0b3ca244038c27e045d4b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-11-08 18:24:17 +01:00
Wladimir Leuschner
7e8ae9cf12 Use Desktop Handle in case of no valid app HWND for QPrintDialog
The call Win32 API PrintDlgEx needs in the PRINTDLGEX struct a valid
window handle for hwndOwner to show up. In case there is no window
created, as seen in the example, the call to PrintDlgEx fails with
COM error code E_HANDLE. Using the Desktop HWND, in case of no valid
app HWND creates a valid call to PrintDlgEx with showing up the dialog.

Pick-to: 6.6
Fixes: QTBUG-118899
Change-Id: Ie7009c8e6e8285a0b6312e310b3d065c532f9e17
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-11-08 18:24:17 +01:00
Dimitrios Apostolou
19aa21b595 CTest should write a JUnit XML test summary
This feature is to be used when testing Qt in Coin (our continuous
integration platform). The command line option --output-junit is
supported in CMake 3.21 or greater. However we have one particular
configuration that tests with CMake 3.16, so we exclude that one.

We have already configured the individual tests to print detailed
results in their own XML files, using QTest's functionality. But then,
when a qt test process crashes, it leaves behind a half-baked XML
file, or no file at all.

CTest on the contrary knows nothing about the internals of a Qt test,
and only cares about the process exit code. Even if a test crashes, it
catches that and reports it as a failure.

We enable this functionality here to use in addition to what QTest's
XML files provide, in order to collect more complete information on
test results.

Pick-to: 6.6 6.5
Task-number: QTQAINFRA-5146
Change-Id: I226203f93413689f5767a4d01ea1852b453ebf31
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
2023-11-08 18:24:17 +01:00
Timur Pocheptsov
3159b337f0 Openssl V3: try to work around the lack of SHLIB_VERSION_NUMBER
It's no more defined in opensslv.h, try to use OPENSSL_SHLIB_VERSION
instead.

Pick-to: 6.6 6.5
Fixes: QTBUG-116295
Change-Id: Ie465f4147e0ec95897bd8d35f71241884bf64b4e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-11-08 18:24:17 +01:00
Friedemann Kleint
01d55f0203 Windows QPA: Emit QGuiApplication::primaryScreenChanged()
Patch as contributed.

Pick-to: 6.6 6.5
Fixes: QTBUG-93368
Change-Id: I8cc884e64e84128b125415e78e3a34245ae4e626
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
2023-11-08 18:21:30 +01:00
Toni Saario
7eb0cc2b4d Remove downstream config
It is outdated and it was discussed that it would be removed in favor
of other options.

Change-Id: If2468c84d8ca8197587577ae3d72aeb96c822c5f
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
2023-11-08 20:21:30 +03:00
Ivan Solovev
e85a3cde2f QSharedMemory: fix attach() -> create() for non-legacy SystemV mode
The problem with non-legacy mode is that the backend uses the same
filename for the system semaphore file and for the shared memory file.

What happens is that when we try to call attach(), a semaphore is
created. Later in attach() we set unix_key, because ftok() returns
a valid handle (it uses the file which was created for semaphore).
After that, an attempt to actually attach to a shared memory fails, but
no clean-up is done.
So, a later call to create() sees that unix_key is already valid, but
it cannot properly clean it, because it does not actually refer to
any shared memory.

Fix it by cleaning up unix_key and nativeKeyFile if shmget() call in
attach() fails.

Pick-to: 6.6
Change-Id: Ibccc3ac307d8b2e07e1b9b24b55f97a859a03131
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-08 15:56:54 +01:00
Laszlo Agocs
7c3779006d tst_qrhi: Exercise a readonly storage buffer in the simple test
...not only in the tessellation-related ones (that are skipped
with D3D).

The checked-in .qsb file is generated with a patched shadertools
that fixes a bug regarding readonly storage buffers and HLSL.

Change-Id: Iafbad4e81875d7b4f877435b9b1e6078019d52ac
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-11-08 16:15:18 +02:00
Laszlo Agocs
92167f0119 rhi: Add a flag to suppress D3D11 smoke test warnings
Applicable to D3D11 only, although the flag is general enough that
other backends could use it if it made sense for them.

This allows Qt Quick to state that warnings about QRhi::create()
failures that lead to retrying with a different set of flags
(PreferSoftwareRenderer to get to use the WARP software rasterizer)
should be suppressed and turned to regular categorized debug prints.

Other users, e.g. an application directly working with QRhi may not
want this. A create() failure must be complemented by an unconditional
qWarning since normally that is pretty serious error. Hence the opt-in
flag.

Task-number: QTBUG-117926
Change-Id: I808bd1670b631e2068b566ab08589e1783f62ca5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-11-08 14:15:18 +00:00
Axel Spoerl
bbeff2a335 Extend qDebug functionality for QDockWidget
Add features and floating flag to QDockWidget debugging.
Debug dockwidget parents of a group window.

Task-number: QTBUG-118578
Task-number: QTBUG-118579
Pick-to: 6.6
Change-Id: If2a6caacf5d02f9018c2a3073fdbc1de39bce1ee
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Keith Kyzivat <keith.kyzivat@qt.io>
2023-11-08 15:15:18 +01:00
Samuli Piippo
f0b2c5f21c tslib: generate event with correct buttons and event type
Tslib doesn't give button and movements events separately, so send
the first event with pressure as MouseButtonPress, subsequent events
as MouseMove and event without pressure as MouseButtonRelease.

Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-111952
Fixes: QTBUG-113307
Change-Id: I7ed6e37936887e11affb254d2fca74c79b6a43b9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-11-08 13:40:44 +02:00
Christian Ehrlicher
5a5c96c65d Add QPixmapIconEngine::isNull()
Reimplement the virtual function QIconEngine::isNull() for
QPixmapIconEngine. This lets QIcon::isNull() return true when no pixmaps
are loaded during QIcon::addFile() e.g. due to a wrong filename.

Pick-to: 6.6 6.5
Fixes: QTBUG-118667
Change-Id: I29f2c492e55b60638507fa398ef7af76f4e9ff48
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-11-08 11:11:48 +01:00
Christian Ehrlicher
a5a925bf2e QWidgetWindow: pass QPointF to QMouseEvent
QWidgetWindow::handleMouseEvent() passed a QPoint to QMouseEvent which
might result in a wrong result on high-dpi displays. Since the incoming
event has a correct QPointF coordinate, use this for the QMouseEvent

Pick-to: 6.6
Fixes: QTBUG-106262
Change-Id: Idbfdab19220cb06aa0a28eef4e6ab4cab1035d97
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-11-08 11:11:48 +01:00
Christian Ehrlicher
90822833f3 QCheckBox: Don't emit checkStateChanged when nothing changed
QCheckBox::checkStateChanged() was emitted with msvc even though the
check state was not changed due to a faulty comparison.
Amends: 37b47ebf94

Pick-to: 6.6
Fixes: QTBUG-118716
Task-number: QTBUG-104688
Change-Id: Iafeabeb9214f6c7510ea4ed87fabb7dc0ba175a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-11-08 11:11:48 +01:00
Alexey Edelev
c8c8299a63 Re-enable LTO for gcc versions >= 10
Assume the related GCC version is fixed.

Fixes: QTBUG-118851
Change-Id: I0160440c5e8a0341ec5bc2ab9ea6fed9a2325bba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-08 08:04:07 +01:00
Gleb Popov
295e56201d Implement QDBusAbstractInterface::setInteractiveAuthorizationAllowed
Task-number: QTBUG-100458
Change-Id: I48d6f17943a554c1173d16a2320eb460c3d5c387
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-07 19:49:34 +00:00
David Faure
889c3e2e5b QMimeDatabase: update freedesktop.org.xml to shared-mime-info 2.3
... and update the unittest accordingly.

Compared to the 2.3 release there 2 fixes in freedesktop.org.xml,
due to issues discovered when running tst_qmimedatabase:
* Give higher priority to the more specific image/apng magic
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/262
* Lower priority for text/x-mpsub's magic
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/263

Task-number: QTBUG-118616
Change-Id: I56053b343619a8a711af28e6490c160d13169734
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-07 16:04:03 +01:00
Alexandru Croitor
28516ed1fd CMake: Remove qt_internal_qt_configure_end workaround
Now that the top-level build calls qt_internal_qt_configure_end
itself, we don't need to call it in qt_print_build_instructions.

Pick-to: 6.6
Change-Id: I906ee7bc1aed3b597049b5996a41dd298175343c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-11-07 14:56:01 +00:00
Ivan Solovev
fb1dcbfcba QSharedMemory: fix attach() -> create() for legacy SystemV mode
The attach() -> create() sequence was not covered by unit-tests in
qtbase, but this approach is used inside QSharedImageLoader.

It turns out that 02c42b26e1 broke this
usecase for legacy mode, and the create() triggered an assertion
in QSharedMemorySystemV::updateNativeKeyFile(). Fix it by clearing
the nativeKeyFile if ftok() call in QSharedMemorySystemV::handle()
fails().

Add unit-tests for the attach() -> create() scenario.
These tests revealed that this scenario fails also in non-legacy mode
for SystemV, so add QEXPECT_FAIL for these cases for now. This will
be addressed in a separate patch.

Pick-to: 6.6
Change-Id: If133fa56c82eba902374dc48d2757046b3d40baf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-07 15:43:05 +01:00
Ivan Solovev
aa8dfc5589 QDate: fix condition in conversion between chrono types and Julian Day
Surely, sizeof() returns the number of bytes, so we need to multiply
by CHAR_BIT if we want to compare with the number of bits.

This commit amends c4f7dba81e

Task-number: QTBUG-118221
Change-Id: I2cca75bfed7f0554f6cffd22cc06475ffc9c6e43
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-11-07 14:42:16 +00:00
Tasuku Suzuki
2db7a5ebfb Fix build with -no-feature-shortcut
Change-Id: I43b95991fcf37ac8b125b176a59518e6a81e11dc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-11-07 09:59:06 +09:00
Alexey Edelev
a8118caad6 Remove forward declared QHash
Fixes the complication issue since the typedef was used as class member.
Replace the typedef with using statement.

Fixes: QTBUG-118627
Pick-to: 6.6 6.5
Change-Id: Ie3d341fb8f18a7341d018f51947127ace941a620
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-11-06 22:44:35 +01:00