Mark QCalendarBackend as internal since it is in a private header
and fix some issues in the QCalendar related classes.
src/corelib/time/qcalendar.cpp:201: (qdoc) warning: clang found diagnostics parsing \fn int QCalendarBackend::daysInMonth(int month, int year) const
error: incomplete type 'QCalendarBackend' named in nested name specifier
(repeats)
src/corelib/time/qdatetime.cpp:1426: (qdoc) warning: Unknown command '\override' (repeats)
src/corelib/time/qcalendar.cpp:642: (qdoc) warning: Undocumented enum item 'Last' in QCalendar::System
src/corelib/time/qcalendar.cpp:642: (qdoc) warning: Undocumented enum item 'User' in QCalendar::System
src/corelib/time/qcalendar.cpp:744: (qdoc) warning: Undocumented parameter 'year' in QCalendar::isLeapYear()
src/corelib/time/qcalendar.cpp:923: (qdoc) warning: Can't link to 'dateTimeString()' (repeats)
src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'year' in QCalendar::partsFromDate()
src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'month' in QCalendar::partsFromDate()
src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'day' in QCalendar::partsFromDate()
src/corelib/time/qdatetime.cpp:1425: (qdoc) warning: Undocumented parameter 'nmonths' in QDate::addMonths()
src/corelib/time/qdatetime.cpp:1467: (qdoc) warning: Undocumented parameter 'nyears' in QDate::addYears()
src/corelib/statemachine/qstatemachine.cpp:2522: (qdoc) warning: Undocumented enum item 'StateMachineChildModeSetToParallelError' in QStateMachine::Error
src/corelib/kernel/qtimer.cpp:602: (qdoc) warning: Undocumented parameter 'connectionType' in QTimer::callOnTimeout()
src/corelib/time/qcalendar.cpp:159: (qdoc) warning: Undocumented parameter 'name' in QCalendarBackend::QCalendarBackend()
src/corelib/time/qcalendar.cpp:159: (qdoc) warning: Undocumented parameter 'id' in QCalendarBackend::QCalendarBackend()
src/corelib/time/qcalendar.cpp:529: (qdoc) warning: Can't link to 'registerCalendar()'
src/corelib/time/qcalendar.cpp:529: (qdoc) warning: Can't link to 'fromName()'
src/corelib/time/qcalendar.cpp:178: (qdoc) warning: Can't link to 'QCalendar::fromEnum()'
src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Undocumented parameter 'jd' in QCalendarBackend::dayOfWeek()
src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Can't link to 'weekDayName()'
src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Can't link to 'standaloneWeekDayName()'
src/corelib/time/qcalendar.cpp:268: (qdoc) warning: Can't link to 'daysInMonth()'
src/corelib/time/qcalendar.cpp:268: (qdoc) warning: Can't link to 'isLeapYear()'
src/corelib/time/qcalendar.cpp:295: (qdoc) warning: Can't link to 'daysInMonth()'
src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isLuniSolar()'
src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isSolar()'
src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isLunar()'
src/corelib/time/qcalendar.cpp:340: (qdoc) warning: Can't link to 'daysInMonth()'
src/corelib/time/qcalendar.cpp:357: (qdoc) warning: Can't link to 'daysInMonth()'
src/corelib/time/qcalendar.cpp:544: (qdoc) warning: Can't link to 'fromName()'
Change-Id: Ia2fabefb917f8e4cfa361044d9b754717276f4aa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QGraphicsItem::ItemMatrixChange has been deprecated since 5.14. Fixed
the usage in tests to compile condinionally, only when it is available.
Change-Id: I63e892a01a50fb9ac51bf38eb761cb26375bc194
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
As a rule, we don't deliver touch events containing only stationary
touchpoints. To fix QTBUG-52510 we added an exception in
1bd0ab7050 : if the velocity changed,
deliver it anyway. Now we need to do the same if the pressure changed.
Also, on the customer's hardware, pressure is indicated via ABS_MT_PRESSURE.
Change-Id: If7f7088df055d686cdd86967b999e38024f8170f
Fixes: QTBUG-77142
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If name argument is empty, e.g. an icon is created by
QIcon::fromTheme(""), then icon_name_hash() will access
a byte at index 1, which is outside of the string.
Change-Id: I109c476718939d7dd252007ebac48c3dbbeceb72
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The _q_error slot has a special case for RemoteHostClosedError,
where the current channel's state is 'idle' and no request/reply
is in progress. The comment states that:
"Not actually an error, it is normal for Keep-Alive connections
to close after some time if no request is sent on them. No need
to error the other replies below. Just bail out here. The _q_disconnected
will handle the possibly pipelined replies."
_q_disconnected, indeed, takes care about pipelined replies ... calling
'ensureConnected' even if we have 0 replies in pipeline, which makes
zero sense to me and results in QNAM endlessly trying to re-connect
to the server.
Fixes: QTBUG-77852
Change-Id: I6dcb43b36a6d432bc940246a08f65e1ee903fd24
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
One include too many and one too little.
Change-Id: I9963adb02523305d753135c0f5a6baefb83a06f1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Stop using QExplicitlySharedDataPointer, makes it possible to inline
the move constructor and assign operator.
Also protect other methods from nullptr d_ptr, and change the default
constructed value to also have a null d_ptr, to match the result after
a move.
Change-Id: I40928feef90cc956ef84d0516a77b0ee0f8986c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Move aab, apk, apk_install_target to !build_pass, otherwise these targets
will be executed for each android abi.
Change-Id: I18f6c8946f503f2c08338f24758bf9059987fe0f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Unlike other accessibility classes, QAccessibleTree is returning a
different instance, with a different ID, every time child()/childAt()
are called for the same child elements. This causes
ElementProviderFromPoint to return different IRawElementProviderSimple
instances every time, for the same coordinates, which causes the
NetEase Youdao Dictionary to call it in an infinite loop, allocating
new QAccessibleTableCell instances, until the application crashes.
The crash happened, for instance, just by using the mouse over
Qt Creator's project tree while Youdao Dictionary was running. While
the root cause seems to be QAccessibleTree not caching and reusing
objects, this change adds a layer of safety to the UI Automation
classes in the Windows QPA, to avoid causing a crash until
QAccessibleTree, and possibly other accessibility classes, are fixed.
Fixes: QTBUG-77974
Change-Id: I9b0c8174bc0fd9ef7f5626ee0b72c8a9626520ee
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Fix an API review finding in 5.14, amending
6b9d319b26.
Change-Id: I6c67ebde91021b87a43a86ff831b724f098019aa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In QPainter, there is a shortcut code path for the drawImage(point,
image) call, relative to the full drawImage(targetRect, img,
srcRect). The lance script interpreter would only use the latter, so
the former was not covered by the tests.
As a driveby, remove the pointless usage of non-default dithering
flags in drawImage(), since it is more important to test the default.
Change-Id: Id373fd528a0c4c40b6bd8eea37b960fd7cdb2cc7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Call into the theme to update the fonts on a change. This
at least helps in the case of disabled High DPI scaling.
Task-number: QTBUG-77144
Change-Id: I2c8fd85259403eaaeea56cd096f99116fc6bba9a
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This broke when QLatin1Literal got deprecated in change 45373c1924
Both hunks in this patch are needed. The hunk in syncqt.pl removes the
QT_DEPRECATED_X(...) macro if it appears solely on a line in source code,
the second hunk inserts a newline after the QT_DEPRECATED_X(...) macro usage
to trigger that code path in the Perl script.
Before/after comparison of the headers generated in include/QtCore:
```
% diff ~/old.txt ~/new.txt
105a106
> QLatin1Literal
```
Change-Id: I468dd2dd54bf115521ed82c6182236905556f568
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
In case a text to be layouted contains more than 128 directional characters
it causes the application to crash
The function initScriptAnalysisAndIsolatePairs() collects information of
RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is
capped to 128. Later the function generateDirectionalRuns() iterates
the text again and tries to access items from the previously capped vector
above the upper bound.
Task-number: QTBUG-77819
Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit 1232205e32)
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In xcode projects we replace the _debug part of referenced libraries with the
variable $(QT_LIBRARY_SUFFIX). This only worked for libraries passed with -l.
Make the library suffix replacement work for libraries passed as absolute paths
too.
Fixes: QTBUG-77804
Change-Id: Iac2dbd2f67c3fa0f415ac43cbab5a906657164e5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Removing a qPostRoutine is an O(N) operation. It's perfectly ok to
keep calling it even if the list has become empty before.
Just qAddPostRoutine in the deviceList's ctor and never remove it
again.
Add a missing qAsConst as a drive-by.
Change-Id: I25f824b74012146214568cfccb22c5dba3ca38ef
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
-android-toolchain-version is not needed anymore as we are using exclusively the llvm toolchain.
Change-Id: Ia033297a6a2c968352c364758eb1436380a5f96e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
In case a text to be layouted contains more than 128 directional characters
it causes the application to crash
The function initScriptAnalysisAndIsolatePairs() collects information of
RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is
capped to 128. Later the function generateDirectionalRuns() iterates
the text again and tries to access items from the previously capped vector
above the upper bound.
Task-number: QTBUG-77819
Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Mention that this method returns an indented document.
Change-Id: I0cadcc1c894c9a87910cfce389c6a5288238044d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
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>
Move hardcoded date to the only client code in the repo.
This field is currently modified by MaintenanceTool and possibly windeployqt,
which contributes to breaking the DLL signature on Windows. Removing the field
should avoid this problem.
Task-number: QTBUG-76985
Change-Id: I01386136ac493ea50c99c05879a3e215f3f6344c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
When the end range of a byte range in a HTTP request is skipped the download
manager adds 0 it its place when resuming that download.
When there is no end range given the value is skipped.
Task-number: QTBUG-77867
Change-Id: I52358c94cf56c88217fcc91abb102ed393ac7242
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This makes it visible also in the overview documentation of the module,
and can be used to automatically generate attribution documents.
The code actually mentions the names and file versions (CVS?) where things
got copied from; however, X11 seems to have stopped using CVS a long time
ago, and without a server it's hard to determine the exact X11 version that
was copied from. It arguably doesn't matter, anyhow, because we won't update
the code anymore.
Fixes: QTBUG-70556
Change-Id: Ib17117a1a3c4112b81982afbd51273048a43221a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
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>