The main design issue in this plugin is that
there is no clear separation between model (which
pretent to be ScxmlDocument and his childern of
ScxmlTag type) and its views (GraphicsScene
and its children of BaseItem subclasses).
When the "Zoom to State" action is invoked,
the new view is being created, showing just
a part of the ScxmlDocument model. However,
some validation is done only on the view part,
checking that BaseItems belong to the common
GraphicsScene. In case the transition was defined
from internal state node to somewhere outside,
we don't have for it an BaseItem on the gui side,
as we just show the part of the scene. That's why
the validation vanishes the transition when
viewing a zoom.
In general, all the validations should be moved
from gui to the ScxmlDocument / ScxmlTag part.
This in general would require really big refactoring,
or even rewrite.
This patch moves some checks into a model side and
disables direct modifications of the model when
it's not desired.
Fixes: QTCREATORBUG-21676
Change-Id: Ica0771f637a9802dcc0fb87ad04b0ee77a21cda2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Add Cmd+Shift+- for decreasing font size on macOS.
Do not add Cmd+= for increasing size, because it conflicts with the
existing shortcut for "Replace and Find Next".
Sprinkle some Backspace shortcuts in addition to Delete for removing
items. There are (laptop) keyboards that either do not have a designated
Delete key (requiring Fn+Backspace) or where the Delete key is not
conveniently located/sized, and there is no benefit in making the
distinction in that case anyhow.
Fixes: QTCREATORBUG-706
Fixes: QTCREATORBUG-13733
Change-Id: I06274a9810b82800ec6158a883c95d2a7ae2465e
Reviewed-by: David Schulz <david.schulz@qt.io>
Replace the uses of deprecated APIs listed below, while keeping in mind
that compatibility with Qt 5.12 (the latest LTS) must be kept. This
means that the new alternatives must be used only when compiling with
Qt versions where the replacement is available.
Replaced:
QLineF::intersect() -> QLine::intersects() (since 5.14)
QComboBox::activated() -> QComboBox::textActivated() (since 5.14)
QWheelEvent::pos() -> QWheelEvent::position() (since 5.14)
QList::swap() -> QList::swapItemsAt() (since 5.13)
Task-number: QTBUG-76491
Change-Id: I62adc4f0826607b0156bf4bc5648ffb0e41cd895
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
transitionitem.cpp:247: warning: assuming signed overflow does not occur
when assuming that (X - c) <= X is always true [-Wstrict-overflow]
if (idSnap >= 0 && idSnap < m_cornerPoints.count()) {
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: Icc0b21c21326663f801ffef2b82fdd4b2679bf07
Reviewed-by: Marco Benelli <marco.benelli@qt.io>