Cleanup the drilldown example:
- use icons with the current style
- remove unneeded QOverload<>
- remove some empty lines which don't look good in the documentation
- use Q_SLOTS/Q_SIGNALS instead slots/signals
Fixes: QTBUG-113696
Change-Id: I62476a8989c0abd1f424d1425cb05489491e2153
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QComboBox in non-editable mode passes all keyboard input to the internal
item search. This was done regardless if the character is printable or
not and therefore e.g. '\t' composed by Key_Tab + ControlModifier was
accepted and not passed to the parent (in the bug report to the
QTabWidget which could not switch tabs due to that).
Pick-to: 6.6 6.5
Fixes: QTBUG-118605
Change-Id: If39423587460a70231c735df4912b72c5ae77475
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
dbus is not supported on VxWorks
Task-number: QTBUG-115777
Change-Id: Ia594ddca819ade2d5004dde3da59717e4735b823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A single QWindow is QGuiApplication::focusWindow() at a time, and this
window is typically also QWindow::isActive(), but other windows may also
be QWindow::isActive(). For example, we treat any sibling or ancestor
of the focusWindow as being QWindow::isActive() as well.
In addition, in the case of non-QWindow child windows, we may have to
query the platform for the activation state, which means we also need
a way for the platform to reflect changes in this state through QWSI.
The current API for this, QWSI::handleWindowActivated, is in practice
a focus window change API, so as a first step let's rename it to better
reflect what it's doing.
Task-number: QTBUG-119287
Change-Id: I381baf8505dd13a4a829c961095a8d2ed120092b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Rename m_quitApp to m_retainNonConfigurationInstance and keep it
inside QtActivityBase since it's only used there based on whether
onRetainNonConfigurationInstance() is called, in wish case,
onDestroy() would skip the Qt specific app destruction/exit logic.
Task-number: QTBUG-118077
Change-Id: I1cf03bd6f5266a9283660db7943d053a9dba889c
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
... and print it always after main() returns.
Task-number: QTBUG-118077
Change-Id: I1f57b3f7a646d01eebf67d4a4ff6a8d9f6e82cc7
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Implement an icon engine for Windows that renders glyphs from the
Segoe Fluent Icons font on Windows 11 and the Segoe MDL2 Assets fonts
on Windows 10. These fonts are installed on the respective Windows
versions by default, and otherwise freely avialable for deployment.
Icons from that font will mostly be based on single code points, but as
the font is specifically designed to allow combining glyphs by layering,
the implementation supports multiple code points as well, and can also
use a surrogate pair as well to render e.g. an emoji.
Task-number: QTBUG-102346
Change-Id: Ib47a267c3a1878d8f0e00dd954496fc338bb0110
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
From macOS 13 on, AppKit provides an API to get a scalable system image
from a symbolic icon name. We can map those icon names to the XDG-based
icon names we support in Qt, and render the NSImage with palette-based
coloring when needed, in an appropriate scale.
On iOS, we can use the equivalent UIKit APIs. Coloring functionality is
only available from iOS 15 on.
Implement a QAppleIconEngine that does that in its scaledPixmap
implementation. Use basic caching to store a single QPixmap version of
the native vector image. We regenerate the pixmap whenever a different
size, mode, or state is requested.
Add a manual test for browsing all icons we can get from the various Qt
APIs that: standard icons and pixmaps from QStyle, QPlatformTheme, and
QIcon::fromTheme, in addition to showing all icon variations for a
single QIcon.
Task-number: QTBUG-102346
Change-Id: If5ab683ec18d140bd8700ac99b0edada980de9b4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Qt 6 does not support any Windows versions without DirectWrite
and no special configuration flag is needed to build it anymore.
Pick-to: 6.2 6.5 6.6
Change-Id: I6553c4d1c70e5616f8cb3ec8fe6343c600a74462
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
During tqtc repo submodule updates, the repo names contain the tqtc-
prefix.
But during the final tqtc-qt5.git integration, the submodule names
don't contain the tqtc- prefix.
This causes errors like:
CMake Error: Error processing file: /qt-cmake-private-install.cmake
Use contains_value in the condition instead of equals_value, to ensure
it works for both scenarios. This assumes there will be no repos that
contain 'qtbase' in their name which are not the original qtbase
repo.
Amends 7e334bc7fc4c6c9de379e19076197af5b7fef9ee
picked from commit 6556a943ce8625ce1043a2da64deed187b7ce209 in the
tqtc repo, so that we don't need to do it for every new lts branch.
Change-Id: Ib38c855525c91032d35c235bf33d860204474fe0
Reviewed-by: Toni Saario <toni.saario@qt.io>
The test log shows flaky failures of this test several times a day on
QNX, so blacklist it.
To do that, we need to be able to isolate the "GUI" mode of this test.
To do that, add a single data tag that depends on whether the test
project is built for GUI or Core, and blacklist only the "gui" data tag.
Task-number: QTBUG-119359
Pick-to: 6.6
Change-Id: I91c2380de0a3febedcf781f27fed4a1fa6aa5515
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We need to be able to handle warnings that may occur when temporary
objects, that were created in a test function, are destroyed.
For example, now we miss all warnings that might be triggered from
the object destructor, if the object's deletion was delayed (e.g. via
deleteLater()). Also we miss all the warnings that were triggered on
the test's cleanup() call.
To fix this we need simply move QTestLog::clearFailOnWarnings()
from QTestResult::finishedCurrentTestData() to the later stage,
i.e. into QTestLog::clearCurrentTestState() which is actually called
in appropriate time from QTestResult::finishedCurrentTestDataCleanup().
Same for QTestLog::clearIgnoreMessages(), since they are interrelated,
so we need to clear them at the same time.
We need this change for QML tests in particularly, to be able
fail on warnings that might be triggered from Component.onDestruction()
of some temporary test object.
Pick-to: 6.6 6.5
Change-Id: I58a57691f20761619f56bd1bea3a862f2c26f569
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Calling emscripten_fetch() on worker thread which never yields control
back to the browser, will leave the fetch request pending forever.
This can be a problematic for example in QML Loader, which tries
to load resource by network.
Proxy this function call to the main thread, so it can be processed by
the browser.
Fixes: QTBUG-118225
Pick-to: 6.6 6.5
Change-Id: I969d73f6a66670c4135960e08d2eedc8d2a6e5c3
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Add a command-line option "-skipblacklisted" to testlib to skip
blacklisted test cases. Currently, blacklisted test cases are run,
but results are ignored. For test code coverage measurements, it's
important to see the code coverage of the actually tested code in
comparison to the code that was run but not actually tested.
The default approach remains unchanged, meaning that blacklisted
tests are run with the results ignored.
Fixes: QTBUG-112793
Change-Id: I6fe0a6353cb1c021e0232c79bb4f404632fb0bce
Reviewed-by: Jason McDonald <macadder1@gmail.com>
The converters need to be instantiated (which implicitly registers)
after QPA has been initialized, i.e. after QGuiApplication has been
instantiated. Clarify this in the documentation of the types.
Remove the dead documentation for the explicit registration function.
The API does not exist, and the documentation was never generated for
Qt 6 either. The function does not need to be called as long as new mime
converters are instantiated correctly (after QPA was initialized).
Pick-to: 6.6 6.5
Task-number: QTBUG-119216
Change-Id: I4e31b3773e88f7a6d579265f093bab46847cb028
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add an overload of findChild() without a name argument to be able to
call the function with options value only.
[ChangeLog][QtCore][QObject] Added findChild() overload taking no name.
Task-number: QTBUG-103986
Change-Id: Id06b6041408fcf4cc1eeba975afce03f3a28f858
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Various headers files were missing includes. Compilation only worked
because precompiled headers were used.
Pick-to: 6.5 6.6
Change-Id: Ic1b434da53f89d4b4207a22bf171bd966db856ac
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Consider CMAKE_RUNTIME_OUTPUT_DIRECTORY when setting the default
OUTPUT_DIRECTORY for tests and benchmarks.
Change-Id: I93d85c77f30fec186e13e8cd3e902027e60c588f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In Qt 6, we deferred getting the ascent/descent of the font
until requested. This was used to calculate the cache cost
of the font engine, so as an unintended result, the DirectWrite
engines were seen as extremely cheap in the font cache, and
we would accumulate thousands of them before triggering a flush.
The cache_cost is just a heuristic and does not need to be accurate.
For most engines, we should just flush when the number of cached fonts
exceed 256, so we use the basic em square of a lowercase letter as the
cost here instead.
Pick-to: 6.5 6.6
Change-Id: I73a65cab38adfd9ef56e436f311a7d1a2d7fbf41
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This matches what the D3D11 backend does: if the debug device (D3D11) /
debug factory (D3D12) is not available, we retry without the flag and
if succeeded, continue without the debug layer while printing a log
message. This way create() succeeds even when the debug layer is
requested but is not available at runtime (because the necessary SDK
or Visual Studio components are not installed, which can happen
on an end-user PC not set up for development)
Pick-to: 6.6
Task-number: QTBUG-119240
Change-Id: I02e3bf45728e74b8fe196e880372f584de7aa5d2
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
It's flakey, so let's unbreak the build while we investigate further.
Pick-to: 6.6
Change-Id: I9f7559803dd3ebc80946e5e5c5d31292101cd36f
Reviewed-by: Liang Qi <liang.qi@qt.io>
Refactor methods to simplify the code and improve readability.
Replace calls to initHandler() and checks for handler support
with calls to the supportsOption() method directly.
Reduces code redundancy and improves the overall structure of the class.
Additionally, use supportScaledSize, supportClipRect, and supportScaledClipRect
to streamline the conditional logic and make it more understandable.
Change-Id: I77d5dab8bcdd0b0eb6d7e9edcf87751aa03b80c7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This helps debugging why an adaptor's method fails to be called.
Example output:
QDBusConnection: couldn't handle call to LaunchCommand: Type not registered with QtDBus in parameter list: QByteArrayList
tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall shows many warnings
after this commit, since it's testing many cases of "no such slot".
Pick-to: 6.0 6.1 5.15
Change-Id: Ic4ddcd91d005555a02d531fc8960aea2c809e20b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This has the flaw of providing very little information and happens too many
times during the configure process.
My bad, apologies for the noise.
Change-Id: I57368f514be968e7144f364f627c110ceed20dae
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
To get rid of unused method warnings in Java code for methods used only
from C++ code and make it more visible which methods are used by native
code.
This annotation would need to be added to the relevant methods in this
patch or future one.
Use this annotation for all methods called from native code. And along
the way remove few methods that are not used anywhere.
Task-number: QTBUG-118077
Change-Id: Ie493fb057f4a93aff513f85e0936bc65a9bb304c
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
As with all drag'n'drop code, we can't auto-test this as the test would
enter a blocking event loop.
Task-number: QTBUG-119216
Pick-to: 6.6 6.5
Change-Id: I7bab4a4fe7f5b315cdaec61636ded6186d9f75b4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
- Set the respective flags of dmFields in
QWin32PrintEngine::setProperty()
- Properly initialize newly allocated structs
This is merely for completeness, the allocation code paths are
not currently hit since the DEVMODE from the current printer is
used, which also has most dmFields bits set.
Pick-to: 6.6
Task-number: QTBUG-114604
Change-Id: I880d9faef9b1d491db4accd53d0d75b718f7f244
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
It's used to build different variations of the unittest,
linking against QtCore-only/QtGui, with/without GLib, that's four
individual tests.
Change-Id: Iaf0f37041dbb148134631f86be99feaa881a8ce8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The configure script always returned exit code 0 even if the
underlying cmake call failed. Make sure to exit with the same exit
code that the cmake process does.
[ChangeLog][Build System] The configure script on UNIX systems will
now exit with the same exit code that the underlying cmake process
exited with.
Pick-to: 6.5 6.6
Change-Id: I2cb43e162bb96f4e60320522895aac9bb5c5bc9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Change the object's name type in QObject::findChild/ren() to
QAnyStringView, because they are only used for comparison against
objectName property.
qt_qFindChild{,ren}_helper() functions taking an objectname as
QString have to stay in the ABI as they were exported in inline
methods before Qt 6.7.
Unlike QString, constructing a null QAnyStringView doesn't involve
any code-size overhead. So, get rid of the split in qt_qFindChildren_helper
that was introduced for QString. Remove unneeded
qt_qFindChildren_with_name helper function and qt_qFindChildren_helper
overload without a name.
findChildren(options) method used to call qt_qFindChildren_helper overload.
Instead, call findChildren overload with name argument and pass
QAnyStringView{} as the object name.
[ChangeLog][QtCore][QObject] Ported QObject::findChild/ren() and
their helper functions to QAnyStringView.
Task-number: QTBUG-103986
Change-Id: I68bda0e581f984ae48b7581ad86cc1b95008c1b0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Since we cannot re-use the pre-existing QPartialOrdering type due to
binary-compatibility issues (it's not BC to std::partial_ordering),
we're no longer bound to copy its API for consistency.
So copy std::*_ordering type API for consistency instead, to ease
porting for users that can already use C++20 and everyone else come
Qt 7.
This patch is another step in that direction, renaming classes and
their memmbers to std-compatible names. QPartialOrdering cannot
change, as it's pre-existing. So add a completely new type
Qt::partial_ordering.
Adding conversions from QPartialOrdering is left for a follow-up
patch.
As a drive-by, change `\c Less` to `\l Less` in the \class
documentation blocks of the new classes.
Amending c6fe64b17c, which didn't have a
ChangeLog:
[ChangeLog][QtCore] Added Qt::{partial,weak,strong}_ordering as
drop-in C++17 stand-ins for C++20's std::{partial,weak,strong}_ordering.
Task-number: QTBUG-119108
Change-Id: Ib1296de6b708571a6abca8843ba36c114f6fd34f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
std::is_eq etc work fine on our Q*Ordering types when C++20 is
available. But in C++17 mode, they're absent.
Plug the hole by providing them for our own types as hidden friends,
so that users can use unqualified calls to transparently support both
std::*ordering and Q*Ordering types, just like with comparison to
literal zero.
For some reason, we running here into
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100903, even though this
wasn't seen in other commits of the chain that use comparisons to
literal zero. Suppress the warning. Then at least is_eq etc provide a
safe fall-back for compilers and users affected by this bogus warning.
Fixes: QTBUG-119100
Change-Id: Ie8519c92363401a0c9c8efba6eb0b6e030a8e235
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Use cxx17_filesystem config instead of Q_OS_INTEGRITY.
Change-Id: I1d3fdae449a534dd25a32ce2820a4ebf788de2b0
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Use std::array<QPointF, 4> instead a dynamic QPolygonF since there is no
dynamic allocation needed here.
Change-Id: I45e124de7db7263c9291e169165bf74174f032a6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
When the text alignment is AlignRight the opened editor is wrongly
aligned and therefore the text can not be read. There is no reason to
align the editor window on the right only because of the text alignment.
Also remove the hack to not let occupy the editor the whole cell in a
QTreeView but in a QTableView.
Fixes: QTBUG-98525
Change-Id: I6f2d88e461bcfd505adde745041b5d4fdf679201
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
In rtl mode the text was not aligned right so a gap between the text and
the icon occurred. This was due to the fact that the textFlag given to
qt_format_text() was modified based on the application wide rtl/ltr mode
and so our Qt::RightToLeft was reverted to Qt::LeftToRight. Therefore
only set the textFlag to Qt::AlignRight when the button layout direction
does not match the global one.
Pick-to: 6.6
Fixes: QTBUG-64373
Change-Id: I283a99de8f59bc3db53c4150f417ffef9ff68db7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
The platform window may in some cases be gone, without its NSWindow yet
being deallocated, and if we receive an application activation event at
this point we would try to dereference a null-pointer.
Fixes: QTBUG-119219
Pick-to: 6.6 6.5 6.2
Change-Id: I72bb2482059d1a256e448705b132e4a8f22ec297
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The active window of QApplication overlaps largely with the focus window
of QGuiApplication. As a first step towards potentially removing the
active_window member, make it private so we control access to it.
Task-number: QTBUG-119287
Change-Id: I95785fea3ba4444db64063f4e4d3d3004465ef64
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
For top level windows, the window size will still reflect the screen's
available geometry, as the window state will be maximized by default.
[ChangeLog][iOS] The default normalGeometry() of a window is now 160x160,
instead of following the screen geometry. Top level windows are still
maximized by default, as before.
Change-Id: Ice752f74d943bf4fbb9be9e39f07798431fc2b0c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Also update the QCollator::compare() docs for consistency.
Task-number: QTBUG-114822
Change-Id: I5fca896cacedd93ce5a4a1a8aead1986a21f6993
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Was private by mistake => make it public.
Pick-to: 6.6 6.5
Change-Id: I6b07a19687ddf84e8456aa70bc34b1cc714a299e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>