Add 'Private' suffix to the internal module names in the mappings of
the qmake files.
Change-Id: Iacc487aa5e463a522341e526bf8580be2868cf37
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When the listview setWordWrap is true and ScrollBarPolicy is
ScrollBarAsNeeded, if QStyle::PM_ScrollView_ScrollBarOverlap
returns true, the text displayed an empty line.
Fix this by not reserving the width of the vertical scrollbar
if the flow is TopToBottom and the vertical scrollbar, and QStyle
returns true for PM_ScrollView_ScrollBarOverlap. Amends
aeef92c3c3
Pick-to: 6.1 6.2
Fixes: QTBUG-94248
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I4d47c7e86bbb86474cb1a99bb26d8b67f0e8a7e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
'ld' only capable to resolve circular dependencies by wrapping the
suspected static libraries and objects using --start/end-group
arguments. We want to detect if linker is 'ld' at configure time to
decide how to link the resource objects if finalizers are not enabled.
The qt_config_compile_test function is extended with an extra argument
since it's required to pass custom cmake flags to the ld-related test.
Pick-to: 6.2
Change-Id: I484fcc99e2886952d8b0232f37e4e6a35d072931
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Fix docs to state that findClass() returns a global ref from the
cached classes list.
Pick-to: 6.2
Change-Id: I7c45cc4c9e1c6e109db7cf7d926a250592798972
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
For auto-tests that were temporarily disabled. Similar to
network-settings.h, header-only stuff.
Fixes: QTBUG-92866
Fixes: QTBUG-92877
Change-Id: I15b5c0b41f0d8bfe59b09c844884ff6d99e6d41a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
As QWindowsPipeWriter now maintains a chunk queue, there is no need to
use the internal QIODevice buffer and wait for the previous operation
to complete.
Change-Id: Id4d54edfe920aeb4a534980cb0cc85a56c067a70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
In a13e8d6660 which provided the move
and decoupling of OpenGL code the !makeCurrent-succeeded &&
!context-is-valid condition got changed to !makeCurrent-succeeded &&
context-is-valid which makes no sense because what we test for is
context lost situations, in which case makeCurrent fails and isValid()
reports false.
Restore the ! that went missing in the above mentioned patch.
Pick-to: 6.2 6.1
Change-Id: I94f84d2853bcbd2965f76ecd665d3614b1f0e746
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
On styles where the tab bar's scroll buttons are rendered semi-
transparently, or where the buttons don't fill their entire rect (for
example have rounded edges), the tab that's covered by the buttons
should not shine through the gaps, or even shine through the button.
Clip the painter so that the area of each button is not painted by the
tabs.
Fixes: QTBUG-50866
Pick-to: 6.1 6.2
Change-Id: Ie81f6d260f36d5a17868822e683745844a6a6b2f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When pressing an index in order to start a flick gesture, QAIV sets
the current index. When QScroller changes state to Dragging, then
QAIV restores the current index to what it was before the press, as
the user is clearly scrolling the view. With autoScroll enabled, this
will produce an ugly jump if the old current index is no longer in
the viewport.
To prevent this, disable autoScroll before restoring the currentIndex.
Fixes: QTBUG-64543
Pick-to: 6.2 6.1 5.15
Change-Id: I3e0a18a6a179d80b9d810fce5aa658f0cfff9a29
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When finding the index we need to scroll to, use the one where both start
and end of the tab rect are outside the currently visible section.
Otherwise we wouldn't scroll when the left-most index ends outside the
visible section.
Add test, which requires that the scroll buttons have object names.
Fixes: QTBUG-70498
Pick-to: 6.2 6.1 5.15
Change-Id: Id153c77dd5fca146612375e0ff39bd1f3e0536b1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The reply needs to be parented or it's not guaranteed to be deleted
Pick-to: 6.2 6.1 5.15
Change-Id: I7cbc31682f80dbbd9fb240fff9e6781cb6ca7b36
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
NSWindowStyleMaskMiniaturizable also controls programatic
minimize, in addition to the window decoration button.
Fixes: QTBUG-65637
Pick-to: 6.2 6.1 5.15 5.12
Change-Id: Iac5fb483433441173d770f4fcfb9e93440b9fe6a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Update documentation to not reference API that is obsolete in Qt 6.
Also fix documentation for changed behavior (isNull()), and
fix snippets.
Pick-to: 6.1 6.2
Change-Id: I526efeff63d907bbadd5e8a539ccf237cb992125
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Option-clicking the close-button on a window in macOS is a request to
batch-close all the windows. When this happens we get an event in through
the window that was clicked, which in turn results in AppKit calling
windowShouldClose: for each window. We respond to that by explicitly
closing each window (instead of just responding YES or NO), which
results in the window being released and deallocated. This causes
a crash when AppKit then follows up by closing each window after we
responded YES to windowShouldClose.
We work around this by keeping the window alive in the closest auto
release pool, which is typically at the level of the runloop. This
ensures that the window is alive for the duration of the logic that
AppKit has for batch-closing windows.
Fixes: QTBUG-92232
Pick-to: 6.2 6.1 5.15
Change-Id: I68b6138eb8325af0576b438ffa011137fec27926
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This reverts commit f6fa4b39ee.
Reason for revert: c76a2d7c9c was
not enough to catch all cases.
Pick-to: 6.2
Change-Id: I5830ab20b1f4d26a0a201c3dd5aaee6b10aa12ac
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This matches the behavior of other implementations, such as
QEGLPlatformContext: doing a qWarning with the relevant error
from eglGetError() or equivalent is helpful when something
goes wrong and should be common among QOpenGLPlatformContext
implementations.
Pick-to: 6.1
Task-number: QTBUG-85714
Change-Id: Ifa5d22b83808c92ae92efcbcddc8d8c3d3ba34b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The loop that initializes the item should execute at least once, so the pointer
should be pointing to something valid. The static analyzer doesn't see that,
and warns about unguarded access to the item pointer in report with hash
d008dbef4573afca54be0139e2971a4a. Add asserts for both the condition that makes
the loop run at least once, and for the item pointer not being nullptr.
Pick-to: 6.1
Change-Id: I94b9f3db3b3ce3d82445cf66788c05854b441aaf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
QIntValidator::validate documents correctly that any input with "at most
as many digits as the top of the range" returns Intermediate. This is
needed to avoid input deadlocks where one can't go from 9 to 15 if the
range is 8 to 16.
Fixes: QTBUG-94269
Pick-to: 6.1 5.15
Change-Id: I6776e09fc231249fe78f9e6106492f8454b70a03
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Add a noexcept from a doc signature that was missing it.
Change-Id: I30b429a6ec4d182551ca68767d1c8aa61c9e4c09
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
refT()/derefT() can be marked noexcept; we don't care about not
overflowing the refcounter as a precondition. (This is BC, as no
compiler mangles noexcept.) This in turn allows to mark a constructor
calling refT() as noexcept.
Driveby: mark also the same functions to not be `const` in Qt 7.
They clearly are meant to modify *this, and constness only works
because of the unmanaged (raw) d-pointer.
Change-Id: I8d7d365640ff2e1cedc0a234c9abccdfc95ba6e3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
std::exception_ptr is a reference-counted "smart pointer", so we
shouldn't copy it around freely. Unfortunately QFutureInterface
has exported functions taking it by value, so we can't just change
the signatures and keep BC. Simply prepare the code for Qt 7.
Change-Id: Ic5aae6a095c8c842872a40db440c99d2dfe371f1
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
This means calling 'ninja apk' in a Qt build with examples configured
will build all example apks, regardless of whether the examples are
built as external projects or in-tree.
Fixes: QTBUG-94264
Change-Id: I5c7af0354858898a2e154a6d54fb025e4d81ff80
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This means calling 'ninja apk' in a user project with multiple android
applications will build all their respective apks.
For user projects, make the 'apk' target part of the global 'ALL'
target, so that a regular 'ninja' call implies the 'apk' target.
We don't do it currently for Qt builds, because certain test
executable apks fail to build.
Add a QT_NO_GLOBAL_APK_TARGET_PART_OF_ALL variable to allow removing
the global apk target from the 'all' target.
Pick-to: 6.1
Task-number: QTBUG-94264
Change-Id: I171b9da50eb7d670176704bd26dc1c492118b434
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Mainly to avoid leaking memory again. A possible reduction of memory
allocations would be a welcome side effect.
This reverts parts of 89f7389494.
Change-Id: I65a7529f532175967a4e408450aa55549b77d7e4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This should have happened when changing the code in
f493d41722
Fixes oss-fuzz issue 31633.
Pick-to: 5.15 6.1
Change-Id: I7945c3f90651f8fa04df20fbaf0b0c7f68619407
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Now that inputs (81152194) and outputs (3f0858ed) are explicitly set for
the preprocess stage we can enable the new build system.
Using the legacy build system will produce a build error in Xcode 13,
but the build will succeed:
error: The Legacy Build System will be removed in a future release.
You can configure the selected build system and this deprecation
message in File > Project Settings.
Fixes: QTBUG-71035
Pick-to: 6.1 5.15 5.12
Change-Id: I108d2103872255d10de2ff5161eef892065da1c4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The error that the actual runtime will encounter, and not the one that compile-time
ifdefs will (potentially) erroneously select.
Change-Id: I8ef4c34bcb8b3e568bc39f8c8ea6bfb7732f9e27
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The name stored in a QMetaTypeInterface should already be normalized, as
a static metatype uses typenameHelper, which takes care of
normalization via QTypeNormalizer.
For dynamic metatypes, we don't have that guarantee, but those can only
be created by Qt, as there is no public API for it. We can thus ensure
that we only create normalized typenames (which we currently do anyway),
and skip the normalization in registerCustomType.
Change-Id: I18728031825cd39fdbe17cad0fbc6e3b5fd03c93
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Do a quick check whether the type name contains an anonymous type. If
so, do not try to use optimized version. The simple check should still
be faster than calling normalizeType unconditionally.
Also only apply the faster version for clang and gcc, instead of all
non-MSVC compilers. Applying it to other compilers would require further
testing to handle anonymous structs.
Moreover, remove space before '(', which is necessary for function
pointers.
Fixes: QTBUG-94213
Change-Id: I795d1964f7a68daa6f9a5f262816d51ee7728788
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Make it return bool since the TriState was really only used signify that
the property was unsupported but there is already a separate way to
check if it's supported. More importantly there is no different set of
actions available to a user if they're in the Unknown or False state.
Because of the change to bool, we also rename the property to have an
'is'-prefix.
Change-Id: Iaaaad5ac31e663c36e00223bf5b0e719f412fc69
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Change-Id: I7e0fce63883019278ceb9dc757bf10ee9d77097c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Since icon, checkmark, text, and shortcut are each rendered aligned
within their own column, we need to take the widest of each element
into account when calculating the size requirement of each item. Otherwise
an item with very long text but no icon will get enough space for the
text, but no space for the icon, resulting in the text running over the
shortcut or edge of the menu.
Fortunately, QStyleOptionMenuItem provides us with the necessary
information.
Fixes: QTBUG-86754
Pick-to: 5.15 6.1
Change-Id: I0cf0e9adfe480d1004106e7475e498e718bf027b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Fixes
warning C5046: 'testObject::MyTestObject::toString': Symbol involving type with internal linkage not defined
Change-Id: I9925eb15e262f29e636c019c87311a6ea2c47505
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Since 0f1008a593, views record if they
moved the item in the model, and prevent the deletion of the source item
in QAbstractItemView by setting the dropEventMoved private data member.
However, QListView in icon mode is special: it doesn't rearrange the
model, it repositions the icons in the view. While the dropEventMoved
logic was applied to the drag event filter to prevent deletion, the
variable was never set in the filterDropEvent handler. The drop event got
ignored, breaking rearranging of icons.
Fix this by setting the dropEventMoved member in filterDropEvent.
Fixes: QTBUG-94226
Pick-to: 5.15 6.1
Change-Id: I963f5db0f81bcd0d25eef05d9a265be00a5871f6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
In MultiSelection mode, items are by default toggled on press, which
follows the example of standard Windows controls. However, when dragging
is enabled, then the press might be the beginning of a drag'n'drop
operation, and deselecting the item on press breaks the selection and user
experience.
Don't toggle the selection for presses on an already selected item that
might get dragged; instead, wait for the release event.
Extend the test case slightly to cover the special case. Dragging a
selection in a drag-enabled and MultiSelection item view wasn't possible
before either.
Fixes: QTBUG-59888
Change-Id: Ibd3e95a71ea63dd1e9bc3c8a723eafa9a1c21afa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
Adapt to coding guidelines and use raw string literals.
Change-Id: Ice9a87cafb22e01a361ad44221d561a298e5af05
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Remove the [&] capture in runOnAndroidMainThread() for void type.
Replace the old private QtAndroidPrivate::runOnAndroidThread()
with QAndroidApplication::runOnAndroidMainThread().
Task-number: QTBUG-90501
Change-Id: I41eaf1ea9ee68b22861bf498f12a97a02515cc47
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
If only qtbase is installed, androiddeployqt might call qmlimportscanner
which will fail to find a qml dir under the Qt install path. Thus, we
check if the qml dir exists before calling qmlimportscanner otherwise
throw a warning.
Fixes: QTBUG-89588
Change-Id: I706eb2a233e9ab5b250652cd46aae75cab178648
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
In debug this cuts off about 4 seconds off of the qtimezone test on my
machine. In release it's about 300-400 milliseconds.
Change-Id: I92ec18794247e3846704a7c8e87a8c34fdae5e3c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
In ExtendedSelection mode, a Ctrl+Press might be both the start of
a selection toggle, or the start of a Ctrl+Drag operation.
If we already toggle on the press, then it's impossible to drag the
existing selection while the Control key is pressed. Ignore Ctrl+Press
events and let the corresponding release event toggle the selection.
Adjust the relevant test cases accordingly. The QItemDelegate test
case used a click+control event incorrectly, such an event doesn't
change the clicked state and should not be eaten, and now it does
change the selection, so fix the test.
Task-number: QTBUG-59888
Change-Id: Ia76126e31c28bc97d3e93e54965bdb1d0b8ac6a4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>