Commit Graph

9 Commits

Author SHA1 Message Date
Artem Sokolovskii
8b444f88eb ScXMLEditor: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: Ic439470b7c23022fee6acbf0cdaba7760309edb0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-25 08:52:57 +00:00
Alessandro Portale
93fbd5be02 Remove dead code "< QT_VERSION_CHECK(5, 14, 0)"
Qt Creator required Qt 5.14 or higher. Let's removed the #idef-ed code
for building against lower Qt versions.

Add a comment in porting.h where we still need such code for sdktool.

Change-Id: Ib330275208eec4a2f285b4b9f480530c171f538a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-18 19:12:39 +00:00
Eike Ziller
3a602e8338 Replace qrand with QRandomGenerator
Task-number: QTCREATORBUG-24098
Change-Id: I91b610409a413c7d76b3c5dd43cf581a960edf7d
Reviewed-by: hjk <hjk@qt.io>
2020-09-18 14:12:23 +00:00
Alessandro Portale
24a25eed14 Use isEmpty() instead of count() or size()
Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-20 20:56:57 +00:00
Sona Kurazyan
6f4aa0458c Remove usages of deprecated APIs (part 2)
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>
2019-09-03 09:15:24 +00:00
Alessandro Portale
adea8467f4 Fix warning: "Don't call QHash::operator[]() on temporary"
[-Wclazy-detaching-temporary]

Change-Id: Ide503c9260af285fa1dbedb63f7819c8ad616db6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-01-17 10:04:11 +00:00
Alessandro Portale
24ecd7fe6a ScxmlEditor: Modernize
modernize-*

Change-Id: I72a72cf5e9327956fdc0e5fc6f552bfc03d2122c
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-12-10 12:03:18 +00:00
Marco Benelli
a7809d4f5e SCXML Editor: fix behavior of else and elseif tags
SCXML specify that the <if> tag contains elements separated by tags
<else/> and <elseif/>.
The SCXML Editor used to nest instruction inside the <else/> and
<elseif/> tags.
This patch implement the correct behavior, so each new inserted element
is appended inside the wrapping <if>.  Note that the new elements are
always inserted as last child of <if>.

Task-number: QTCREATORBUG-17674
Change-Id: I327941bbbd8b0cc04b0c26553257ccb2a24c8306
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2017-02-24 12:18:09 +00:00
Alessandro Portale
4ea332b062 ScxmlEditor: Initial import
Change-Id: I4701b77ebd4e2520f2616c42206ac17be3a12b60
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-09-16 12:39:49 +00:00