Since the information about framework is performed in multiple places
it's quite hard to control its consistency. This moves the obtaining
of framework related information to the common function and adjusts
the use of the information across the repo.
Change-Id: I1f488d41dcea75a1e8c361926792a6b7c45e5a3f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
In the previous implementation of the resource object finalizer, we
used the name of the resource object library without namespaces when
recording it in the resource libraries list. This causes an issue when
we or users export resource targets.
This approach marks resource object libraries with the exporting
property instead of collecting resource targets when creating them.
Amends 19e789bace
Change-Id: I8596815921f2c681ddd78d9b2e9a4e1cafe5000b
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Several QIODevice subclasses use the qt_prettyDebug() function to get
a printable representation of the buffer data for debug output.
Rather than having this feature statically implemented in each
respective file, this patch introduces a generic function in the
QtDebugUtils namespace. Accordingly, some inaccuracies in the
use-cases have been corrected.
Change-Id: I1a8465cab08c8acf5fdcdba5085182511b1cbb7b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This patch adds the API, with no supporting backends
Task-number: QTBUG-93848
Change-Id: I50454717f928819e1b990df91872675e842f9987
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Supported on OpenGL (and ES) 3.0+ and everywhere else.
Can also be a render target, targeting a single slice at a time.
Can be mipmapped, cannot be multisample.
Reading back a given slice from a 3D texture is left as a future
exercise, for now it is documented to be not supported.
Upload is going to be limited to one slice in one upload entry,
just like we specify one face or one miplevel for cubemap and
mipmapped textures.
This also involves some welcome hardening of how texture subresources
are described internally: as we no longer can count on a layer index
between 0..5 (as is the case with cubemaps), simply arrays with
MAX_LAYER==6 are no longer sufficient. Switch to sufficiently dynamic
data structures where applicable.
On Vulkan rendering to a slice needs Vulkan 1.1 (and 1.1 enabled on the
VkInstance).
Task-number: QTBUG-89703
Change-Id: Ide6c20124ec9201d94ffc339dd479cd1ece777b0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
It's pointless in a fuzzer and slows down execution.
Change-Id: I0d36ed8814cf8fb332c196ea7e24eae8ee4d3c6e
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
It's pointless in a fuzzer and slows down execution.
Change-Id: I160d7fd761118f9eba9b98fc024aef293e021845
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
When Q_DECLARE_METATYPE is used, we often end up re-registering types as
typedefs of themselves. This is because with Q_DECLARE_METATYPE, we set
a legacy register operation which calls (after some indirection)
QMetaType::registerNormalizedType.
We still need to support this to preserve compatibility in the presence
of typedefs and namespaced types. However, there is no reason to do the
wasteful work of normalizing the typename at runtime and adding memory
overhead to have a type registered as a typedef of itself.
We can skip the type normalization work by checking whether the name in
the metatype interface equals that of the typename. We still need to
make sure that the converter and view functions are registered, though.
Moreover, we can fix the check in qRegisterNormalizedMetaType to only
call registerNormalizedTypedef if the new name doesn't match the name
stored in the metatype.
Fixes: QTBUG-93841
Change-Id: Icfe42c349b23add630fe3c761362b60e9e9aaa2b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
I guess the reason it was marked RELOCATABLE was to ensure
initialization, which we now do anyways (even for PRIMITIVE).
Change-Id: If4f2c248b7b04a301bad81588ea9a9ad06534760
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
"The keypad and group switch modifier should not make a difference" when matches a QKeySequence, see QKeyEvent::matches() implementation.
Qt(xcb) treats AltGr as GroupSwitchModifier in hard code, which should
come from Qt 4 era. Nowadays, with different xkb setups, Mode_switch
could be different keys. When it is AltGr, Qt will get AltGr as
GroupSwitchModifier. When it is not AltGr, another key like
Less/Greaterkey(details in bug report), GroupSwitchModifier will not
be set in the case.
Fixes: QTBUG-36565
Pick-to: 5.15 6.0 6.1
Change-Id: I7251963d41a70d61800d25e43d5012b859693f69
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Change the behavior of moc when collecting json files. If argument files
are specified, suppose moc received empty input and skip input from
standard input.
Pick-to: 6.1
Fixes: QTBUG-93504
Change-Id: I45ec790ed458f1fae543d069555bc8abc6560816
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When the PageDown is pressed, the current's rect cannot be
used to match the item, because we don't know the size of
the rect. Move the rect by the height of the viewport, and
then move the rect upwards until it matches the
button <= viewport's bottom of the item
Fixes: QTBUG-92583
Pick-to: 6.1
Change-Id: I210edc0e8b942984f3fc20e7752c6e1315152ea1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
There was a duplicated word in the api documentation.
Fixes: QTBUG-94073
Change-Id: I1344a89aa579be5272a44831daa9451eb8030431
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When changing the style of the combobox, the change will not propagate
to the internal container widget, so the changeEvent handler won't be
called. This is correct (as per QWidget::setStyle documentation).
QComboBoxPrivateContainer asks the combobox style for relevant settings,
such as the frame style, which is then used for sizing and positioning.
If the combobox's and container's settings become inconsistent, then the
combobox popup will not get the correct size and/or position.
Move some of the style-dependent changes into a separate function and
call it when the QComboBox::changeEvent handles the style change so that
both widgets have a consistent set of settings.
Add a test case that verifies that the style is asked for the relevant
setting when the style changes.
Note: QComboBox does a lot of style-dependent setup work in different
places, which is quite messy and complex. Trying to consolidate that
further breaks tests though, so this change is doing the minimum
necessary to fix the reported issue.
Pick-to: 6.1 5.15
Fixes: QTBUG-92488
Change-Id: Ia957d504b2d800add26fc0565be727b5c08a5358
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QComboBox tests if a horizontal scrollbar is needed before sizing and
showing the popup, but QListView only knows whether a scrollbar is needed
only after laying itself out during the initial show and paint event.
So test whether the need has arisen as part of this initial layout, and
then provide the additional space. Resizing the widget after showing it
is not ideal, but in practice makes no visible difference (and it's
either way preferable to not being able to access the item covered by
the scrollbar).
Pick-to: 6.1 5.15
Fixes: QTBUG-93736
Change-Id: I0bf077e18116ce174ae7f9218cb3b0dfa82964e1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Force the emulator to use software acceleration to avoid a crash.
Change-Id: I1e73b8bc6485b0854cf83f5d9faa5d5f872a90df
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It was a necessary workaround at the time, but this has since been fixed
Task-number: QTBUG-90812
Change-Id: I8c0d5bf4c61d379736cd07a28c089c55d6befdee
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Give QCocoaMenu access to the item's visibility property by adding a
public getter, and respect that state when syncing the separator to the
corresponding QCocoaNSMenuItems.
Pick-to: 6.1 5.15
Fixes: QTBUG-88651
Change-Id: I7e238e5d3be141ec8f4e8f6f3ab22d761094d2d2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Fixes Integrity compiler issue where it cannot find implicitly defined
Change-Id: I126333dd4b02b9b653b8e1ac5da07679b343c91f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
QFuture shouldn't be passed by value: it's a reference counted
class ("shared future").
Change-Id: I3890062c45f9a6470b278223b88d482f57bf68a0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
As of 7b6cef0e65 the signal is a const
member function.
Change-Id: Ia5559904b7a47c9763863c73bb357d3d241307ea
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
When we draw menu item text with CoreText instead of QPainter, then we
need to translate QFont::underline() explicitly to an entry in the
attribute dictionary.
Task-number: QTBUG-73990
Pick-to: 6.1 5.15
Change-Id: I7e0c258f7cf80a89b29517fa8122576342654de1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Silences warnings
warning C4996: 'ID2D1Factory::GetDesktopDpi': Deprecated. Use DisplayInformation::LogicalDpi for Windows Store Apps or GetDpiForWindow for desktop apps.
Using GetDpiForWindow sounds like the right approach, but it's not obvious
where to get the window handle from here.
Task-number: QTBUG-94043
Pick-to: 6.1
Change-Id: I2fc005e0c970c8338184f4500b876774ec9d976b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This proposal collects all the resource objects to the qt-specific
property of the static libraries. This is done to avoid littering
of other static libraries and put resource object files to the
source part of the linker line when linking the end-point
executable.
The way we link object resource libraries is changed back to the
target_link_libraries approach as we may omit using finalizers
with linkers other than ld. Users may enforce finalizers by calling
the qt6_enable_resource_objects_finalizer_mode function if need.
Refactor tests related to the static resources.
Amends ddaa7150d8
Task-number: QTBUG-93002
Change-Id: I74135e291cd82fb54d1b284b4b4a1e002b1fef98
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Only use plugin finalizer mode if qt_finalize_target is called at the
end of the user project (which we can't really check, the user has to
ensure that) or when qt_finalize_target is automatically defer-called
by CMake 3.19+ (which is done by qt_add_executable).
This removes the previous behavior of using the finalizer mode if
qt_import_plugins is called. Instead the old regular mode is used
if the above preconditions are not met.
The removed behavior had ordering issues if qt_import_plugins was called
before target_link_libraries. The dependency walking would be done
before Qt dependencies were added and thus no plugins would be
linked.
Amends 6fcc272ac9
Task-number: QTBUG-80863
Task-number: QTBUG-92933
Task-number: QTBUG-94030
Change-Id: I78702b653a35596f5581c2f4282b2336f0124e60
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
fix debugging demangler
Emscripten apparently does not like the quotes in the compiler argument
and remove array syntax
Change-Id: I66652f6bdc5872faf540a877ca01bf75dde47bbb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This amends e2bdff3555.
The linearAdvance property has some history. First it was
a 16 bit value (allowing for 10.6 fixed point numbers). Then
it was turned into 22 bits to fit the 16 bits of Freetype
integer parts into it (16.6). Then back to 10.6. Then in
b7e4367387 it was turned
back into 16.6 again. But this was accidentally reverted
as part of a bad conflict resolution in
afb326f071.
Since there was no check for it, we would sometimes overflow
the linearAdvance, but only in the rare cases where the
width and height did not also overflow. Specifically this
is the case for whitespace, which always has a width of 0
regardless of the advance.
This change just moves the linearAdvance condition in
together with the other checks to avoid fragmentation, and
also adds this fun story to the commit log.
Pick-to: 6.1 5.15
Change-Id: Iaac09942f4c50d1aced4a160b6eabb11eb8e6373
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
It's possible that Qt is built with OpenSSL and some other backend.
The ifdefs generated are not mutually exclusive anymore, as it was
in the past. So tests should rely on the actual backend they have
working at runtime.
In the process of fixing the auto-tests, modernized feature #if-ery and
some associated compilation issues.
Fixes: QTBUG-92875
Change-Id: I2be1b924d506fd36dc4e2c6c9158b5023ff87f32
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This replaces QtAndroidPrivate::runOnAndroidThread{Sync} calls.
This also now allows passing std::function<> that can return values,
and not only an std::function<void()>.
This adds some tests for this calls as well.
Fixes: QTBUG-90501
Change-Id: I138d2aae64be17347f7ff712d8a86edb49ea8350
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Add NEON for RGB32 and RGBA64 writeback, and SSE2 for
RGBA64 writeback.
Change-Id: Id9ee803267a78f5bdff5beaa719e7a59c1dbb9fb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>