This property allows to change the default behavior in
which list items occupy the entire width of their column.
Setting it to Qt::{AlignLeft,AlignRight,AlignHCenter} will
reduce their widths to the minimum values, thus allowing to
have intermediate free space. Then the user will be able to
begin selections by mouse from this space.
[ChangeLog][QtWidgets][QListView] Added itemAlignment property.
Task-number: QTBUG-56606
Change-Id: Iae55c251379be4e45d0c0d69175ff4388b5785b4
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This is very similar to QJsonDocument, but there's no QCborDocument.
QCborValue is that.
[ChangeLog][QtCore] Added QCborValue, QCborArray and QCborMap, classes
that permit DOM-like access to CBOR data. The API is similar to
QJsonValue, QJsonArray and QJsonObject, respectively.
Change-Id: I9741f017961b410c910dfffd14ffca50dd8ef3ba
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
When pasting text, it is possible that part of the text is still pasted
but part of it is not. For example, if there is a maximum length set then
only the first part of the text is pasted and the rest is dropped. In
this case it should still emit inputRejected() as not all of the input
was accepted. This amends c901cdadc0.
Change-Id: If7906767be27e88ed9914c50bf0427833de5b8fa
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QIODevice represents considreable overhead, even with just QBuffer, for
parsing simple things. Benchmarking showed it was spending 25% of the
parsing time inside one QIODevice function or another. So this commit
accomplishes two things:
1) it increases the buffer size from 9 bytes to up to 256, which should
reduce the number of calls into the QIODevice
2) if the source data is a QByteArray, then use it directly and bypass
the QIODevice, thus increasing performance considerably
Change-Id: I56b444f9d6274221a3b7fffd150c531c9d28e54b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Adjust line positions to deal with negative leading which isn't included
in height of QTextLine.
Change-Id: Id7918968c0f9d7e65700b9e7a08fc5d761883f22
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
As the full range of TIME is '-838:59:59' to '838:59:59' then we cannot
use QTime as the object to store this data in. Therefore a QString is
used instead for passing the data to and from. This does not impact
existing code using QTime already as it will still convert it from
the QString to a QTime to give the same result as before.
[ChangeLog][QtSql][MySQL] The TIME data type is now treated like a
string-based type in order to respect the full range of the TIME data
type.
Task-number: QTBUG-57028
Change-Id: Ieb7105bff3043b845f76bc873d088e6bac1e4f10
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If the fbo had samples > 0 set, it would use a temporary fbo with
a default configuration losing the HDR precision.
Change-Id: I7e9966165b3100f148c4ad24738f3ee71273f29a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The implementation of QTransform::transposed() had a wrong assumption
about the type of the result.
Task-number: QTBUG-68630
Change-Id: Ia5ce794efe773d74fb5fdaff3da8cae2b452e7e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The test doesn't make much sense on platforms that don't support window
activation.
Task-number: QTBUG-66849
Change-Id: I875314d026d666173ec345d0864ad41d66179783
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The test is actually passing, so just enable it.
Task-number: QTBUG-66849
Change-Id: Ie1566b9e5e19f5ab6d919624aa14662a1d4483ec
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Link to a bug report so we can track the failures and figure out how to fix
it in Qt Wayland or if we should skip the tests in a proper way. I.e. with
platform capabilities or similar.
Task-number: QTBUG-66849
Change-Id: I7a16333c7d2284eb9da6efd4515891438e9976b3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Unlike QNAM, our toy http2 server sends payload as one big chunk as soon as
it fits in the receive window's size. Internally, 'frame writer' splits this
payload into many DATA frames of the appropriate size (imposed either by the
default value or the one from the client's SETTINGS frame). If some test fails,
we can end up with a server waiting for the writer to send all the DATA frames
though it is not needed anymore - there is nobody to receive them after a failure.
This patch moves such a loop into the test server instead and stops the loop early
if needed.
Change-Id: Iea2dcd718d8f83386fd16004807f6447bf999435
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Currently when doing comparison with std::tuple the fallback toString
method is called which returns a Q_NULLPTR thus not allowing proper
diagnostic of the values that triggered an error. This patch
adds support for std::tuple to improve the tests output readability.
[ChangeLog][QtTest][QCOMPARE] Now outputs contents of std::tuple on
failure.
Change-Id: I046a55e2ce44c3f7728d51e4745120d38aa5e007
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtWidgets][QLineEdit] Added inputRejected() signal for when
a key press is not accepted by the QLineEdit. For instance, when an
invalid key is pressed for a validator set.
Task-number: QTBUG-57448
Change-Id: I39182a78b07b37c6da01905b8da4c57930e3454b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Nothing in this test references date-times.
Change-Id: I4005cda550d54abe46370963b1e91fab9829298d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Similar to Qt::GlobalColor, the presets allow the user to create
brushes based on predefined gradients, quickly getting pretty pixels
on screen.
The presets are based on the linear gradients from WebGradients, a
free collection of gradients, hosted at https://webgradients.com/.
The few radial and blended gradient presets have been excluded.
Change-Id: I1ce8f2210a6045c9edb8829ab3eddcc313549127
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Avoids an unused function warning.
Change-Id: Id221595920e9a34eb83b66fe123d664f60fcae05
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
qFuzzyIsNull has a fixed range, where qFuzzyCompare can tell if numbers
are different in a more relative range. Without it QPointFs that are
heavily scaled will be interpreted as identical, when they are quite
different at their own scale.
Task-number: QTBUG-60359
Task-number: QTBUG-62161
Change-Id: Ic4ba90e9e994aedff5548d690f053eb309b0a60b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When a QComboBox is used as the editor for a relation inside a view then
it could end up showing the contents of the EditRole. This would be the
field which is used to represent the entry as opposed to the DisplayRole
which is what the user would expect to see is.
Therefore, setEditorData() is overridden to ensure that it is showing
the right data to the user. When the model gets updated, it will take the
corresponding EditRole value as before to ensure it is updated correctly.
Task-number: QTBUG-59632
Change-Id: Ibbccc3e9477de1cdefb654051b97dd111df36382
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
We move QInternalMimeData to a separate file, because this class is
used, even if draganddrop is disabled. From now on, include
qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData.
Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
It happens because our filesystemwatcher thinks it is subdirectory and not
two different paths
Task-number: QTBUG-60676
Change-Id: Ic753e9481cb26303a030044e0a5ab4d703bc529f
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
QDesktopWidget::screenGeometry() and similar was deprecated in 5.11
and replaced by QScreen::geometry()
Change-Id: Ic630d022bc6461af78f49684c8ac9d1836d738bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This is the counterpart of the previous commit.
[ChangeLog][QtCore] Added QCborStreamReader and QCborStreamWriter,
classes for low-level reading and writing of CBOR streams.
Change-Id: Ia0aac2f09e9245339951ffff13c72e4bffdf4a56
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
When a new model was set with setSourceModel() and the mapping was
built up, the destruction of the old model caused a reset in the
QSortFilterProxyModel which lead to an empty view or an assertion.
Now we properly disconnect the old model again and also clean up the old
mapping/persistent indexes when a new source model is set.
Task-number: QTBUG-44962
Task-number: QTBUG-67948
Task-number: QTBUG-68427
Change-Id: I2e0612899c210bde3ac0cfa59aefd78269deee5b
Reviewed-by: David Faure <david.faure@kdab.com>
Use the screen resolution obtained from QScreen instead
of QDesktopWidget.
Change-Id: If27bcf1c94a783c4c617d5364846b95a625bb93d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
A step modifier already existed when scrolling with the
Qt::ControlModifier held. This patch applies this functionality to
other methods of stepping a spin box.
Holding the modifier increases the step rate when:
- scrolling;
- pressing the up/down keys;
- pressing the spin box up/down buttons.
[ChangeLog][QtWidgets][QAbstractSpinBox] The Qt::ControlModifier
increases the number of steps a QAbstractSpinBox takes for the
following interactions: scrolling, up/down keyboard keys and the spin
box buttons. Previously, Qt::ControlModifier only affected scrolling.
Task-number: QTBUG-67380
Change-Id: Icc8754d5c007da0771bfaef113603a2f334dd494
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
tst_QListView::horizontalScrollingByVerticalWheelEvents failed to
compile with this qmake argument.
Change-Id: I35dd4ad4c9ee92c06c94b21dd7325aee00fc98d4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The bounding rect was not including positive leading of the last line. This
patch solves it by changing using QTextLine's setLeadingIncluded, and adds
handling of negative leading to keep rendering unchanged in that case.
Change-Id: I4d18b81892184bb85cd7949a5dc3fb9cfa270a26
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>