| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Change-Id: I88ecd9a84d7fb9f6cb78027cc51e34089e211ff2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 010a8987710f4aafcd34ce2359464cfab10dad46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to
handle typedefs and accesses through pointers, too:
const std::string o = "object";
auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); };
auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) {
auto exprOfDeclaredType = [&](auto decl) {
return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o);
};
return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))));
};
auto renameMethod = [&] (ArrayRef<StringRef> classes,
StringRef from, StringRef to) {
return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)),
callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))),
changeTo(cat(access(o, cat(to)), "()")),
cat("use '", to, "' instead of '", from, "'"));
};
renameMethod(<classes>, "count", "size");
renameMethod(<classes>, "length", "size");
except that the on() matcher has been replaced by one that doesn't
ignoreParens().
a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'.
Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache,
to avoid porting calls that explicitly test count().
Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is semantic patch using ClangTidyTransformator:
auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)
makeRule(cxxMemberCallExpr(on(QtContainerClass),
callee(cxxMethodDecl(hasAnyName({"count", "length"),
parameterCountIs(0))))),
changeTo(cat(access(o, cat("size"), "()"))),
cat("use 'size()' instead of 'count()/length()'"))
a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'.
<classes> are:
// sequential:
"QByteArray",
"QList",
"QQueue",
"QStack",
"QString",
"QVarLengthArray",
"QVector",
// associative:
"QHash",
"QMultiHash",
"QMap",
"QMultiMap",
"QSet",
// Qt has no QMultiSet
Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.4
Change-Id: Iee4bd8970810be1b23bdba65a74de912401dca65
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
| |
The index in question has to belong to the view's model. An erroneous
emission shouldn't be silently ignored.
Change-Id: I7e037e72affb210f609a9a1029777acafae041f1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a user or a delegate asks a view to act on an editor that does
not belong to the view, report a warning instead of silently
ignoring the problem. This erroneous condition can happen for instance
if a user installs the same delegate on multiple views (something
that the documentation says _not_ to do) and the delegate indeed
emits signals related to the editors of one view -- the other views
don't know about that editor.
Change-Id: I2d10582ebb7aefca4acea306b8a57bcc3162050a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After cbf1b4bc60bca3994b8f8685ee922e53a6b4eed2 the selected item got
deselected on Ctrl+Press, which made Ctrl+dragging a selected item
impossible.
Only deselect on Ctrl+Release. Add scenario to existing test case,
and update the documentation to clarify the properties involved, and
to point out that the event parameter might be nullptr.
Fixes: QTBUG-101647
Pick-to: 6.3 6.2
Change-Id: I749b1cb1a0a311f5c1d4c333984716f05f2c90b5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Enderlein <volker.enderlein@ifm-chemnitz.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since e02293a76d21e7077f1952d4ed8af6c6d1970190 and
2e0c29a4bbe2b3ae427137e65f179b0550dcf169 was committed,
If a item width more than others,the selectionRect.x() always consist
of currentStartSelection item's rect.center().x(),this will cause
selectionRect size is not right.
Because the code of 2e0c29a4bbe2b3ae427137e65f179b0550dcf169 is to fix
the new bug introduced by e02293a76d21e7077f1952d4ed8af6c6d1970190,
we need to use a better way to solve QTBUG-78797.
When itemview enable drag,we need always update pressedPosition because
pressedPosition was used to determine the drag distance, otherwise keep
previous logic.
Fixes: QTBUG-78797
Fixes: QTBUG-81542
Fixes: QTBUG-99512
Pick-to: 6.2 6.3
Change-Id: Ibc5020e35b0eb319e4b5546bdba39ff527c209a6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The slots connected to rowsAboutToBeRemoved and columnsAboutToBeRemoved
attempt to find a new current index by scanning the model around the
existing current index -- in case that index is indeed about to be
removed.
The problem is that the scanning was done without any sorts of bounds
checking; instead it was relying on the model's index() to return an
invalid index for an out of bounds request.
Fix that by adding bounds checking. Since models are not supposed
to return invalid indices for in-bounds index() calls, added some
warnings if that happens.
For some reason, the code handling rows and columns isn't perfectly
symmetrical. Rows are searched both forwards and backwards, while
columns only backwards, and the related code is slightly different.
Filed QTBUG-100273 to try and understand what's going on.
Change-Id: I7452d8c521e74daa4408e6cc969ce5a6059f53ea
Pick-to: 5.15 6.2 6.3
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
| |
Similar to the parent patch, the private selectAll() was doing
two out of bounds accesses on an empty model. Guard it.
Change-Id: If0f3ce1e6c44a152791313e47db79985e71ef955
Pick-to: 5.15 6.2 6.3
Reviewed-by: David Faure <david.faure@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
Calling selectAll() on a view with an empty model, with the view
in ContiguousSelection, causes an out of bounds access into the model.
Guard the access.
Change-Id: I3830a979bad760e9e1526c1c8b12d9767d41fc99
Pick-to: 5.15 6.2 6.3
Reviewed-by: David Faure <david.faure@kdab.com>
|
|
|
|
|
|
|
|
|
| |
In preparation for an upcoming fix, refactor an if over an enumerator
to a switch (which is how this code should've been to begin with).
Change-Id: I11a2de6d66f0359b985b587b7fd37022a7bf56e6
Pick-to: 5.15 6.2 6.3
Reviewed-by: David Faure <david.faure@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Amends 71aaf831d175a164b508ce169131a794d55d6fb0, which wrongly assumed
that dragMoveEvent will be called and update the dragged position as we
scroll the viewport. This is not the case, so we have to do so manually
when the view is in DraggingState.
Since dragMoveEvent cannot be faked, and since we cannot fake a
mouseMoveEvent (it would throw off the drag'n'drop state machine),
calculate the new draggedPosition based on old position and the new
offset.
As with all drag'n'drop, we cannot test this using an auto test.
Task-number: QTBUG-96124
Fixes: QTBUG-98961
Change-Id: Ifcfc1a11aa7258ec4610a548a276b4dd4a814590
Reviewed-by: Zhang Hao <zhanghao@uniontech.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Amends 17c1ebf8bfd254ff75cc55e335d1c1fb01da547f, which introduced logic
that recognizes double clicks to avoid duplicate clicked() emits. If a
slot connected to doubleClicked opens a dialog, then the release-event
will not be seen by the item view, leaving the flag incorrectly set and
preventing the next clicked signal.
Fixes: QTBUG-97853
Pick-to: 6.2 5.15
Change-Id: Iced83e8c66a763672f522265435dc52a745227e4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some item views, such as QListView in icon mode, implement a selection
rectangle with which the user can "lasso" items. So far, dragging that
rectangle did not trigger auto scroll, so unless an item near the edge
was selected, the user had to stop the lassoing and scroll manually to
reach more items.
Since QAbtractItemView implements auto scrolling for drag'n'drop, we can
use that mechanism also when the selection rectangle is dragged. This
requires some modifications:
We need to make sure that scrolling the view during a drag-selection
generates mouse move events so that the selection is extended and the
rectangle is updated in subclasses.
And we need to stop using QCursor::pos to get the position of the mouse
pointer, as this makes the auto-scrolling untestable. Instead, record
the mouse position last seen during a mouseMove or dragMoveEvent in
content-coordinates (identical to pressedPosition).
As a drive-by, fix some coding-style issues in nearby code.
Done-with: Zhang Hao <zhanghao@uniontech.com>
Fixes: QTBUG-96124
Change-Id: I426f786e5842ae9f9fb04e9d34dc6d3379a6207f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.2
Change-Id: I22f71a53b0f7f0698450123343e25548c889c3e2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
| |
Pick-to: 5.15 6.2
Change-Id: I6b77f0ec043d08da3b7958d780dce9595daf97a6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-96654
Pick-to: 6.2
Change-Id: I2dca4af387ef5ad549a1a41fba2bc6de217f4ea9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Item views can open an editor widget on the first key press, and need to
take special care not to break input methods. The initial key press
starts compositing by the system input method, which is then interrupted
by the focus transfer to the editor.
To solve this problem, the widget needs to keep focus while the initial
composition is ongoing, and only transfer focus to the editor once the
composition is either accepted or cancelled by the user. Add a state flag
that is set during this initial preedit phase.
During this initial composition, the item view will receive all input
method events, and needs to forward these to the open, but not yet focused
editor for the user to get the correct visual feedback during the preedit
phase. The item view also needs to report to input method queries on
behalf of the editor to make sure that the IM UI is correctly positioned
without covering the user input.
Implement a test that simulates the sequences through synthesized
QInputMethodEvents; we can't simulate the entire system input stack.
Fixes: QTBUG-54848
Change-Id: Ief3fe349f9d7542949032905c7f9ca2beb197611
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
| |
Pick-to: 6.1 6.2
Change-Id: I89c9526aa74b312dd67a6d194395b3298bbc31fe
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A mouse press that transfers focus from an open editor back to the view
will close the editor. To prevent that the corresponding release then
opens the same editor again we need to know that the closeEditor call
was caused by the mouse press. Since Qt first generates the focusOut
event, and then delivers the mouse press, we have to start a zero-timer
to check whether we are in the same event delivery process. If so, ignore
the corresponding release.
Add test case that simulates that chain of events.
Fixes: QTBUG-20456
Pick-to: 6.2 6.1
Change-Id: I28fa32bfbc776db207c594c329961f575ae58ea9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When pressing an index in order to start a flick gesture, QAIV sets
the current index. When QScroller changes state to Dragging, then
QAIV restores the current index to what it was before the press, as
the user is clearly scrolling the view. With autoScroll enabled, this
will produce an ugly jump if the old current index is no longer in
the viewport.
To prevent this, disable autoScroll before restoring the currentIndex.
Fixes: QTBUG-64543
Pick-to: 6.2 6.1 5.15
Change-Id: I3e0a18a6a179d80b9d810fce5aa658f0cfff9a29
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In MultiSelection mode, items are by default toggled on press, which
follows the example of standard Windows controls. However, when dragging
is enabled, then the press might be the beginning of a drag'n'drop
operation, and deselecting the item on press breaks the selection and user
experience.
Don't toggle the selection for presses on an already selected item that
might get dragged; instead, wait for the release event.
Extend the test case slightly to cover the special case. Dragging a
selection in a drag-enabled and MultiSelection item view wasn't possible
before either.
Fixes: QTBUG-59888
Change-Id: Ibd3e95a71ea63dd1e9bc3c8a723eafa9a1c21afa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In ExtendedSelection mode, a Ctrl+Press might be both the start of
a selection toggle, or the start of a Ctrl+Drag operation.
If we already toggle on the press, then it's impossible to drag the
existing selection while the Control key is pressed. Ignore Ctrl+Press
events and let the corresponding release event toggle the selection.
Adjust the relevant test cases accordingly. The QItemDelegate test
case used a click+control event incorrectly, such an event doesn't
change the clicked state and should not be eaten, and now it does
change the selection, so fix the test.
Task-number: QTBUG-59888
Change-Id: Ia76126e31c28bc97d3e93e54965bdb1d0b8ac6a4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
If a QItemDelegate implementation eats a release event (which they don't
do by default), then don't change the selection.
Task-number: QTBUG-59888
Change-Id: Ia08637627ce1da34ff9bdac63dfc72e5f53befac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After d6551fe12520 it was no longer possible to start a drag with a
double click (where the first click selects an item, and the second
press+move starts the drag). Resetting the pressedItem variable to block
the emission of the clicked() signal had this unwanted side effect.
Instead, use an explicit boolean to store that the next release event
will be the result of a double click, so that the clicked() signal is not
emitted again (preventing the double-emission was the purpose of change
d6551fe12520).
Task-number: QTBUG-77771
Fixes: QTBUG-94087
Pick-to: 6.1 5.15
Change-Id: I082c5169d89eb980dcd7985ef3d302b6ff060fb9
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Olivier BARTHELEMY <perso.olivier.barthelemy@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-93990
Change-Id: I4e512354a49dde6678ca89cabc56bc76ba666bb3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an itemview only allows internal moving of items it can happen that
the target accepts the drag'n'drop operation since it's out of the
control of Qt (e.g. Recycle Bin or an other application). Due to the
nature of a move, the original item is deleted. Therefore check if the
internal move target is the same as the source and don't delete it
otherwse.
Fixes: QTBUG-86020
Pick-to: 6.0
Change-Id: I69de4b8d76d1b0f57338b402aee87580226cd6cb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
QAbstractItemView::selectionCommand() returned the wrong SelectionFlags
when no event is given since c4366ff0183a9a4a5c6eff0312b713e9c5eb97ea.
Therefore re-add the call to QGuiApplication::keyboardModifiers() when
no event is given and add a unittest for them so it's not removed again.
Fixes: QTBUG-89711
Change-Id: I107357df08c4ff1b1a14d49523401c5e7b428f56
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
| |
Change-Id: I45c18fd45c20b226e44d16315e3ebb6c305d4ab0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
There are a few places left over, for example the QTextEdit
creating mouse events in a timer and notably QGraphicsView.
Task-number: QTBUG-88678
Task-number: QTBUG-46412
Pick-to: 6.0
Change-Id: I7ed23911be3b86b4b39fb478b947ec3b7a60761f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
| |
Remove or fix references to removed APIs, and some qdoc syntax fixes.
Change-Id: I67d71062cd7a29f4eb74b02199b1482af5e59fc0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a model only allows MoveAction, then calls in the view/widget subclasses'
dropEvent implementation to set the event's drop action to CopyAction
will fail. QAbstractItemView will then remove the item when QDrag::exec
returns.
Instead of abusing the event actions for this, store explicitly that the
dropEvent implementation already moved the item. If the flag is set,
don't remove the item.
In QListView, which uses moveRow to move items in the dropEvent handler,
handle the case that the model might not implement moveRows. In that
case, or when dropping an item onto another item (to overwrite data),
fall back to the default implementation of QAbstractItemView. Sadly, it
is impossible to know whether a model doesn't implement moveRows, or
whether the move failed for other reasons, so this requires a bit of
extra special case handling. QListView in IconMode is particularly odd
in that it moves the item in the view, but not in the model.
This follows up on fd894fd68edf3d67975cda8eb9dda43646887b0d and fixes
additional issues discovered during debugging. Extend the existing unit
test; since drag'n'drop runs a modal, native event loop on most systems,
it still only runs on the Xcb platform.
Change-Id: I6c5377e2b097c8080001afe904d6d3e4aed33df4
Pick-to: 5.15
Fixes: QTBUG-87057
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the default action will be Copy, and the (+) cursor will show when
moving items in e.g a QListView/Widget, even though the item will actually
be moved.
The documentation of InternalMove states clearly that "The view accepts
move (not copy) operations only from itself.".
Task-number: QTBUG-87057
Pick-to: 5.15
Change-Id: Idaa9e8f84623ced51b1c51a3730466dc0678d6b3
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
|
|
|
|
|
|
| |
We can't split a \l{Class::}member over two lines.
Change-Id: Id4806402ab349fd20fbf65eee9502e2d08e21dc5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and obsolete itemDelegate(index), which the new function replaces.
This allows itemviews to override the item delegate per index. The
existing APIs to set delegates for rows and columns doesn't work for
tree views, or other views where the delegate should depend on the
parent index as well.
Adjust all itemview code that accessed the QAIVPrivate's relevant
data structures directly to go through the virtual function.
[ChangeLog][QtWidgets][QAbstractItemView] The
itemDelegate(QModelIndex) member function has been made obsolete,
and has been replaced by a new virtual
itemDelegateForIndex(QModelIndex) member function that can be
overridden to give subclasses control over which item delegate
should be used for an index.
Change-Id: Ib03529c38797386d3a1d4cf3c5646e911d95daf5
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently when copying from an item view, only QString value types are
considered. This severely limits the usefulness of the feature as it
does not even allow to copy number nor dates that can be translated to
text.
This merge request changes that by checking if the content being copied
can be converted to a string rather that just being a string. This will
also allow for custom types to be handled.
Fixes: QTBUG-86166
Pick-to: 5.15
Change-Id: If57c986ef5831d59eeb59f9c4b900fa126ec31ea
Reviewed-by: David Faure <david.faure@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
viewOptions returned a QStyleOptionViewItem object. Such a method
can never support newer versions of the option structure.
Most styleable QWidget classes provide a virtual method
initStyleOption that initializes the option object passed in as a
pointer, e.g QFrame, QAbstractSpinBox, or QComboBox.
Follow that API convention, but name it initViewItemOption, as the
QStyleOptionViewItem struct contains information about the item as
well as the widget itelf.
This is a source incompatible change that will go unnoticed unless
existing subclasses mark their overrides as 'override', or call
the removed QAbstractItemView::viewOption virtual function.
[ChangeLog][QtWidgets][QAbstractItemView] The virtual viewOptions
method that previously returned a QStyleOptionViewItem object has
been renamed to initViewItemOption, and initializes a
QStyleOptionViewItem object that's passed in through a pointer.
Change-Id: Ie058702aed42d77274fa3c4abb43ba302e57e348
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
| |
Change-Id: I56cb1cfd9977dedd89947dfe2bf9edb70297e31f
Task-number: QTBUG-84221
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it easier to reliably maintain input-event related states
in widgets, in particluar the state of keyboard modifiers. Instead of
testing for all possible event types, code can just test the flag before
safely static_cast'ing to QInputEvent to access the modifiers.
Simplify the code in QAbstractItemView accordingly.
Task-number: QTBUG-73829
Change-Id: Idc7c08e2f3f1e8844f5c6693c195153038ee6490
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The event handler listens to the relevant input events already to
read the state of the modifiers. The implementation doesn't care about
touch, wheel, or tablet events either way.
The call was introduced in 28a21d98ef8d880a6dd86ee19dd803424bb5eae1,
with no explanation why it would be necessary, and no test cases to
exercise that case.
Task-number: QTBUG-73829
Change-Id: Ibe408e86f697ac5acae5944b941f0d935ca2e408
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
|
| |
This is required to remove the ; from the macro with Qt 6.
Task-number: QTBUG-82978
Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-84469
Change-Id: I3007734f8e4f164ece9dd8850ef007cbef9e12ef
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
|
|
|
|
|
|
|
| |
Even it was not marked as deprecated the replacement function initFrom()
is available since Qt4 times (and init() is deprecated since then)
Change-Id: I09a4ebbf66b01fbe7aec67691dc68d2e42d1cd78
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
| |
Many of these were generated by clazy using the new qevent-accessors check.
Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We remove the QT_NO_TOOLTIP check from qstandarditemmodel.h, because as
the 'tooltip' feature is in QtWidgets, we cannot use it properly in
QtGui. Also this affects just two non-virtual inline methods, i.e. it
has no effect on library size.
Task-number: QTBUG-82785
Change-Id: Ic166f14fb1cf3e9dd789573a6b9db6a87fb50e10
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
| |
Cleaning up those that are trivial to remove because they have direct
replacements.
Change-Id: Ie9fecd8c4822ed1a8f378b210cc4c4d9a10f7e36
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
examples/opengl/doc/src/cube.qdoc
src/corelib/global/qlibraryinfo.cpp
src/corelib/text/qbytearray_p.h
src/corelib/text/qlocale_data_p.h
src/corelib/time/qhijricalendar_data_p.h
src/corelib/time/qjalalicalendar_data_p.h
src/corelib/time/qromancalendar_data_p.h
src/network/ssl/qsslcertificate.h
src/widgets/doc/src/graphicsview.qdoc
src/widgets/widgets/qcombobox.cpp
src/widgets/widgets/qcombobox.h
tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
tests/manual/diaglib/debugproxystyle.cpp
tests/manual/diaglib/qwidgetdump.cpp
tests/manual/diaglib/qwindowdump.cpp
tests/manual/diaglib/textdump.cpp
util/locale_database/cldr2qlocalexml.py
util/locale_database/qlocalexml.py
util/locale_database/qlocalexml2cpp.py
Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.
Updated CMakeLists.txt in each of
tests/auto/corelib/serialization/qcborstreamreader/
tests/auto/corelib/serialization/qcborvalue/
tests/auto/gui/kernel/
and generated new ones in each of
tests/auto/gui/kernel/qaddpostroutine/
tests/auto/gui/kernel/qhighdpiscaling/
tests/libfuzzer/corelib/text/qregularexpression/optimize/
tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
tests/libfuzzer/gui/text/qtextdocument/sethtml/
tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.
Changed target name in
tests/auto/gui/kernel/qaction/qaction.pro
tests/auto/gui/kernel/qaction/qactiongroup.pro
tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake
Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.
Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
|