Lots of files in the repos are not included into the generated IDE
projects. Therefore we add utility targets (custom targets), which are
populated by glob patterns, which should fit most files that are found
in qt's subprojects.
Pick-to: 6.7
Change-Id: I1b731e65f8db319d3cec817eea5c23a1eeaefb22
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
On android documentation orientation changes are sent via
onConfigurationChanged callback. Previous implementation
based orientation detection to onSizeChanged callback.
That callback is not called when orientation turns 180 degrees.
i.e. between landscape and inverted landscape.
This fix adds detection to on onConfigurationChanged to catch
those cases.
Fixes: QTBUG-118887
Fixes: QTBUG-118236
Pick-to: 6.7 6.5
Change-Id: Ie2f81798de97e460de839f7ebfde9a9efa25909f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Instead of having users traverse a ProxyModel hierarchy to
get to a QFileSystemModel to use the fileInfo(QModelIndex)
function, just let it be available with the roles.
Change-Id: I285347d1d85b4c6253fcb893737aa629a56e27fd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Should make the profile a valid ICCv4 profile now.
Change-Id: Ifb8649b588117a4357e1f801c9b0202202ce9a38
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
It was overlooked in testing, but it would emit a signal for new
incoming stream even if the server was just replying with HEADERS on a
stream the client had initiated. Or vice-versa.
Pick-to: 6.7
Change-Id: Ie7b3a45729a78106da1d8c058e15705cc7dcc53b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Axivion (SV403 and SV404) points out, based on rule of three,
the lack of destructors for ConstIterator and Iterator.
So add them.
Task-number: QTBUG-122619
Pick-to: 6.7 6.5
Change-Id: I4d4abf9be8be529492bf13069052ae4a8d8a90de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The struct members were not described. Add something for each in the
docs.
Pick-to: 6.7
Change-Id: I75d0a5a6efee4d7b4a415b5282a9e44950ed3894
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The QCborValue(QL1S) constructor checks if the parameter is ASCII.
If it's not, it converts it to a QString and stores as such.
However, the QString is checked *again* for being ASCII. We know
it isn't -- skip this recheck.
Change-Id: I7a4776759b2b14aab955cffebde6e3b64f8ed1d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This creates aliased glyphs using the DirectWrite engine when
requested.
Note: There was previously a fallback to GDI to support aliased
text, which ignored the hinting settings. This patch also removes
that fallback.
[ChangeLog][Windows] Support QFont::NoAntialias with the DirectWrite
font engine.
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-97645
Change-Id: I587f56ace468cfdd57debe7bc8492a96587a4e05
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Fill with the "window" color of the palette as passed in through
the style option, which takes care of active vs inactive color
selection.
The title bar of a docked dockwidget is a bit lighter than the
main window title and unified toolbar background, but identical
to the color of the title of an undocked dock widget. This is now
the case for both dark mode and light modes.
Also remove the gradient fill from the status bar, just fill it
with the window brush.
Remove the now unused helper functions for the title bar
gradient.
Fixes: QTBUG-92855
Pick-to: 6.7
Change-Id: Ia04c630201b288c0107567d3f459f66129693c82
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In commit 9da8d67b3b a recreation of the
ComboBox Container was introduced, since QWindows11Style depends on
WA_TranslucentBackground flag, whereas the other styles don't set this
flag. This leads to the destruction of user supplied views we don't own.
Fixes: QTBUG-124191
Pick-to: 6.7
Change-Id: I4a693f612ddc299696b9de0d87c94d88c04d9b39
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QCommonStyle sets the font for a selected header section to bold.
This overrides the font weight a calling style might already have set,
e.g. when a style sheet is applied to explicitly set a weight for a
checked header section:
QHeaderView::section:checked {
font-size: 20px
font-weight: normal
}
Since setting the weight on a font sets the respective resolve-mask
bit, we can avoid overwriting a weight that is already set explicitly.
Add baseline test coverage using a QTableWidget.
Fixes: QTBUG-122180
Pick-to: 6.7 6.5
Change-Id: I8c6279ad2fd8c5718ebea26e27c64ae823625748
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Use a solid fill with the "button" color of the palette also for active
title bars, which is then the same color as the frame, and gives the
window a consistent look in both dark and light mode.
Fixes: QTBUG-123162
Pick-to: 6.7
Change-Id: Iac26fdb1518ffe4f8255e01bedf7329be40ac258
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If QToolButton::mouseReleaseEvent triggers its deletion then it
will crash when dereferencing its d pointer.
qabstractbutton.cpp already uses QPointer guards in many places but
qtoolbutton.cpp was missing this one.
While deleteLater() is still our recommendation, we shouldn't crash.
It's not always obvious what led to the button's destruction,
as the chain of indirections can be long.
Change-Id: I4a33447fa4e90953370277eb57a161398ded9a9c
Pick-to: 6.7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
.. 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>
PACKAGE_PREFIX_PATH is not defined in cmake versions 3.29.x.
We should avoid referring the internal CMake variables.
Use the calculated reverse relative path to the prefix path
instead.
Fixes: QTBUG-124186
Pick-to: 6.5 6.6 6.7
Change-Id: Iefae132e61a3f8e8f5525c0abd6a2d41631c2fb0
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Add the dummy check if the variable is defined to suppress the warning.
Pick-to: 6.7
Change-Id: If3bb0ef6a2587693c0ec898ceb3080ebfc1e82a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The Qt CMake routines for generating pkg-config files don't
handle all sorts of generator expressions, see
qt_internal_set_pkg_config_cpp_flags in QtPkgConfigHelpers.cmake
which hardcodes handling of some specific expressions. In this
case, they don't handle the semicolon within the generator
expression expansion.
For the UNICODE and _UNICODE defines, this means that the pkg-config
file ends up containing "-D_UNICODE>" with the trailing ">". (The
pkg-config generator tries to parse out the generator expressions,
but the semicolon gets handled as a higher level separator, leaving
the closing bracket ">" behind.)
This issue only shows up for mingw targets, because pkg-config files
aren't generated in MSVC style builds.
Escape the semicolon as $<SEMICOLON> to make it not break the
surrounding generator expression, as parsed by the pkg-config file
generator.
The generator expressions aren't fully correctly evaluated for the
pkg-config files though; the UNICODE and _UNICODE defines don't
end up in the resulting pkg-config file even though they're used
during compilation (both before and after this change).
Fixes: QTBUG-103019
Co-authored-by: Martin Reboredo <yakoyoku@gmail.com>
Pick-to: 6.7 6.5 6.2
Change-Id: Icdb380e3b42be2a47372a8ee2b61378a33c685f7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Li Xinwei <1326710505@qq.com>
In the Addressbook example, any entry whose name doesn't start
with a letter will not appear in any of the categories,
but it will still exist. These entries would make the
"There are currently no contacts in your address book" page
disappear even when no entries could be found in the categories.
Check if a new entry has a name that doesn't start with a letter,
and if so, don't add it as a contact. Also, notify user that names
must start with a letter when this happens.
Fixes: QTBUG-124254
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I7f25711785ec7a82852a0f37d9f096cc3af41576
Reviewed-by: Axel Spoerl <axel.spoerl@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>