The API is problematic for several reasons:
- the mixing of flags and enum in a single enum type
- the name "type" as somewhat overloaded
- the ease of misuse when comparing the result rather than testing
for a bit being set
In light of this, focus for 5.14 on the new isShortcut and
isSymbolicLink functions, thus migitating the problematic
isSymLink which conflates the two concepts.
Change-Id: I57e02321edd5061f69a775f04a0932ef89adf866
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This is needed after a37785ec76
deprecated the versions of QWindowSystemInterface::handleMouseEvent()
that were in use here.
Change-Id: Ib704ae2be905436f5a4a80ae6686b5fe3972d34c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Test more methods.
Document what the existing test covers.
Use the right #include for QDate.
Change-Id: I051542c244e5bc381aafa3ae38144e246919db7a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Aside from the start-date and the end-date, and a variant with a
time-zone, the lists various tests were building were all built the
same way; so pack that up as a pair of functions (one without
time-zone, one with) to save duplication. Make the list in each
function const, ready for conversion of foreach loops to ranged for.
In the process, replace QList with QVector, reserve space before we
populate and use auto for the now-const list variables it's saved in.
Change-Id: I7d8cce459a4d6111cd645e8d3966ad769ab7e201
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The lists of month and day-of-week names usually currently do not
exceed 13 elements (incl. possible leap months), so don't use
QVector, use QVarLengthArray with Prealloc = 13.
This value may be increased when ISO week-as-month is merged, but
the container remains valid even with 52 "months" (though the code
that calculates its runtime size will naturally need to be adjusted).
Change-Id: I4ead897d933f89fc092850fcc22ca41da0a6ddc6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Multiplying a Julian Day number by the number of milliseconds per day
does not get you a time since the start of 1970; it gets you a time
since the start of the Julian Day number system, which was several
millennia earlier.
Change-Id: Ic90a6c3de445baf9cfd30f28dd847f146e6a7adf
Reviewed-by: David Faure <david.faure@kdab.com>
This can, of course, only be done in private APIs - but comment on
public APIs to do the same at Qt 6.
Change-Id: I3c79951572be3c37b0b0c5b1b05bced051a40964
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Add some static methods to QGregorianCalendar, some of which serve to
implement its methods, that QDate can use to bypass vtables and
exploit fixed truths of the Gregorian calendar in its default
handling.
Change-Id: Iec191cdf4d52945dbd5679e609180cb4fe59b5fd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
From the API review.
Amends cd816d4b6a.
Change-Id: I3d3e2ef331501fa498545c5eec0e321544165b0d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
According to Windows docs, GetMessage() function retrieves the messages
from the input queue in defined order, where posted messages are
processed ahead of input messages, even if they were posted later.
Therefore, if the application produces a posted event permanently, as
a result of processing that event, user input messages may be blocked
due to hard CPU usage by the application.
It's not a problem, if an internal Qt event loop is running. By calling
sendPostedEvents() on the beginning of processEvents(), we are sending
posted events only once per iteration. However, during execution of
the foreign loop, we should artificially lower the priority of the
WM_QT_SENDPOSTEDEVENTS message in order to enable delivery of other
input messages.
To solve the problem, it is proposed to postpone the
WM_QT_SENDPOSTEDEVENTS message until the message queue becomes empty,
as it works for the internal loop.
Task-number: QTBUG-77464
Change-Id: I8dedb6837c6fc41aa6f497e67ab2352c2b4f3772
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
As an option. Must opt in via setting ExternalContentsInPass in
the flags for beginFrame(). It is somewhat unfortunate to require
declaring this up front, but forcing using secondary command buffers
always, even though beginExternal() may not be used in many applications,
would be an overkill.
Change-Id: I8d52bcab40c96f89f140c4c7877b6c459925e3c7
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Mainly to get the validation layer from newer Vulkan SDKs to shut up.
Change-Id: I3a00d2e7b5617eb1656625b1b2a919bb3c07feb9
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Mainly for Vulkan where it lacked the recording of the still queued
commands. Uncovered by Qt Quick examples that integrate custom Vulkan
rendering.
This still has an issue that needs to be tackled separately. (we probably
will switch to using a dedicated secondary command buffer with
RENDER_PASS_CONTINUE_BIT for the external commands, and then just have
a vkCmdExecuteCommands in our own queue instead of recording everything in
beginExternal).
The possibility of losing glMemoryBarrier() calls due to begin/endExternal()
with the OpenGL backend is fixed too. The logic here mirrors Vulkan
to some extent except that we do not have a concept of (and so the trouble
with) renderpass instances.
Clean up around the implementations of finish() as well. Attempting to share
code via a "flushCommandBuffer" function is admirable but is not worth it
since some semantics are different. (finish() cannot be called within a
begin/endPass, unlike begin/endExternal).
Change-Id: I5137db598d6a40d484e53678f5c919abf750d9ed
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Qt Quick in turn will expose it via QSGRendererInterface. Essential when
adding custom Vulkan rendering into a Qt Quick application because the
custom pipeline state objects will need to reference a VkRenderPass.
Change-Id: Idf4092cfc3937830fb8123164081059b0d8d030e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
If an item is double clicked, then without this fix, the views emit the
clicked() signal when the mousebutton is released after the double click
event. This is unexpected and wrong.
QAbstractItemView keeps track of the item the mouse was pressed on, to
verify that the release occurred on the same item before emitting
clicked, and to make sure we have a valid pressed item before initiating
drag'n'drop. By resetting d->pressedItem when a double click has been
handled, we can prevent the emission of a clicked signal in the next
release event.
[ChangeLog][QtWidgets][QTreeView] Don't emit clicked signal after a
doubleClicked signal.
Fixes: QTBUG-77771
Change-Id: I05988e9e2222157f4216cebc40c22507e8d83b82
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
Except for the case of syncing in response to an expose event,
where the platform asked us to flush a specific region, we
should strive to only flush parts that have been repainted.
And we should flush those parts to their nearest native child,
instead of unconditionally flushing the root/top level widget
as well.
By allowing drawWidget to schedule the flush we automatically
flush the minimal region, to the right widgets.
Change-Id: I73c143761d4a0da6991433b41dea0a0bc83a448a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The enum GraphicsItemChange::ItemMatrixChange is deprecated since Qt4
times. The corresponding matrix functions were also marked as deprecated
in 5.13 but the enum was forgotten. Therefore also mark it as deprecated
so it can be removed with Qt6.
Change-Id: I39bec89af14aaefe2e504f5a890ef314574766a1
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
qmlfiles are the same for all ABIs, and installing them for all leads to race condition
Change-Id: I69fe062f59f1d7c028dff5212e2f2fac7e71398d
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This configure parameter is useful to compile Qt only for a selected ABIs.
The old parameter, -android-arch, does the same thing, it's kept for compatibility.
[ChangeLog][Android] -android-abis configure script parameter useful to compile Qt
only for a selected Android ABIs.
Change-Id: I1f418c7e0914dd83b98d763e8cd8c09841e20fdf
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
- add missing explicit
- drop static from member functions that aren't static in the regular version
(ie. all functions)
As a drive-by, remove redundant inline keyword where it doesn't cause
wanton inconsistency with surrounding code.
Change-Id: I5aed73c3afa85d98d97b57c2c1874b1a5e664960
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This is private API for the time being. Without this the QRhi*
classes show up in the class list in the docs.
Change-Id: I662abb9cc8eaae13ffe9266bd6313faa8e138353
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Multi arch build in one go is need to support the new .aab packaging format.
By default the users apps are built for all Android ABIs: arm64-v8a armeabi-v7a x86_64 x86
The user can pass ANDROID_ABIS to qmake to filter the ABIs during development,
e.g. qmake ANDROID_ABIS="arm64-v8a armeabi-v7a" will build only for arm ABIs.
[ChangeLog][Android] Android multi arch build in one go,
needed to support the new .aab packaging format.
Change-Id: I3a64caf9621c2a195863976a62a57cdf47e6e3b5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
It is no longer needed after qt_dirtyRegion was removed in e2a1fb901.
Change-Id: I120df76b08808842b304cb8de10de23ccd0e2845
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Including renaming the member touched by this function. This leaves the
logic for appendDirtyOnScreenWidget, which still needs investigating.
Change-Id: I405a5e3757f0a79992f88d9f70867aeb7b9764d8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Change-Id: Icf177a5b559bd1c108a66ee14a51fb23cd36e083
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
As was recently discovered, the debug_and_release CONFIG value is
always true on Windows, even if the feaure is disabled when specifying
-debug or -release when configuring Qt.
In order for the generated CMake Config files to be correct, we need
to use the true feature value.
Amends 44602224bf.
Change-Id: I42be684e8ad2a5ce72cb2e9d36f81de7589112c6
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
If Qt is configured with -release or -debug we must set CMAKE_DEBUG_TYPE
or CMAKE_RELEASE_TYPE, but not both.
This was broken by 82a2c7df which fixed the issue for iOS
simulator_and_device builds.
We have the following situation for both relevant CONFIG values:
debug_and_release build_all
iOS simulator_and_device unset set
Windows -release set unset
Windows -debug-and-release set set
Trivia: On Windows, when configuring with -release (or -debug) then
the *feature* debug_and_release is not set.
The *CONFIG* *value* however, is unconditionally set in
msvc-desktop.conf.
Fixes: QTBUG-77754
Change-Id: I326ecb024056bc189be5fa03ec6f59bc71226544
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>