This amends f5fe9fc5a4
Change-Id: I1d21f5b5f4896a11376f37ed0e39f00f2214c67b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Commit ff2a71e3 accidentally removed a code snippet used in documenting
EasingCurve::EasingFunction. This commit restores it and fixes other
minor issues in QEasingCurve code snippets.
Change-Id: Ib19f602a4abbca3511d3d26c5f6da4910f7104a3
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Some of the claims made were not strictly acurate.
Change-Id: Ia7c83ce44257acce32814c0bbb3b787bb6b8596b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Destructors whose base class have a virtual destructor are
automatically virtual and do not need to be marked as such.
Change-Id: I84c73ab965077bbb03f4213e53c241569213cae0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Align the constness of QColor::getCmyk and QColor::getCmykF with the
rest of the family (QColor::getRgb etc.) by adding overloads. The
non-const methods could be removed with the next major release as that
will break binary compatibility.
Task-number: QTBUG-65176
Change-Id: I8579928a43fb59aed3319ff73481994a54b274f8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QTreeView has a special implementation of keyboardSearch() which is not
consistent to the base implementation regarding the selection behavior:
- currentSelectionStartIndex is not set which results in a wrong
mouse selection behavior afterwards
- only the current index is set but not the current selection
Sync the behavior by calling setCurrentIndex() directly in QTreeView
too.
One problem remains with this patch - the key handling is still
different between QAbstractItemView and QTreeView for repeating key
presses.
Task-number: QTBUG-18862
Change-Id: Ife79d146cf16d6ecbf9f86540777dae15aa1ffb0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
New API in QMessageDialogOptions and implementation on Android.
Task-number: QTBUG-35545
Change-Id: I59567251199f220862d01ba76979266379eecd86
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This change removes redundant 'virtual' from function declarations.
Clang Tidy's modernize-use-override check reports:
warning: 'virtual' is redundant since the function is already
declared 'override'
CppCoreGuidelines say:
C.128: Virtual functions should specify exactly one of virtual,
override, or final
Change-Id: I9a4bdd6cc041d46ae64b25597ba4f7268ac4c2b7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Before asking a image format handler to save an image, QImageWriter
sets the value of all supported options. For options like quality and
gamma, the default value is an illegal value (-1 and 0.0 resp.),
effectively telling the handler that the application has not requested
any particular value. But in the case of compressionratio, the default
was 0, a legal value. Fix by changing it to -1.
Change-Id: Iad6d4c2dbe269b25863e7d4967aa9ed2a7d1247f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Initialize the lastDir properly, to avoid the stroking algorithm doing
direction-change handling for a single line. That could cause a cap to
be painted for a single FlatCap line.
Also fixes a bug in tst_qpainter, revealed by the above fix. The
result drawPolyline was erroneously compared to the result of drawing
the lines individually, for a case where the former correctly paints
the pixel of the join point in the corner, while the latter by
coincidence used to paint the same pixel as a cap because of the bug
above.
Task-number: QTBUG-70101
Change-Id: Ie20eda33214cfe9e7627f17ef4c7a5b3835c9c24
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Tool tip text is drawn by QLabel using ToolTipText
text role. Give it a system palette entry.
Change-Id: I2e1b4f0b130783efd8d03f53a42c3e64aec32425
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
As it's done (albeit in old-style there) in other public QSsl-classes.
Task-number: QTBUG-70604
Change-Id: If3cd9da0e8f8378fd29a80215cd889e459aa7bce
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
In QWidget-world it's normal for input events to have the accepted
flag false by default, so that it's obvious after visiting a widget
subclass that does not override a particular handler function that it
did not handle that event type at all. For tablet events in
particular, the contract (to which we've been paying more attention to
ensure that QTBUG-47007 remains properly fixed) is that if a
QTabletEvent is not accepted, a mouse event will follow.
Tablet-unaware applications need to get the same mouse events from a
Wacom stylus as they would receive from an actual mouse.
In this case the issue was missing hover events (mouse movements
in which no mouse button is pressed). Without those, the enterEvent
and exitEvent virtuals are also not invoked properly.
Task-number: QTBUG-47007
Task-number: QTBUG-65199
Change-Id: I957005aad9d2bf85a3a41bbdebe3e046e34dee4d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
When storing the persistent indexes within _q_sectionsAboutToBeChanged()
there was a limit one how much persistent indexes should be stored due
to performance concerns. This resulted in unhiding hidden rows.
The rationale behind this was that storing persistent indexes is slow
and that hiding a large amount of rows/columns should be done with a
QSortFilterProxyModel.
Fix it by removing the limit since it does not really hurt performance.
Task-number: QTBUG-70633
Change-Id: I2311213c2b63c67e2210aa7f73f07d28dc0e47be
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The loop in recalcSectionStartPos() calls QVector<>::constEnd() after
every iteration which is not needed since the vector stays constant.
Therefore use the new for loop syntax from c++11 so constEnd() is only
called once which gives a small speedup, noticeable with large section
counts.
Change-Id: If318eec10c9ce234004a9922409fbdbc6409f2f8
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
layout(AboutToBe)Changed gained a sortHint parameter with Qt5.0 but the
itemmodels did not set a proper value where possible.
Since the sorting of the ItemWidgets is only per column, it is
reasonable to pass QAbstractItemModel::VerticalSortHint in the various
layoutChanged calls.
Change-Id: Ia11322bae1a96bc0d7d8422558a11cdfe04c2808
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
A result of typo/incorrect keyboard modifiers extracted +
wrong button sent via QWindowSystemInterface::handleMouseEvent.
Task-number: QTBUG-70512
Change-Id: I809168e363496884312412051e8d435f5794b3be
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
According to the SSL_CTX_set_max_proto_version manpage [1]:
> Setting the minimum or maximum version to 0, will enable protocol
> versions down to the lowest version, or up to the highest version
> supported by the library, respectively.
This should make it possible to use Qt Network with older versions of
libssl than it was compiled against. In particular, use with 1.1.0 when
compiled against 1.1.1.
Also, one of OpenSSL developers is suggesting to remove TLS_MAX_VERSION
from the public header in the future [2].
[1] https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_max_proto_version.html#DESCRIPTION
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908567#59
Change-Id: Ie76054b917daa8e54d5c0156e848dbaca7bb8a82
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Under the hood we use QSettings to store HSTS policies.
Qt configured with 'no feature settings' would fail to
build then. For such builds, we fall back to in-memory
only HSTS cache.
Change-Id: I6df551d8c6c96d982080a51ce6b1bdce71d04b9f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This update fixes several qdoc warnings for things like incorrect
links to section titles, missing enum \value commands, and incorrect
\fn signatures.
Change-Id: I35ae18810d386a78ffa87d674489c7ad8c5fa215
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
The update to 1.3.0 was done in
b2a7d865b2.
Change-Id: Ie4227d49a1ee0707abff754a5edbcb2b9663ccfe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QWidgetResizeHandler cannot be sure that it will see the MouseReleaseEvent and therefore buttonDown
could be set wrong (and is set wrong in QGraphicsViews). When the mouse is up, the widget should
not think it is moving or re-sizing the dock widget. A similar fix exists in the code a few lines
above.
Task-number: QTBUG-70596
Change-Id: I52ce487836bc71da8fd7d71f8a89e21b51406d00
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Instead iterating through all rows to get the number of hidden items,
iterate over the hidden items which are fewer items.
Also don't create a temporary vector with visible flow positions by
remembering the count of hidden items before the working index and
adjusting them appropriately which gives a significant performance
boost when working with a large data set.
[ChangeLog][QtWidgets][QListWidget] Speedup handling of hidden items
when working with large data sets
Task-number: QTBUG-68977
Change-Id: I599b6e97945c245f02229145baad8363ec2bf2f5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The width of the bitarray which should avoid redraws of already drawn
cells is sometimes calculated with other parameters then the actual
drawing. This can lead to cells which are not drawn.
The reason for the discrepancy is that for the initial calculation the
headers viewport width is taken which can be smaller than the real
width due to a css border. Since all other QHeaderView operations do not
take the border into account the problem arises.
This will not fix the visual glitch (the header separators are not
painted at the same position as the grid) but will at least draw all
needed cells.
Task-number: QTBUG-20316
Change-Id: I4a1e35ee3ea51b1b458ad3497aab0a34af680cb8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Print a qWarning, otherwise this is very hard to notice
Change-Id: I882f97583071e786d5aa06f6eeb485da4fc646db
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
The wrong return value didn't seem to result in observable bugs.
Change-Id: Iaba74d0acd4352af9be70498a7d5556bb1e02f5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It was accessing the deleted current element in a potentially
reallocated container.
Change-Id: I81d86410907b7b0c20c2edc62ad256315606bc96
Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The source is an ElfXX_Off, which is an unsigned 32- or 64-bit. That
means any section bigger than 2 GB would cause an overflow when we
assigned in
m_stringTableFileOffset = strtab.offset;
Change-Id: Ib47c56818178458a88b4fffd15546bd47a89894e
Fixes: QTBUG-70560
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Commit 1c623bc6d1 introduced a new
QMetaObject revision, which change the size of the QMetaEnum data.
When looking up QMetaEnum in a QMetaObject, this size need to be
checked for every different QMEtaObject from the hierarchy, not just
the first one.
Change-Id: I6f0d3982329822e15e284aef9b141d4c9ab351b9
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
error: expression must have a constant value
static constexpr const auto messages = qOffsetStringArray(
Change-Id: I80a6bf5b83f99a8325511ac8a14e0c9819e3d2b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fixes a speed regression on ARGB32 painting on low end hardware
introduced when it was switched to using the RGB64 raster routines.
It turns out several of our embedded QPA targets use ARGB32 as native
format.
Task-number: QTBUG-69724
Change-Id: I6d7993c12da46a85b8354eb905930dae9602b5e6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
If the hardware produces events faster than the app can consume between
two updates, Windows automatically coalesces them into a single message
with the latest touch/pen pointer state and coordinates, effectively
compressing those events. But the pointer API also supports querying
and retrieving the skipped individual touch and pen frames.
There are cases where keeping all the events generated by the hardware
is desired, especially for pen events where having the most sampled
points available is critical to precisely rendering curves.
Qt already defines application attributes to control event compression
for general high frequency events and for tablet events in particular.
Use them on Windows also to control whether to retrieve skipped frames.
[ChangeLog][Windows] The application attributes AA_CompressTabletEvents
and AA_CompressHighFrequencyEvents are now supported on Windows 8 and
above for touch/pen input, with the same defaults as on X11 (compress
touch events, don't compress tablet events)
Task-number: QTBUG-44964
Task-number: QTBUG-60437
Change-Id: I1b11a043e2d71ee502895971fafb3a46306a89d8
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Both sqlite3_open_v2 and sqlite3_close are documented to return an error code:
https://www.sqlite.org/c3ref/open.htmlhttps://sqlite.org/c3ref/close.html
However, those were ignored (other than checking whether the operation
succeeded), causing QSqlError::nativeErrorCode() to always be "-1" when there
was an error while opening/closing the database.
Additionally, the error string needs to be read (via sqlite3_errmsg16) in
qMakeError *before* d->access is set to 0, or the databaseText() will always be
"out of memory" no matter what error actually happened.
Task-number: QTBUG-70506
Change-Id: I75cbf178c9711442e640afd26c4502214d20c598
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This was found while running the ODBC tests. tst_QSqlQuery::isNull()
accounts for this already.
Change-Id: Idf99a85396d7aa4e69b89467f873b105ef946f7f
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
On Samsung devices this would cause it to always to captalize each word
even if it was not a new sentence. Therefore we use QTextBoundaryFinder
to determine if it is a new sentence or not.
Task-number: QTBUG-69398
Task-number: QTBUG-66531
Change-Id: I24bf36f09a2570acfefd4343551cb1720ddc6279
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
If SHM is disabled, that code path already does its own bswaping.
Change-Id: I6c17f6c5c5502c8f89098d38d931b6b8f50b2640
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The default values for varchar columns were not decoded properly.
Task-number: QTBUG-46968
Change-Id: Ie13d48c316cd694240f7e287010b97afc8c6c341
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Stencil is - very likely - cleared just like depth. Also, switch to
STORE_OP_STORE for the multisample buffer, for correctness.
Change-Id: I31b56658286205af8551018115ca2abbe541be67
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Running with QT_VK_FORCE_STAGE_TEX does not work at all with recent
NVIDIA drivers due to QVulkanWindow's and the example's naive way of
picking the memory index. Enhance this and add a warning note to the
QVulkanWindow docs as well.
Change-Id: I7f200e11d982b56e3da3b71ee3915bd7bfca5cc1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
After convert and fetch were split, only convert was still NEON
vectorized, while fetch is the more commonly used version.
Change-Id: Iea2af7ccee6589b3d6e9908afeaae2d1ad2753be
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
As transform() returns worldTransform(), point out that it is an alias
in its description.
Fixes: QTBUG-18117
Change-Id: I0eb1f78c6955b499906024105f9969cdccf13303
Reviewed-by: Martin Smith <martin.smith@qt.io>
Some ODBC drivers, such as old Informix ODBC drivers will incorrectly
include a trailing \0 in a string when this should not exist. For
unicode strings this was already accounted for, but for non-unicode ones
this was not covered.
The change also fixes up the comments a bit to make this clearer and
also added one for the unicode case.
Task-number: QTBUG-62406
Change-Id: Id932a58d9e5fdff2f4d1aacf8cc9fdaeb34f95f4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When a window is resized AppKit groups all updates to the view frames and
corresponding layer bounds, so that the result of the resize is visually
atomic, but this only works for the main thread.
http://openradar.appspot.com/radar?id=4990815088672768
When a separate thread renders to one of the views in the window, it may
result in the view and its layer updating its bounds visually before the
resize has been visually reflected for the window itself and its border.
To ensure visually atomic updates, we disable all screen updates for the
process during resizing. This is the same workaround used by e.g. the
NSOpenPanel class, which renders the content of the view out of process,
and by Chromium for a similar use-case:
https://chromium-review.googlesource.com/c/chromium/src/+/798774
Ideally we'd do this only for the window that is being resized, but there's
no known API to do that. The deprecated [NSWindow disableScreenUpdatesUntilFlush]
is a no-op these days, and used NSDisableScreenUpdates internally anyways).
Fixes: QTBUG-69321
Change-Id: I84de714782278f2e0b2b2e1eb245c30810cb3023
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Set Qt::AA_DisableShaderDiskCache when the feature "disable_program_cache"
(modeled after the Chromium driver bug list) is present and set it for the
Intel HD Graphics 620 card.
Task-number: QTBUG-64697
Change-Id: Ibba588d2ab296b5c959ab8ee9712b47ec7cc906e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
It's not thread-safe so should only be used within systemData()'s
locked code. This eliminates the last callers of it by making it a
local function of the compilation unit, exposing a method from
QSystemLocale() to get round its use of private parts. Make the
constructor for QSystemLocale only stomp its _systemLocale global if
previously unset, but let instantiation still clear
globalLocaleData.m_language_id, so that it can be used as a way to
trigger an update to system locale data.
Change-Id: I908dca9fd30bbf20f42321ab8f9094f2fa37b7b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make the decoder fail early to avoid spending time and memory on
attempting to decode a corrupt image file.
Change-Id: I874e04f3b43122d73f8e58c7a5bcc4a741b68264
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
These were hardcoded to light colors, which made the
QMainWindow status bar look out of place and made the
(light) text hard to read.
Hardcode to dark colors for DarkAqua which more or less
match the native look. Keep the optimization where the
Gradients are stored in static variabless.
Change-Id: I3e75b42c41d3e2d18e4bc0f17d950a702ccad662
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gabriel de Dietrich (DO NOT ADD TO REVIEWS) <gabriel.dedietrich@gmail.com>
Commit 8b6100d512 removed
bool QtPrivate::QStringList_contains(const QStringList *that, const QString &str, ...)
(in favor of a QStringView overload). However this was used inline in
qstringlist.h, so apps were referencing that symbol directly.
As a result, upgrading to Qt 5.12 gave errors like
libKF5ConfigCore.so.5.50.0: undefined reference to `QtPrivate::QStringList_contains(QStringList const*, QString const&, Qt::CaseSensitivity)@Qt_5'
collect2: error: ld returned 1 exit status
Change-Id: I862263a9b06157052df894a201dfd86df8c3f4fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Calling setView or update on NSOpenGLContext results in recreating the
internal GL surfaces of the view. Unfortunately there seems to be a
fixed amount of these surfaces available, so if we spin a loop where
we for some reason end up recreating them, we'll easily run out, and
lock up the whole window system:
thread #6, name = 'SwapThread'
frame #0: 0x00007fff7b45220a libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x00007fff7b451724 libsystem_kernel.dylib`mach_msg + 60
frame #2: 0x00007fff751c1675 SkyLight`SLSBindSurface + 247
frame #3: 0x00007fff5d9c4328 OpenGL`___lldb_unnamed_symbol29$$OpenGL + 255
frame #4: 0x00007fff6bf42c33 libGPUSupportMercury.dylib`gldAttachDrawable + 364
frame #5: 0x00007fff5d9e61e7 GLEngine`gliAttachDrawableWithOptions + 257
frame #6: 0x00007fff5d9c4bb0 OpenGL`___lldb_unnamed_symbol38$$OpenGL + 969
frame #7: 0x00007fff5d9c8b0e OpenGL`___lldb_unnamed_symbol57$$OpenGL + 82
frame #8: 0x00007fff5d9c8e55 OpenGL`CGLSetSurface + 330
frame #9: 0x00007fff50d0eb2c AppKit`NSOpenGLContextAttachOffScreenViewSurface + 352
This can happen e.g. when resizing the application, where AppKit itself spins
a loop where we don't end up back in QCocoaEventDispatcher::processEvents()
for each pass (where we do have a local pool). Or it can happen in the
render-loop of a render-thread that doesn't use the event dispatcher.
Change-Id: Iaf2f879dd01e3d807d0f35705ccc978dbc89036b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
While these destructors are essentially trivial and contain no code,
the classes inherit QObject and thus have virtual tables. For such
classes -Wweak-vtable generates a warning: "'Class' has no out-of-line
virtual method definitions; its vtable will be emitted in every translation
unit." Noticed this after updating QtCreator to the latest version.
Change-Id: Iacb5d0cd49353bd35260aff736652542bb1ef197
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
On platforms where char is signed, like x86, the following is an error
(narrowing conversion):
unsigned char x[] = { '\xc3' };
Change-Id: I495bc19409f348069f5bfffd15518f9ef4e43faf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We don't need a separate QWindow pointer to keep track of the active
window, it's recorded already by the NSOpenGLContext's drawable.
And we don't need to juggle the drawable when the window is hidden,
the drawable is still valid after the window is re-shown, and we
call update on every frame (for now) anyways, which will reconfigure
the drawable if needed.
Change-Id: I199b6c027226dd239c13ecc4aba86986ca09a1eb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
When the first row(s) of a QTableView is hidden, PageUp could not reach
the first visible row because logicalRow(0) is taken without checking
if the row is visible.
Task-number: QTBUG-70215
Change-Id: Ic7820352b8988accb685ea7d16908d3fa8bf2847
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
QLayout(QWidget *parent) directly calls parent->setLayout(this) which
can lead to a runtime warning later on when someone tries to set the
layout on the parent again.
Task-number: QTBUG-69761
Change-Id: I21ef8895fd65f3e23e57527a6d38936e45417b63
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Instead of doing it up front and then restoring the current context
if the makeCurrent call failed.
By delaying the update, QPlatformOpenGLContext::makeCurrent has the option
to check which context was current before the call.
Change-Id: I458f5c00d7c820acbe2f8552b0513fce99b9b683
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
It takes multiple source models and concatenates their rows into a single model.
With full unit tests.
[ChangeLog][QtCore] New class QConcatenateTablesProxyModel, to
concatenate the rows from multiple source models.
Change-Id: Iaf4f325473adef106f423677fdc5ee0e35e87d35
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
It's more optimised and it vectorizes better, due to one level of
indirection fewer.
Change-Id: I495bc19409f348069f5bfffd1551e85092ed8dc2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Change 582d221b29 caused a regression when drawing menu items in
e.g a QComboBox. After that change, QCocoaSystemSettings would set the
QPalette::Highlight color to [NSColor selectedMenuItemTextColor]. But
the Highlight color is the background color, not the text color. And we
also use [NSColor selectedMenuItemTextColor] as the QPalette::HighlightedText
color. The result is that highlighed menu items end up with the same
foreground and background color (white), which means that they "disappear".
The color that we used before the patch, alternateSelectedControlColor, could
be used, but has the downside that it doesn't follow the appearance color in
system settings (like it should, compared to native apps). And it's also slightly
to blue. But using keyboardFocusIndicatorColor seems like a perfect match.
Fixes: QTBUG-69500
Change-Id: I07f091a5130a7308525743948d2a435226658a6f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The case of the platform context failing makeCurrent is the exception.
Change-Id: I606e6fb379f84e886bff9e27355dda9b31ff9ebe
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Otherwise the user might accidentally render to the previously active
window, if not explicitly using an FBO.
This will have an performance impact if doing makeCurrent on a real
window and an offscreen window back and forth with the same context,
but that's not really a common or recommended use of QOffscreenSurface,
as you can create FBOs with a normal window current as well. The use
case of QOffscreenSurface is when a real window is not available.
Change-Id: If93d04f82564523e15d5970429afea34c5cd31fe
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
When using HeaderView::ResizeToContents and
QTreeWidgetItem::setFirstColumnSpanned(), it happens that the position
of the branch icon is no longer in the first column and thus trying to
expand the item results in a selection change. Check for spanning when
determining the position.
Task-number: QTBUG-41793
Change-Id: I14353127436fb0ebaafb0d50a31b920b8da67333
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: David Faure <david.faure@kdab.com>
MSVC 2015/2017 has a bug with constexpr.
It is internal compiler error when we are using QtPrivate::IndexSequence
with more than 1024 items.
Example:
template<int ... I>
void foo(QtPrivate::IndexSequence<I...>) { }
void bar() {
foo(QtPrivate::makeIndexSequence<1024>()); // works
foo(QtPrivate::makeIndexSequence<1025>()); // error: C1202: recursive type or function dependency context too complex
}
Workaround:
template<typename>
struct Foo;
template<int ... I>
struct Foo<QtPrivate::IndexSequence<I...>>{
static constexpr void call() { }
};
void bar() {
Foo<QtPrivate::makeIndexSequence<1025>>::call(); // works
}
Change-Id: Iedbf5291ac4a9f51f8b5f6b76b83baba920c092d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bail out of QWidgetBackingStore::updateLists() when a
top level transient child is encountered, preventing from
adding children of other top level windows to its list.
Task-number: QTBUG-70085
Change-Id: Ibd748ab959af9bfe7fe0622494936b0c109ab25a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Makes it easier to add shared logic later on.
The call to maybeCancelWaitForMoreEvents() has been left out as it was
not called from all call sites.
Change-Id: Ibcb10ab4d788de80850b0e5a4286b4d49091cddb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
QStyleSheetStyle did not check if a border (which includes the padding)
is given and therefore the padding attribute given by css was ignored.
Only when another attribute was additionally set, the padding was used.
Task-number: QTBUG-59501
Change-Id: If3e691a23266ef6d0fb942a43053b29d65e40047
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The special handling when a font for a headerview is set became useless
after a4e6117c53 since it is now included
in branch four lines above.
Change-Id: I73bec48913ebca5f278128a124b58d1b6172e334
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
When QHeaderView has an elide mode set, the available width passed to
QFontMetrics::elidedText() was not adjusted when padding or margin was
set. This lead to a too long text displayed in the header.
Now QStyle::subElementRect(SE_HeaderLabel) is used to get the correct
rect.
Task-number: QTBUG-23203
Change-Id: I12fc646092470272bb91b3ffb7c7a51e239c7a35
Reviewed-by: David Faure <david.faure@kdab.com>
src/sljit features the BSD-2-Clause license, not the BSD-3-Clause one.
[ChangeLog][Third-Party Components] Added documentation for the SLJIT
part of pcre2, which is available under the BSD-2-Clause license.
Change-Id: Ie1e981ef6eab2c8d2960919b66ac85b29450f919
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Before this fix, QStandardItemModel::itemData returns
a map containing role 255 which is used internally to store the flags.
This role is an undocumented implementation detail so it should
not be returned to the user.
[ChangeLog][QtGui][QStandardItemModel] itemData does not return role 255
Change-Id: Ibead3cba84cfe92b3c664bc8ce87508cbcbdc9bd
Reviewed-by: David Faure <david.faure@kdab.com>
Before this patch QStringListModel::setItemData emitted dataChanged
twice if the roles map contained both DisplayRole and EditRole.
This fixes the duplication.
Increased efficiency of QStringListModel::itemData
Task-number: QTBUG-67511
Change-Id: Ibaea17530f15627a3cb8003e5284e54001731ded
Reviewed-by: David Faure <david.faure@kdab.com>
Implemented the virtual method moveRows to allow row movement.
[ChangeLog][QtWidgets][QListWidget] Implemented moveRows in model
Task-number: QTBUG-69807
Change-Id: I212b560b8778306a0315d9d5e4710efcc7dbbe44
Reviewed-by: David Faure <david.faure@kdab.com>
A virtual method clearItemData was added to QAIM for Qt6.
This patch implements that method to all Qt concrete models for which
it makes sense.
Task-number: QTBUG-69616
Change-Id: If980fcfc36f723128bc56ec4587c5c3a338dbbcc
Reviewed-by: David Faure <david.faure@kdab.com>
Applying the transformation in question has no effect on the winding
order. Rewrite that section.
While all the examples are correct, clarify the rules for the geometry
they use since the winding order varies. Fix up the triangle example code
to use front=CCW for clarity (even though it does not matter much since
culling is off there).
Change-Id: Icb968c76cc9fa918a5608d3c66b4fccd5668175e
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
The snippet tries to explain the advantage of
str.arg("Hello", QString::number(20), QString::number(50));
over
str.arg("Hello").arg(20).arg(50);
which only makes sense, if str contains the same formating sequence,
namely "%1%3%2". That also matches the belonging comment.
Amends 8481500f63
Task-number: QTBUG-44044
Change-Id: Ic2595107bc599c6d244ebf88184a5cc5569ed4f1
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Although it is safe to slightly overread a string (provided it doesn't
cross page boundaries), ASAN is extremely picky about this kind of
behavior. So, do not run with this vectorized code when ASAN is
enabled.
Task-number: QTBUG-70269
Change-Id: I2b59b524d608afec8985227285feab55158d7247
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It seems when a WebEngineView is parented by a window its accessible
interface will not know its parent, which prevented the root of an
UI Automation fragment from being found, causing missing accessibility
info. This change adds a workaround to avoid this issue.
Task-number: QTBUG-70199
Change-Id: Ia7cfc9f410c4f0ef3b5f9d1700748a9a3e29b7c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Weak pointers are zeroed before destroyed() is emitted. This makes sense
because the signal is called "destroyed()", not "aboutToBeDestroyed()",
and the code has been like this for a long time.
Change-Id: Ic852fe354405e328d1922a75931e7eb7bf651b26
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is a follow-up on commit 6553921dd5,
which fixed the drawing of the surrounding rectangle when used in item
views. This one now fixes the drawing of the check mark itself, for both
item views and standalone items.
Change-Id: I14f359e9d2ef33652cc68494b7d114e61110e5e0
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Add feature guard around the include in the header and remove the one
from the implementation file.
Change-Id: I8dc133cce786ead6059cc66b40a0ffb6c420096f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
There was a QStringView::compare(QString, CaseSensitivity) but it's
good that the symmetric also exists
Change-Id: Ic789f11d41eb8cfa393cb51c19bd1f89bb87d912
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Noticed during review of clang-tidy warnings. I have searched the
source tree (using grep) and only this one file contains examples of
this mistake.
Change-Id: I3bbcec736e5a184db7251962fd3671a21ab5d238
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Some people suggested the later, so let's have a second look at it
before it's too late.
Although I was in favor of the former I'm now having second thoughts.
connectTo() is meant to only be used in classes which have a clear dominant signal,
but there are rare classes that have two (example: QAbstractButton::toggled, QAbstractButton::clicked).
QAbstractButton::connectTo() would be ambiguous if we ever wanted to add these shorthand connects
to QtWidgets
Change-Id: I198ad3326d31dcf89b9c47a299124572ee7b11b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
They were incorrectly attempted to be read as Indexed8, instead use
the RGBA64 formats to read them with full accuracy.
Task-number: QTBUG-45858
Change-Id: I14fc3cb0d59fa2fc0e68fd870f3b32352c34161f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Android doesn't like nor use RTLD_NODELETE
Tasnk-number: QTBUG-64654
Change-Id: I2d884bbf22a681cca592942eba84ba97327ba974
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This is marked to be removed in Qt6, so switch to
SE_ItemViewItemCheckIndicator internally and define the old value as
copy of the new one instead of the other way round.
Change-Id: I9e9804a7ff0e9b2ae1e24698d45b2cbd44423420
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This does not really work: as soon as you build with
the 10.14 SDK you opt-in to having updated palette
management, which the Qt 5.11 series does not have.
This leaves app developers with two ways to opt-out
of dark mode:
- Build with the 10.13 (or earlier) SDK.
- Set NSRequiresAquaSystemAppearance in Info.plist
This reverts commit 04671a80db.
Change-Id: I5c01b9965da45de914f699526ba0723837f36e1d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The widget visibility state was set to explicitly hidden,
which was preventing it from working correctly when
its parent widget was shown.
This regression was introduced by commit d7a9e08,
which made QWindow::setVisible() call QWidget::setVisible().
QWindow::destroy() calls QWindow::setVisible(false),
which means that the destroy() call in setCocoaView()
would set the CoocaViewContainer to be explicitly hidden.
Clear WA_WState_Hidden to work around this behavior.
Task-number: QTBUG-67504
Change-Id: I77438fcd01f165f058eea178c214838bd4f27084
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Snap now uses xdg-desktop-portal for portal support. Add check for apps
running in Snap and make them use portals by default. We also should be
using different name for the platform theme used by sandboxed apps.
Change-Id: Ibaa35b7549b3d94775d7edb937f729a300d071b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Replace by switch() where appropriate, remove else and unindent code
or simplify the return value.
Change-Id: Ie988b9068a9579ae5a899b3765e43aad480b564e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add override, disable copies where appropriate and use = default
for trivial functions.
Change-Id: Ia5bc7419b1aa053c5503ea7dfaf11cb6dfafd2e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some Pointer Input messages are defined only for Windows 10 and new
versions of the Windows SDK and could break compilation with older
SDKs. Currently, they are not used anywhere outside of the
MessageDebugEntry debug function. Checking if they are defined before
using.
Change-Id: I5fc7bb8e52ab8aca66bb21084289ab8938938063
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
...not just the debug flag. The information is saved outside of the CBOR
map for two reasons:
1) removing the hack that depended on how QCborStreamWriter and
TinyCBOR internally work, allowing for the extra parameter to be
written directly. We wouldn't be able to use that hack anyway and would
have needed a further, uglier hack to encode a byte whose value we
don't know.
2) outside the map, this information can be parsed more quickly and
then we can discard any plugins we shouldn't actually load.
Since we're doing this for a flag, I decided to move the Qt version
there too for reason #2.
Change-Id: I61ecce6b1324410bbab4fffd153d4e5fc696d19e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
In preparation for Qt 6 deprecating the binary JSON format. Also reduces
the size of the metadata a little: for the xcb platform plugin, it went
down from 264 bytes to 138; for the jpeg image plugin, it went from 320
to 135.
I've had to change the signature so older versions of Qt won't try to
parse the CBOR data as Binary JSON. Unfortunately, before QJsonDocument
could get a chance to reject it, qJsonFromRawLibraryMetaData() needed to
allocate memory and that causes crashes with Qt < 5.11.2.
Change-Id: Ieb48f7c0dd0e4e0fb35efffd153bee34e16ce347
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
These fake mouse events should be synthesized by QtGui, not the QPA plugin,
when the tablet/touch events are not handled by the application and the
Qt::AA_SynthesizeMouseForUnhandledTouchEvents or
Qt::AA_SynthesizeMouseForUnhandledTabletEvents flags are set.
Task-number: QTBUG-47007
Task-number: QTBUG-60437
Change-Id: I4d6d5e6667d245c45a4eb4f3a94db05cf9772f52
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QOpenGlWidget and QuickQidget do not work at this time anyway.
This also causes gl to be initialized for widget apps, so disabling this
will optimize widget apps.
We could use Qt::AA_ForceRasterWidgets as well.
Task-number: QTBUG-67797
Change-Id: I8f86a9f72e6f3d437a818b4fbe3d6f3658e17d04
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The NSOpenGLPFAStereo attribute was deprecated in macOS 10.12, without
any replacement, and adding the attribute to the pixel format results
in context creation failure, so we're assuming the feature is no longer
supported an disable it wholesale on macOS.
Change-Id: I27d9f300fdaff9abe90781e3160b97f8b66121ad
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
We no longer support macOS 10.11, iOS/tvOS 10, or watchOS 3.
Change-Id: Ide03d8fac06185ef4162ba75ee54a0adf6916905
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The files match the ones in pixman 0.17.12
Task-number: QTBUG-69276
Change-Id: Idd03c6979456ad2cf4dcc2aee6986ebc95140937
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Short-cuts the case where there is no gamma correction to avoid a
conversion over RGBA64 and back.
Change-Id: I100697a9f7a4b94283557b2c0eaa45e0eff81785
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This is the squashed diff from wip/webassembly to dev.
Done-with: Peng Wu <peng.wu@intopalo.com>
Done-with: Sami Enne <sami.enne@intopalo.com>
Done-with: Morten Johan Sørvig <morten.sorvig@qt.io>
Started-by: Andrew Knight <andrew.knight@intopalo.com>
Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When building with warnings are errors for Android with gcc 4.9,
it wrongfully fails on use of uninitialized variable.
Change-Id: I39c5e8413c30567fba60cbba6a8b26d537c5836e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Replace by reinterpret_cast or const_cast, respectively.
Use auto when initializing a variable to fix Clang warnings
about repeating the type name, do minor tidying along the way,
and a few conversions of 0 or NULL to nullptr.
Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Synced QMetaObjectBuilder::MetaObjectFlag with the MetaObjectFlags enum
from qmetaobject_p.h. Also added a few comments for Qt 6.
Change-Id: Ieccd5cf8d512a6bf7256b2f4db88d45662774536
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This feature is needed to register complex types (e.g. Q_GADGETS) at
runtime, using a single constructor method and added type parameter.
Without having the type id available to the Constructor it is impossible
to specialize behavior, thus requiring separate constructors for each
type. Generating these separate constructors at compile time is easy,
but not at runtime.
[ChangeLog][QMetaType] QMetaType can now register constructor for a set
of dynamic types.
Change-Id: I6071271d0e157864594dd07b4bc3a0abbeb15a44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
translateTouchEvent needs to filter events based on the message type
passed in msg, as Windows sends more than just down/up/update events,
it also sends enter/leave for each touch and occasionally a few more.
One of them is WM_POINTERCAPTURECHANGED which indicates a general loss
of touch input, which needs to be translated to a touch cancel event.
Ignore WM_POINTERENTER/WM_POINTERLEAVE events as they result in sending
duplicate Qt::TouchPointPressed/Qt::TouchPointReleased events otherwise.
Also avoid sending duplicate events for each additional touchpoint:
Windows already bundles all available touchpoints for a touch event
when calling GetPointerFrameTouchInfo, so we get all points at once,
but we'll still receive other events for each additional touchpoint,
resulting in reading the same bundled data again for each one and
sending duplicate events to QWindowSystemInterface.
Use SkipPointerFrameMessages() to avoid receiving the additional
events for the frame we just processed.
Finally, add raw event logging when the platform verbose level is >1.
Change-Id: I55d840285f642a00f6ffcda4a3efd7ae3985310b
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
When adjusting the tab order for compound widgets, it can happen that
the order is already correct. The check for this case forgot one case
which lead to a garbled focus chain.
Task-number: QTBUG-68393
Task-number: QTBUG-69619
Task-number: QTBUG-10907
Change-Id: Ic3242746bdcf3a4db6ea8daa1498381500ca116d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
PM_TabBarScrollButtonWidth used the size of the ::scroller subcontrol
without considering that there are two QToolButtons and therefore
returned the wrong size for a single QToolButton.
QStyleSheetStyle::subElementRect() had no handling for
SE_TabBarScrollLeft/RightButton and therefore the values for the
scroller toolbuttons set via the stylesheet were never used.
Fix it by dividing the scroller width by two and add the code path to
handle SE_TabBarScrollLeft/RightButton in
QStyleSheetStyle::subElementRect
Task-number: QTBUG-69653
Change-Id: I1adfe6333f3183bba621bbbb4d10969920c6cd46
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Avoid reading a pixel outside the image even if we multiply the result
by 0. This mirrors a similar old fix in the the 32bit scaling path.
Change-Id: I7860bc808dc46dbc94918672e99c81b56d4a1d27
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Named placeholders can only contain characters in the range of
[a-zA-Z0-9_] but this was not documented anywhere.
Task-number: QTBUG-69775
Change-Id: I5c4eff7674b1fc04cef60e7d7f44cd87414ffbe9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The device pixel ratio was not applied to the section indicator pixmap
which made it look blurry on HighDPI screens.
Task-number: QTBUG-70084
Change-Id: I8b07b2ffc51781c2d2d89484b8618173f0692fe4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
When QSqlQueryModel or QSqlTableModel is created it will create a
QSqlQuery which defaults to using the default QSqlDatabase connection.
If this connection belongs to another thread then it will throw a
warning as this is not safe to use. Since the QSqlQuery is always
recreated when a query is set, the instance which is a member of
the class can effectively be invalid until a new one is set.
Task-number: QTBUG-69213
Change-Id: I68a5dd59fe62788f531d59a0680da11b118ee383
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The previous implementation wrongly calculated the necessary data type
to hold the offset indexes. It looked at the amount of elements,
but instead we should look at value for the last element in the offset
array
Change-Id: I84c6985dc3c329df3bbc5a14f9789170877b65bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This prevents the view from triggering display of its superview when
being temporarily added, which is both inefficient and causes issues
when those dirty-rects are wrong due to the wrong frame position of
the added view.
The additional drawRect: calls and corresponding expose events
resulting from the needsDisplay calls also caused repaint issues
in Qt Widgets. QWidgetBackingStore doesn't seem to take the exposed
region into account for an expose event, and will try to flush all
dirty regions. Some of those may be outside the exposed region,
and will be clipped away by the window system, never ending up on
the screen, but with Widgets still thinking it has flushed all
dirty regions.
This is a separate issue, possibly solvable by setting the
wantsDefaultClipping property on NSView to NO, but this needs
further testing, so applying this commit as workaround makes
sense, even if it's just hiding the real bug.
Task-number: QTBUG-67998
Task-number: QTBUG-68023
Task-number: QTBUG-69990
Task-number: QTBUG-69740
Task-number: QTBUG-69292
Task-number: QTBUG-69332
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 38979332d0)
Change-Id: I4ef3fef29f749daa4f3a11fe9186ae77b359f966
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The functions checks for _glyphs.isEmpty() and returns
in that case, so, there is no point in having
another code branch for _glyphs.size() == 0 below.
Unindent branch for _glyphs.size() > 0 and brush
it up a bit to silence clang-tidy (warnings about using
isEmpty(), nullptr).
Change-Id: I78e86583bb30c7bea1357e7a45f61b07d5a4d139
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Compute QPointF hi-res screen coordinates based on the HIMETRIC values
contained in the native message. This gives the same high-precision
screen coordinates as what the old WinTab handler supported.
Add the possibility to not synthesize mouse events if the platform
plugin option DontPassOsMouseEventsSynthesizedFromTouch is set,
just like we do for finger touches. This makes it possible to have
clean Pen events without mouse duplicates for an application that
handles both input types in parallel.
Add raw event logging when the platform verbose level is >1.
Change-Id: Ibf68b6275400388a76f8d5c573eed8f4b9bf4e9d
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The early additions don't make clear that they weren't present in 5.0
Change-Id: Ibb233c17701c7598b90f2bb53ee507f86856f66a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
They were previously in blocks, each alphabetic, partly partitioned by
the version in which they were added, but not fully so. Since markers
indicate that mre clearly.
Change-Id: If227b37dae45dac546d3f24674cc6bbecb50152a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
We were missing a few languages CLDR knew about; so add them to the
list in enumdata.py (and add trailing commas to lists to make future
additions not need to change the prior last line; python is perfectly
happy with this).
[ChangeLog][QtCore][QLocale] Added support for Western Balochi, Ido,
Lojban, Sicilian and Souther Kurdish.
Change-Id: I0d24cff46a0ae8db48ec1db8762088f877319982
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Following QTBUG-40015, QDomDocument::setContent is reentrant.
This change updates the documentation accordingly.
Fixes: QTBUG-69920
Change-Id: Id09e3541156f52d1a976afd02b410c263d3b3352
Reviewed-by: David Faure <david.faure@kdab.com>
This way we can easily use them as keys in QHash and QSet.
Change-Id: Ie744c3b5ad1176ba2ab035c7e650af483757a0c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
...Of the "readEtcFile" function
According to
https://www.freedesktop.org/software/systemd/man/os-release.html
it says "All strings should be in UTF-8 format".
Change-Id: Icd2d75eca2ac7273c7f587a1e3c0430cc6d2c31d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This function allows to generate an array of offsets of substrings in
a string at compile time. This produces less verbose and easier to maintain
source code.
Change-Id: I5774b8b91906f6191f2b1244a676c07e7eb15b47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fixes compilation failure on Windows, due to TraceLoggingValue not
correctly casting pointer arguments to a known type.
Change-Id: I6027debe4ea3440588dd8677209d6d47048b6b0f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Otherwise the dynamic loader will complain about missing symbols when
the binary is run on platforms below our supported deployment target:
dyld: Symbol not found: __os_activity_current
Referenced from: QtCore.framework/Versions/5/QtCore (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib
in /Users/torarne/build/qt/5.12/qtbase/lib/QtCore.framework/Versions/5/QtCore
Trace/BPT trap: 5
We want this to trigger our own logic in qt_apple_check_os_version(),
where we tell the user in more friendly terms what's going on.
An alternative to the targeted weak imports would be do import the
whole library as weak, using -weak-lSystem.B. This doesn't seem
to cause any performance issues at startup, but since we only need
the two global symbols we stick to the more targeted solution just
to be on the safe side.
Change-Id: I87c1f185f6dcf9df26c700d31bb5071ddf7685be
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The application name wasn't always printed, so we try try a few
more possibilities before falling back to the process name.
We also run the check as early as possible, instead of relying
on a QCoreApplication.
We do not have to provide a dialog to the user, as macOS will do
this for us if the application is launched from Finder.
Change-Id: Ifbec86946d60294806364e08964852fd4b74ff56
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We still want to have these in the debug output for completeness,
so disable the warning instead of removing the lines.
Change-Id: I4291adddff486e4ea963be36ac0ebda089a66045
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
macOS 10.14 uses a new font smoothing algorithm that takes the fill color into
account. This means our default approach of drawing white on black to produce
the alpha map will result in non-native looking text when then drawn as black
on white during the final blit. As a workaround we use the application's current
appearance to decide whether to draw with white or black fill, and then invert
the glyph image in the latter case, producing an alpha map. This covers the
most common use-cases, but longer term we should propagate the fill color all
the way from the paint engine, and include it in the key for the glyph cache.
At the moment we do not react to changes in the application appearance,
as that seems to be buggy in general in Qt (palette/style, e.g.), and those
bugs need to be weeded before we can react to the theme change with confidence.
Task-number: QTBUG-68824
Change-Id: Ibbfd49fcf3a091e454009c08159f46b3499e2bd0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Replace local implementation of index_sequence with QtPrivate::IndexesList
Change-Id: I193b9183ec6832294687e979576a2e3ec56d550b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add a definition for qIsEffectiveTLD for when Qt is configured with
-no-feature-topleveldomain. Then we can merge the #if-#else branch.
Change-Id: I91bc329ab95744a2e10dcc4168cd8b84f8fee9f6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
At some point we stopped supporting "Plain", "CramMd5" and "Login" but
their entries in the enum and a few lines of code related to them were
left behind.
Change-Id: Id8186c9a0760b3b2382544579aa1148ff8125ac4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Add QtCore, fixing:
qthreadstorage.h includes qscopedpointer.h when it should include QtCore/qscopedpointer.h
Amends 815153d4a4.
Change-Id: I8424bc4d0b0d666dbd04d63530af4fbd27987628
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Under certain circumstances, if you had a widget with a QOpenGLPaintEngine,
and drew QStaticText into this, and then later had Qt Quick access the same
cache and try to resize it, we would get a crash because the resize function
would have a pointer to the paint engine and try to access its shader manager
(which would now be null, since this is outside the begin()/end() phase of the
paint engine.
The solution is to reset the paint engine pointer to null on the cache once it
has been populated and it is no longer needed.
[ChangeLog][QtGui][Text] Fixed a possible crash when combining QStaticText,
QOpenGLWidget and Qt Quick in the same application.
Task-number: QTBUG-70096
Change-Id: I7383ad7456d1a72499cfcd2da09a5a808d4b3eff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
One trick that is possible to do with QImage is to make it be sub image
of its imagedata by manipulating the data start and bytes-per-line,
we can not upload that directly and need to detect the case and create
a clean copy to upload.
Task-number: QTBUG-70105
Change-Id: I7ce184a0892fb4071b6dcc1a1fd3881a4e0703cd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Do not try using SSSE3 if the compiler do not support it.
(see 648ee7aa02).
Task-number: QTBUG-50804
Change-Id: I489b0bbacfde0c647c9d5b71ca3de992d7dc8878
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It's possible to use vcpkg using the -I and -L arguments, but
some of their libraries have different names than what we look for
during configure, so add in those variations.
Change-Id: Iee37197228cc0f15442ecd7ec4fc761f4d526e1d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This fixes build with -no-feature-action configuration.
The corresponding dialog is added by:
6c5c1a562c cups: Show a dialog when asked for password
Change-Id: Ic88bdd62c756749959e66252427b5edc2c3ce7cc
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
A multi-screen setup with an AMD adapter set as the 'main display' leads
to using the AMD drivers for OpenGL. This then causes a crash when calling
SetPixelFormat and similar for windows located on another adapter's
screen. This workaround detects the conditions leading to the crash and moves
the window to the main display.
Task-number: QTBUG-50371
Change-Id: I4007c490bdcdc13d6e8bce82983b150aa4930338
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Implemented the virtual method moveRows to allow row movement
[ChangeLog][QtCore][QStringListModel] Implemented moveRows
Task-number: QTBUG-69807
Change-Id: I518f48a321bd755ab56f2fe84883d27324cc42ec
Reviewed-by: David Faure <david.faure@kdab.com>
The code was assuming local files, and broke with remote dirs.
Testcase: `kwrite sftp://localhost/tmp/file.txt` and then Ctrl+O,
the initial directory was $PWD instead of the remote dir.
Change-Id: Ie24d4c1b2b3278dce44274af0066105bd1bf9b34
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
On MSVC2015 Q_DECL_CONSTEXPR is defined as empty.
Change-Id: I8beb919f75cf2066ffc7ac10d5abfaa1712fc1bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
_q_interpolate<T> subtracts 2 arguments of type T,
for unsigned types this can cause wrapping around
Task-number: QTBUG-57925
Change-Id: Iffa59f413579a3d5de8cb728fe71443d8e8a04aa
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
We want to store the metadata size and get it from the plugin in Qt 6.
Change-Id: Ieb48f7c0dd0e4e0fb35efffd153bebc2914d9a3c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Declare rbSwap<QImage::Format_RGBA8888>, so we don't end up in a
fallback definition not used by little-endian.
Task-number: QTBUG-69951
Change-Id: I8512bba76da7d59a27593d37c70283d881c3e8fc
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Frameless obscured windows do not receive WM_PAINT/expose events on
Windows. Qt::WA_Mapped needs to be set on them to ensure updating works.
Task-number: QTBUG-39220
Task-number: QTBUG-52039
Task-number: QTBUG-58575
Task-number: QTBUG-63927
Change-Id: Ic6c11f2be96378b6a6b61296f1f3e13cd49b50a6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
In this mode, library and other dependencies are copied into the build
directory, and the XML templates in the build directory are updated
accordingly, but the project is not built or installed.
Needed by qbs.
No existing code has been touched.
Change-Id: Ib8015f7c2315b39dfb21750fecc8618bce03cb8c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
According to MSDN, AltGr key presses are sent as a
sequence of SYS left Ctrl + right Alt.
Add an option to detect AltGr as modifier key.
Task-number: QTBUG-69317
Change-Id: I30ce169d2e6dbbae194ff714abfbc732b53652ce
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This allows apps that know their icons are
in a given icon theme to set that theme as
fallback, so in case the user theme does
not include them, the icons can still be found.
This solves the problem of missing icons
that often happens when running KDE applications
on a GNOME desktop.
Change-Id: I4e5543d598012352a29ff79dab0357506d986b6d
Reviewed-by: Dominik Haumann <dhaumann@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Extract a static factory for QXcbConnection objects and pass
potential connection errors to qxcbmain.cpp, which will then return 0.
Task-number: QTBUG-68859
Change-Id: I9c0faf82462a78a576360c19bef251ad1d034d84
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
The hardcoded value is based on the values set in qcommonstyle.cpp, but
in case this is changed using a proxy style the actual values are not
respected. They would even be wrong if nothing is changed but
QStyleHelper::dpiScaled(13.) does not return 13.
Change-Id: Ib451d07800b3b4e8cafd1f4fef84cd9bf02f9bba
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
qdoc now handles \threadsafe also for macros, so we can remove the
explicit \note.
Change-Id: Iabeb7f69d237e7024a4f584adc516951b06d752b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
QTzTimeZonePrivate's methods were iterating transitions from first to
last, or last to first, to find where .atMSecsSinceEpoch crossed some
threshold; but the transitions are sorted in order of increasing
.atMSecsSinceEpoch, so binary chop would be more efficient than such
linear searches. So use std::partition_point() instead.
Change-Id: I65c43cb20fca6685a22ea52a4ca2f1089c128ebf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The difference between two transitions' offsets is measured in
seconds, but we add it to a time in milliseconds; so it needs to be
scaled to fit. Fortunately rarely enough applied that it hadn't
caused any reported problems.
Change-Id: I11f9f9e46d43d748220e072ad7504d4c8c5bf192
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTimeZonePrivate::dataForLocalTime() makes repeated use of the times
sixteen hours before and after the target local time, so compute those
up front once instead of each time they're needed, giving them
expressive names and making code terser.
Change-Id: I4b682cc6de2adb98c3ee5489eec4b63ac1090961
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
With g++ 8.2.0, I get warnings when a QVarLengthArray<QString> calls
remove() or prepend(), as some tests in tst_QVarLengthArray do, as
they call memmove() "writing to an object of type ‘class QString’ with
no trivial copy-assignment; use copy-assignment or copy-initialization
instead"; which may indeed be a good argument for not using
QVarLengthArray<QString>, but its own tests do.
Change-Id: I4f8a64948b32a54e67a285df4ec7788f60739ffb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Assume two MIME types A and B are registered, both with the same glob
pattern, A being parent of B, A with some magic rule, and B with another
magic rule. Given a file that matches the glob pattern and the magic rule
of A, the resulting MIME type depended on the order of registration of A
and B, because it would just check if some glob matching MIME type was
also a subclass of the magic matching MIME type.
The patch prefers the the MIME type that matches by magic if that
matches by glob pattern as well (i.e. A in our example).
The "recommended checking order" of the spec does handle that case.
Task-number: QTBUG-44846
Change-Id: I2af43f6199faf9a42cd9c35d3a045441afbd6217
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
The tz database's latest update now records the cases where summer
time is deemed standard and winter-time is deemed DST. (This doesn't
change what the offsets are, just how they're described.) The
resulting negative DST offsets mess up the algorithm for converting
local time to UTC, causing tst_QTimeZone::transitionEachZone() to fail
for Europe/Dublin in the hour before its transition; so refine the
algorithm to cope with the new case.
Task-number: QTBUG-69980
Change-Id: I24003872fffb03b2903161859158d0ce998b3073
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch implements the support for QRegularExpression in
QSortFilterProxyModel.
[ChangeLog][QtCore][QSFPM] QSortFilterProxyModel now supports
QRegularExpression.
Task-number: QTBUG-46810
Change-Id: If932d55f98f9b8bcf3a72c03ffd51da52cb50ad1
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
QRegularExpression doesn't offer a direct equivalent of QRegExp's exact
match.
There are several places in the Qt sources that use this feature. This
patch implements a small helper function that builds the expression as
recommended in the documentation and updates the related code.
[ChangeLog][Core][Tools] QRegularExpression now provides
anchoredPattern() which is a helper function to build regular
expressions used for exact matching.
Change-Id: Idbbf142c4c5cb9b62abf8229f4ce85fd4409e5d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Avoids polluting the global namespace
Change-Id: Ie01831ddac5446fdbdeefffd15468b5ca22d5e7b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
[ChangeLog][Widgets][Dialogs] QFileSystemModel now uses
QRegularExpression internally for wildcard matching. Note
that QRegularExpression might not give the exact same
result as QRegExp as its implementation follows strictly
the glob patterns definition for wildcard expressions.
Change-Id: I6ca893833ff7b5b7f678221bb9bc623fd17c1cfa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The match method still uses QRegExp. This patch updates the code to use
QRegularExpression and translates the wildcard patterns to a suitable
form for QRegularExpression.
[ChangeLog][Core][QDir] QDir now uses QRegularExpression internally for
wildcard matching. Note that QRegularExpression might not give the
exact same result as QRegExp as its implementation follows strictly the
glob patterns definition for wildcard expressions. Nevertheless, the
tests for QDir return the same results as before.
Change-Id: I095959443ac7362f7534e35454eff038061fca82
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This patch refactors the wildcardToRegularExpression method to generate
a simpler regular expression. It also fixes some shortcomings of the
previous implementation.
Tests have been updated to ensure all cases are properly supported.
Change-Id: I454e3fe8fe0bb663b2f319d6fa2fa8aec626c50d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
We detect if there's an upcoming momentum phase using the same trick
used by e.g. Mozilla in their event handling: https://tinyurl.com/yd8lcs4l,
and as recommended by an Apple engineer: https://tinyurl.com/y8yytlgv
The event is not guaranteed to be in the queue, but in practice it seems
to be. If this assumption fails we can add a wait timeout to the event
search instead of using [NSDate distantPast] as a timeout (which only
looks at queued events).
When the momentum phase is detected, QWheelEvent::phase will have the
new ScrollMomentum value, and the phase transitions will be
ScrollBegin -> ScrollUpdate -> ScrollMomentum -> ScrollEnd.
We no longer send ScrollEnd to signify that the user's fingers have
been lifted off the trackpad; rather, the first event with ScrollMomentum
phase means that the fingers have been lifted and macOS is now sending
simulated-momentum events.
This means ScrollEnd is a reliable indicator that the entire scroll
gesture (both the user interaction and the momentum) has ended.
If the ScrollMomentum phase is skipped, it means the user's fingers
came to rest before being lifted, so there is no momentum. In that case
the transitions will be ScrollBegin -> ScrollUpdate -> ScrollEnd.
Task-number: QTBUG-63026
Task-number: QTBUG-65160
Change-Id: I80191a472f6fa892387004c199166a6350124274
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The layout/size hinting done in showPopup should not count towards the
mouse release blocking timeout as it might take more then the double click
interval itself, causing the popup to hide immediately on button release.
Task-number: QTBUG-67583
Change-Id: I37ac77ac331a4f865a9242581232b85606f883c5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QAccessible::StaticText should be mapped to AutomationControlType_Text
instead of AutomationControlType_Edit.
Change-Id: If8c840f0dea553c1a750225586778a7d24cf424a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Add both prefix and postfix versions of the increment/decrement
operators, and a static constexpr min/max which returns the
minimum/maximumm values that can be stored in the QSpecialInteger. These
latter functions are useful to define constants, e.g.:
typedef quint8_be IPv4_TTL;
static constexpr TTL_TO_DROP = IPv4_TTL::min();
Change-Id: I825a279feb68b93572765a9fdb5aa7b06d1be35b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Provides two convenient getter for a display name of the subject and
issuer. This simplifies cases where you just want a simple string
describing either of the two.
Change-Id: Ia5d0e058f14dae067b13ac7360e7fec4edd9ec53
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This is simpler than initializing a pointer to its address and
accessing it via that pointer; it saves the initialization and a few
checks that it's happened.
Change-Id: I3d82ee1cb02981654ec769632d3a055e11737113
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Having these 2 lines in a function does not add much value and
requires scrolling that could be avoided.
Change-Id: Ife814be6478521cd64b0048d1b6ee447afea55de
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
QXcbConnection::internAtom() creates the atom if it does not exist. The
lifetime of an atom is not tied to the interning client. Atoms remain
defined until server reset (lost connection, restart).
So create the atom once via QXcbConnection::initializeAllAtoms(), and
later fetch the atom value from local array, instead of repeating
InternAtom requests.
Change-Id: I3cae21895febad6e5daf8c32e72612202baaad64
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Several \fn commands are added for functions and operators that
were not documented. A few qdoc warnings remain in qcborstream.cpp,
but these are because an enum class was used, and qdoc doesn't yet
handle those correctly all the time.
Change-Id: I02a740c595e36c1b383af242c2a6419d1f37b135
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QAccessible::StaticText should be mapped to UIA_TextControlTypeId instead
of UIA_EditControlTypeId.
Task-number: QTBUG-69894
Change-Id: If2f8f55d2be492c02a3af5b1813ca12cf774a33a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Fixes a regression introduced with the update to the bidi
algorithm.
Task-number: QTBUG-69633
Change-Id: I7eac45ed3ffb41f89ea3f793eedcfb6fcdace871
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Don't show the mark simply because we have unicode code points
larger than 0x590.
Task-number: QTBUG-69665
Change-Id: I9af97383f3bcd52277a5288e7ad06ec240c7e51c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Before this change, if you try to insert a row at the bottom of QSortFilterProxyModel
the row will be inserted in the source model at position proxy->rowCount rather
than at the bottom. This causes insert at apparently random positions in the source.
[ChangeLog][QtCore][QSortFilterProxyModel]
QSortFilterProxyModel::insertRows(row,count,parent) with
row == QSortFilterProxyModel::rowCount will insert at the bottom of the source model
rather than at the row QSortFilterProxyModel::rowCount of the source model
Task-number: QTBUG-58499
Task-number: QTBUG-69158
Change-Id: Ie78416c8fbc429303b8c9c98375630e3e4d85f6d
Reviewed-by: David Faure <david.faure@kdab.com>
After the behavior of setItemData has been changed following QTBUG-45114,
QStandardItemModel was lacking an interface to clear all the data from a single index.
Task-number: QTBUG-69616
Change-Id: Ide0b5bb6358439fc42c474df8b044fbace6def8d
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Faure <david.faure@kdab.com>
We can reuse the main QThread definition for the no-thread
configuration and avoid having to keep them in sync.
Add stub definitions for member functions where needed.
Change-Id: I128db11684a6040d09c4a4ce114f1399cba523f8
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Add it to configure.json and replace all occurrences of QT_NO_THREAD
with QT_CONFIG(thread). Add conditions for other features that depend
on thread support. Remove conditions where we can use the QMutex and
QThreadStorage stubs.
Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Add implementation for the no-thread configuration:
Assume access will only happen from one thread and
use a QScopedPointer to hold the data.
Unlike the real implementation this version will
delete the stored data on destruction, as opposed
to on QApplication destruction.
Change-Id: I9d8e89e7da18f967f463e2db7b50549c962acc84
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Set data->threadId, which makes the thread detection
used by Qt::AutoConnection work: it will now actually
select Qt::DirectConnection.
Change-Id: I9369e47eb7ed3ec88dba25f2d41e92139958bcd7
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
When glGetError returns GL_CONTEXT_LOST, on XCB + Nvidia at least, the
error does not get cleared until the next successful
glGetGraphicsResetStatus.
We can't handle this properly until the start of the next frame where we
will hopefully have a valid context, but in the meantime we should avoid
locking up completely.
Change-Id: Id438d44d83b926e1f3e4281ca3704231bf1a23cf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
qt_nameprep() already reset the string to its original length to
indicate failure, but we didn't handle that in qt_ACE_do(). So make it
have a return value whcih makes it easier to handle that case and do
handle it.
[ChangeLog][QtCore][QUrl] Fixed a bug that caused URLs whose hostnames
contained unassigned or prohibited Unicode codepoints to report
isValid() = true, despite clearing the hostname.
Change-Id: I41e7b3bced5944239f41fffd1545b7274c4b419d
Reviewed-by: David Faure <david.faure@kdab.com>
... which is Qt's version of std::make_index_sequence / C++14.
The current Indexes generator is recursing O(N) times which is reaching
recursion limits level for long IndexesList.
This implementation has only O(log N) recursion.
Change-Id: I423ef05152d77b18f1f5a64c49b273f49aa958bb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>