.. by playing it safe and taking the QVariant by copy
Pick-to: 6.7 6.5
Change-Id: I24e0507a912388b7fb17e838a22e8d4c449bcf5b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Split out some helpers to write the theme code with path fallback
checking for the enum case (identified by a fully qualified icon) or
the old XDG/filename case.
Task-number: QTBUG-121823
Pick-to: 6.7
Change-Id: If2755483ab899f04e372cf95443f7e03970f6e7f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
QLayout::widgetEvent() returned early, when the layout was disabled.
That suppressed ChildRemoved events and lead to a crash, when the
layout was enabled again.
Don't return early on ChildRemoved events.
Add an autotest in tst_layout::removeWidget().
Fixes: QTBUG-124151
Pick-to: 6.7 6.5 6.2
Change-Id: Ib0a0bb73978d9fc2c9777d300cf38a8c4496b702
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Chris René Lerner <chris.lerner@qt.io>
When a system tray icon on Windows wasn't visible (hidden behind the ^
icon in the task bar) our previous implementation gave different
results on Windows 10 and Windows 11.
On Windows 10 the geometry returned the geometry of the ^ icon itself
while we returned a geometry outside of the screen geometry on Windows
11 (that was what the Windows API gave us).
We work around this problem by using version specific hacks to be able
to check for the visibility of the system tray icon itself. If the icon
is hidden we just return QRect().
[ChangeLog][Windows] The geometry of a hidden QSystemTrayIcon was
unified over different Windows versions. It will always return QRect()
now.
Change-Id: Iee7dea184936a13a9221df9c421400ba304a4c38
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
There are many APIs in Wayland that require a surface role to be
assigned (e.g. XDG Toplevel) before they can be used, where
the surfaceCreated() signal is too early.
Change-Id: I400a6279f21554267259f812a2efb33451b4709b
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Currently the drawing of CE_ItemViewItem is propagated to QWindowsStyle,
which leads to ignoring alternating rows in ItemViews. Propagating the
drawing to baseStyle honors the set base style.
Fixes: QTBUG-123632
Pick-to: 6.7 6.6 6.5
Change-Id: I656ee1c44029abf7233551303d469d38b6c848e3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
forkfd_qt.cpp was originally created so we could use the Qt atomic
classes back when we couldn't rely on C11. We now can, so that primary
reason is gone. We only need it now to set NDEBUG, which the Qt build
doesn't set by default, and _GNU_SOURCE to match forkfd.c itself (GCC
and Clang define it by default in C++ mode because libstdc++ apparently
needs that).
Amends 993db5a122 and thus avoids a new
Clang 18 warning about using VLAs in C++ code:
forkfd_linux.c:160:50: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
Pick-to: 6.7 6.6
Change-Id: I5f663c2f9f4149af84fefffd17bed82d39be4d78
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This header uses std::forward_iterator_tag, which requires including
the <iterator> header.
This fixes building with libc++ with
_LIBCPP_REMOVE_TRANSITIVE_INCLUDES enabled.
Pick-to: 6.7 6.5 6.2
Change-Id: Id2ce97e158c87dab1efe30e54a93f0bc9351de5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
New comparison macros are used for following classes:
- QCborArray::Iterator
- QCborArray::ConstIterator
Replace public operators operator==(), operator!=(), operator!<(), etc
of classes to friend methods comparesEqual(), compareThreeWay();
Use *_helper methods to have an access to protected members of
QCborValueRef class from friend functions.
Task-number: QTBUG-120300
Change-Id: Ie8ffef3e2278dfbf2bf0b32c30a7bf98d99fd1c3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtGui][libinput] The environment variable
QT_QPA_LIBINPUT_TOUCH_MATRIX now can be set with a string of 6
space-separated numbers to set the touchscreen transformation matrix.
See docs for libinput_device_config_calibration_set_matrix()
Fixes: QTBUG-68698
Change-Id: I72ba94e1ee6d39d31d1689ce6ce85fa8e676ff13
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Xcode expects the base SDK to always be the device SDK, so we can't
pass CMAKE_OSX_SYSROOT on directly.
We use the Xcode SUPPORTED_PLATFORMS setting to inform Xcode about
which targets we can actually build and run for.
Change-Id: Ib46e81e946bc89f62d1e700422b37166c3d55009
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The LikelyPair and QLocaleId types are small enough to pass by value.
Pick-to: 6.7 6.5
Task-number: QTBUG-122619
Change-Id: I1502efcf69ac82d9c49b673975502882c59a4fd0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Probably makes no difference, since it's all in lambdas being passed
to a standard algorithm, but the static analyser noticed this would be
cleaner.
Pick-to: 6.7 6.5
Task-number: QTBUG-122619
Change-Id: I23093254e4857131b7be87aeff1e7ba79ea2b674
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
One constructor neglected to do so. Use NSDMI to make sure all
constructors do, if they don't override this with something else. Also
remove fatuous setting, by constructors, of member attributes to its
default.
Pick-to: 6.7
Task-number: QTBUG-122619
Change-Id: I9b726898b85e21d841b9af5b4dc72ee322829d50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QVariant is rather big for passing by value; and no caller has any
further use for the QVariant it's passing in.
Pick-to: 6.7 6.5
Task-number: QTBUG-122619
Change-Id: I2751745e715aacfa8982ac97b4ae777fde5e88de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Axivion (SV546) points out (based on a clazy "rule of three" that
might be rule of five by now) the lack of move and copy assignment and
construction. We don't want those anyway, so tell the compiler not to
create them.
Pick-to: 6.7 6.5
Task-number: QTBUG-122619
Change-Id: Ie951a2c3d60d76ad3448310d3f9bbda22190015b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On vulkan implementation it was possible that when going background
destroySurface was queued and then run when coming back foreground
that caused vulkan not being able to draw.
Fixes: QTBUG-118985
Fixes: QTBUG-118840
Pick-to: 6.7
Change-Id: I5957b74b89384ea84fc09d9b55afcccf5c82e390
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Amends 0786c17bbc, which added a number
of attempts to gracefully shut down the QFileInfoGatherer thread while
shutting down a QFileSystemModel. This introduced a 1-second wait upon
destruction of the model when the QFileInfoGatherer thread is waiting
for an unset wait condition.
Instead of QThread::requestInteruption() to make the thread exit, use
QFileInfoGatherer::requestAbort(), which calls requestInteruption() but
also sets the wait condition afterwards to make sure that the thread
wakes up and checks the abort condition.
Pick-to: 6.6 6.7
Fixes: QTBUG-124164
Change-Id: I560f2131f226e0bb59f72e558cbab55b89cfb144
Reviewed-by: David Faure <david.faure@kdab.com>
I don't think we should document *exactly* how we autodetect
primitive/relocatable types: we've been changing the detection across
Qt versions because sometimes we realized that it was wrong.
Moreover, no one else but us should be using the traits in question (in
other words: QTypeInfo itself isn't public API).
Pick-to: 6.7 6.5 6.2
Change-Id: Ie6e763f152e7dc0f6ce58869dbbd529240d2a546
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use string views in QFontDialog, QColorDialog and QCommonStyle
Change-Id: I22f4b4694e2d18b784aaa85aebff8d92b8f0b871
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
No-op for now. The actual optimization is in the next commit.
Change-Id: I5f663c2f9f4149af84fefffd17c03cdd40c5fd4a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This removes all conversions between types and compares the internals
only.
Change-Id: I5f663c2f9f4149af84fefffd17c034e384071aa9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This is the first step in optimizing the comparisons by avoiding the
conversions in user code. Thus, we don't de-inline the homogeneous
compareThreeWay() functions.
This is done with an extra level of indirection by adding static
*_helper() functions, which have the advantage of being members and thus
benefit from the class' friendships. And it allows us to pass
QCborValueConstRef by value.
Change-Id: I5f663c2f9f4149af84fefffd17c032b32eff7a4e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
We must compare the raw string length in UTF-8, not the UTF-16 one.
[ChangeLog][QtCore][QCborValue] Fixed a bug that caused certain
non-US-ASCII string comparisons to produce results not in line with the
CBOR specifications.
Pick-to: 6.5 6.6 6.7
Change-Id: I5f663c2f9f4149af84fefffd17c05d1c0f1bbc3a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
If IM is enabled we send key events through the macOS text input system,
and we do this for all key pressed, including the ones with modifiers
pressed. The latter allows the input method to respond to shortcut
key combinations to switch its own mode or do more advanced operations
on the text.
We were relying on the IM to call doCommandBySelector with a noop
selector if the shortcut didn't match any of its own internal key
sequences, but this fails for key events with more than one modifier
pressed.
Instead of using [NSView interpretKeyEvents:] to pass the key event
to the system IM we now go directly to the NSInputContext, which the
former method is just a wrapper for. This allows us to use the result
of [NSInputContext handleEvent:] to determine if the system IM consumed
the event or not. For key events with multiple modifiers this will be
false, which we interpret to send the event as a regular QKeyEvent
instead.
Fixes: QTBUG-123848
Fixes: QTBUG-106516
Pick-to: 6.7 6.5 6.2
Change-Id: I14a43c2029149514515dd9ece881aed3f6500a4e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This provides a way for the user to identify any items involved in
warnings we may print, as e.g. their objectName will be included.
Qt Quick's Layout types can use this to stringify the QQuickItem,
which will result in the type and objectName being printed.
Change-Id: I3d6b6ea0315df98629992afd29e4bf2aad847e22
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
We only need it to be exported in shared builds.
Without this change, there will always be an
exported symbol called "qt_startup_hook" for
executables that linked against QtCore statically,
this is absolutely not the Qt user would expect.
Change-Id: Icf19df09531e13184ea019aa708d6b93fa626f85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QtQuick also uses "lcFocus" as a category name, which
causes link errors in static builds when both QWidget
and QtQuick are linked in one executable.
Making it static is also a good solution, but here
adding a "Widget" prefix seems more consistent.
Change-Id: I0a6a02750bd347f62b67544b4044789612f0fa4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The assignment to the output was missing.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: Ibe33073b7e97597631a8dbb0035742693fef97f5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Removes the old hack of parsing them as a compatible RGB color space.
Change-Id: I876d74ca5830b46decc15b20e8a3baa12d5e2713
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
There is an untested config for enabling null-strings, so technically
not supported. But if we ever want to make null mean null
then we should protect against it.
Also drop the explicit template argument for qMin. This means
we use the hetereogeneus version which will promote to
size_t. Which is the type that memcpy expects anyway.
Change-Id: I91e0a3b159b065b76e9e93605ef0e502f41af74f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We want QQuickPopup to open a top-level window in qt quick, by default.
But also allow users to opt out, and revert back to the old behavior.
It makes sense to have an application wide setting for this, in order
to allow application developer to opt out of the new default behavior,
without having to change a property for every instance of Popup.
While QCoreApplicationPrivate::attribs bearly has any available bits,
it appear that bit 30 is available, since
AA_DisableWindowContextHelpButton was commented out.
Task-number: QTBUG-121363
Change-Id: I6b2759d89b46aa5d08222c2611eaffe855cc425c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Parse them, so we can change white-points correctly,
and write them as required by ICCv4
Change-Id: I6d28fb6a85585f80a9867df45864069efda956c5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Make it possible to generate one way QColorTrcLut tables, and make it
easier test out different table size,
Change-Id: I953c68d772699de87fdddbf15ce196e6ba8b9898
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This also adds image conversion of both format and color space, which
will also be required later for conversions to CMYK formats and color
spaces.
Change-Id: I578c0a010ffcdb4df4cf9080c0621fac8bc342bf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
It was always passing a QByteArray to a const char * argument,
with the size along with it. That was immediately converted
back to a QByteArray. Instead, just pass the byte array
which anyway knows its size.
Needed for a followup commit
Change-Id: I821d419adcb600456826dde67fb92ecad11cb290
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This reverts commit f2f2b6ef18.
Reason for revert: There are couple of issues introduced. Lets revert to base revision and go with fixes from there.
Pick-to: 6.5 6.6 6.7
Change-Id: I8341de42ef3e4a609bfbffdb763dd5c28794473c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Following up on 2 commits that fixed static linking for MSVC but left
out MINGW:
230c53ad9dd9820b0207
Pick-to: 6.6 6.7
Fixes: QTBUG-114243
Change-Id: I12853355ffa1a62acce15ff660478f618c42e0a6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Seems to have been left out by 874f5c1f463cad61f49e0ff7007852a73fd93e7c
Pick-to: 6.7
Fixes: QTBUG-123478
Change-Id: Ic028c3786203cbc1c3d7316c1ae22c12a928b170
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
QWindowsComBase is now replaced with QComObject, let's remove the
former since it's a duplication.
Change-Id: I7f911fa036c1f2eaaee168250b8294170430cc5d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>