While working with HTTP/2, we are not re-sending failed requests.
In case we receive a GOAWAY frame, we properly handle it by
processing some active streams if possible, and aborting streams
that will not proceed further with ContentResendError. But it's
possible that some server failed to send us GOAWAY (for example,
it died) or closed the connection not finishing the streams that
were still active and valid (ID <= value from GOAWAY frame).
Now that we will not re-connect, there is no reason to be quiet
about us not progressing - emit RemoteHostClosedError on any
remaining active stream/request we cannot process further.
Fixes: QTBUG-77852
Change-Id: I4cd68a1c8c103b1fbe36c20a1cc406ab2e20dd12
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 543769666f)
QShortcut::event() did not call the base class implementation
QObject::event() which caused that e.g. QEvent::DeferredDelete was not
handled.
Fix it by calling QObject::event() when the event was not handled.
Fixes: QTBUG-66809
Change-Id: Ideebc980bc658f8f2b9ec4417e738bccda5eeab5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
While working with HTTP/2, we are not re-sending failed requests.
In case we receive a GOAWAY frame, we properly handle it by
processing some active streams if possible, and aborting streams
that will not proceed further with ContentResendError. But it's
possible that some server failed to send us GOAWAY (for example,
it died) or closed the connection not finishing the streams that
were still active and valid (ID <= value from GOAWAY frame).
Now that we will not re-connect, there is no reason to be quiet
about us not progressing - emit RemoteHostClosedError on any
remaining active stream/request we cannot process further.
Fixes: QTBUG-77852
Change-Id: I4cd68a1c8c103b1fbe36c20a1cc406ab2e20dd12
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
I realized this is a potential scenario where we will have leftover
data, but it wasn't covered.
Change-Id: Ibaf1015bf2aee120e4a4d98888925b88ecb6ddfd
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
And let the meat of the function be shared with the rbSwap routine.
Change-Id: I0ea18b30c26ff050c17dcb3ad4d654bfbb8c6221
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
- use std::make_shared instead of QSharedPointer
- two memory allocations saved
- co-locate semaphore and HRESULT object in a single State object
- one more memory allocation saved
- pass the shared_ptr<State> by value into the runnable
- two more memory allocations saved
Not only is the new code much faster, it's also much more readable.
Also use QSemaphoreReleaser, just in case the delegate should throw.
Change-Id: Ib99b9da86984d440d10b72e3071aa88099e24a1f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Cleanup GraphicsView examples with the help of clang-tidy
- modernize-use-nullptr
- modernize-use-default-member-init
- modernize-use-override.IgnoreDestructors
- Some QList -> QVector changes
- use nullptr
- use normalized includes, remove unused includes
- fix style
Change-Id: I79347e55bfde52f6ae7749cc7093fbd442044020
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The enum OptimizationFlag::DontClipPainter is deprecated and not used in
the code since Qt4 times. Therefore also mark it as deprecated so it can
be removed with Qt6
Change-Id: I318a55cf42e7a233d13d4ec0144e1977251f5c92
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
These topics were added to Qt Creator Manual 4.9 and 4.10.
Change-Id: I2e9bf355eb78b5e9877d0ca0bc41de00ed2b4333
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The minimum supported version is Windows 7. Remove
QOperatingSystemVersion::WindowsVista added by
b0cd007335 and replace with "true"
wherever it was used.
Change-Id: I08c0208467b655a921b6773f77d8bc099be69031
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Solves a few recursion problems in Qt, since then we won't try to
inspect the logging registry while creating the logging registry.
Fixes: QTBUG-78007
Change-Id: I44cc9ee732f54d2380bafffd15c0f51c7140682e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Words should not be abbreviated.
Split a long line and reflowed some comments in the process.
Fixes: QTBUG-78008
Change-Id: I52d75409f02e2cecbed3e94d424617ad594c275b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
I see no good reason why the NaN returned when reading "nan" as a
double should be a signaling one; a quiet one should be just fine.
[ChangeLog][QtCore][QLocale] The NaN obtained when reading "nan" as a
floating-point value is now quiet rather than signaling.
[ChangeLog][QtCore][QTextStream] The NaN obtained when reading "nan"
as a floating-point value is now quiet rather than signaling.
Change-Id: Ife477a30bfb813c611b13a33c38ea82f9e8a93eb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of four pairs of :1 :15 bit fields, use an array of four :1,
:15 structs. This allows to replace the case folding traits classes
with a simple enum that indexes into said array.
I don't know what the WASM #ifdef'ed code is supposed to effect (a :0
bit-field is only useful to separate adjacent bit-field into separate
memory locations for multi-threading), but I thought it safer to leave
it in, and that means the array must be a 64-bit block of its own, so
I had to move two fields around.
Saves ~4.5KiB in text size on optimized GCC 10 LTO Linux AMD64 builds.
Change-Id: Ib52cd7706342d5227b50b57545d073829c45da9a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Spell it out, or entirely remove it if it's not necessary.
Change-Id: Idc371427e9351d948245ce7b719e3457dfc27845
Reviewed-by: Matthew Woehlke <mwoehlke.floss@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Besides reducing duplicate code, this also improves the checks by
sharing optimized checks:
1. Fast memrotate will now also trigger with compatible formats (RGB32
over ARGB32)
2. Fast blitting will now also trigger with smooth transforms enabled,
if the coordinates are pixel aligned.
Change-Id: I576ebb34646d62ed472b1e1772e1b876b8121634
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
I was observing rare crashes on my mac, where I was using SecureTransport.
This would imply both the client (the test) and the server were working
in h2c mode. But this is against the test's logic - the first request
will be HTTP/1.1 (and upgrading protocol) and I wanted to send 3 HTTP/2
requests instead.
Fixes: QTBUG-77476
Change-Id: I048ca242e2096ca36dd112277807d1fee530150c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Change the lancelot baseline test runner to use generic text files for
host info data collection. This also avoids relying on QProcess and
scraping the bash scripts output from stdout.
Fixes: QTBUG-71836
Change-Id: I88a46c99dbb11f71afc18cae5a6d2fbebcbe76c5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
GCC doesn't like the sequence
: 5
: 5
: 8
: 6
: 8
and inserts a :6 padding between the :5 and the :8 and a :2 padding
between the :6 and the :8, growing the bitfield by 8 bits of embedded
padding and another byte to bring the struct back to sizeof % 2 == 0.
Fix by reshuffling the elements and adding a static_assert for the
next round.
Saves ~5KiB in QtCore executable size.
Change-Id: I4758a6f48ba389abc2aee92f60997d42ebb0e5b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Having hard-coded absolute paths in the xcode project breaks switching
between iOS and simulator builds.
Fixes: QTBUG-77804
Change-Id: Ib655bfc774b92c413a7b94ba4d005b6e1c4d2905
(cherry picked from commit 97465b1540)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Move fallthrough down, fixing:
tools\qregexp.cpp(3014): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
tools\qregexp.cpp(3054): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
tools\qregexp.cpp(3100): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
Change-Id: If25ddec5dc1d4929a3383729aabad89f5879e316
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Use qEnvironmentVariable() where applicable and refactor the
parsing of QT_SCREEN_SCALE_FACTORS to use QStringRef.
Task-number: QTBUG-53022
Change-Id: I8956c6cecd7b634679eb5e66d2a87cccaf9e7936
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
We don't need a getter for the 'preset' of a color-space, as color
spaces can be compared to the presets directly. This allows us to
remove the Undefined and Unknown values from the presets.
Internally we still distinguish known presets from unknown or undefined
presets via the magic 0-value. The validity of a QColorSpace is not
based on this preset, but on its actual values.
Fixes: QTBUG-77963
Change-Id: I1e0a2a4be83021b8c82b3c778019f680fd46455b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The regular expression was too greedy with the ".*" sub-expression,
thus if the prefix path contained underscores, the extracted
architecture value was wrong.
Example prefix:
~/dev/qt/qt514_built_android/qtbase
Example captured architecture:
built_android/qtbase/plugins/platforms/android/libqtforandroid_x86
First extract the file name from the given path, and then match
on just the file name.
Change-Id: I8e56e56747096c7a2398e959d91c2d1f65de2495
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
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>