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>
Many text documents will be designed for a white-paper
look, and in these cases it is desirable that the editor
colors matches.
Change-Id: I66d721f8c2e27b78a2b885c6cfd74f897fe42389
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>
This is already blacklisted for macOS 10.12 and reproducing in 10.13.
Task-number: QTBUG-61037
Change-Id: I464e42d0ae5ab24104250edc69a90454ba605eaa
Reviewed-by: Liang Qi <liang.qi@qt.io>
As the test was unstable, we qskip the failing parts
instead of mark the whole test insignificant.
Task-number: QTBUG-50842
Change-Id: Ib8f5b7ead07d65cc624fa72b190ecee0338c8183
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Reviewed-by: Heikki Halmet <heikki.halmet@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>
These examples are outdated and unmaintained, and have not been included
in the documentation for a long time. Removing the files to avoid
further confusion.
Task-number: QTBUG-59249
Change-Id: I3e4c535219cc6b40f3add5430c0967eba2c80eb9
Reviewed-by: Martin Smith <martin.smith@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>
_mm512_mask_cvtepi32_storeu_epi8 is VPMOVDB (convert from 32-bit to 8-bit
with truncation) where the destination is a memory address, with an
OpMask register used to indicate which of the lanes in the vector to
store. Similarly, _mm512_mask_cvtepi16_storeu_epi8 is VPMOVWB (convert
from 16-bit o 8-bit), which is useful for UTF-16 to Latin1 conversion.
Change-Id: I8f261579aad648fdb4f0fffd15542ea306841ce6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
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>
tst_QMdiSubWindow::setOpaqueResizeAndMove checks if a resize of the mdi
subwindow works as expected by simulating mouse events. Those events are
sent to fast and therefore the operationMap of QMdiSubWindowPrivate is
not yet updated which let the test fail. There was already a call to
qWait(250) to wait for the 200ms timer but sometimes (esp. in virtual
environments) the timer was not triggered after this period.
Fix it by checking if resizeTimerId is set back to -1 which means that
updateDirtyRegions() was called.
Change-Id: I961ba80589d2f725a6858ba70b84fb35750a6964
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
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>