Commit Graph

21 Commits

Author SHA1 Message Date
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
Alessandro Portale
dc3eae230f ScxmlEditor: Convert to using Tr::tr
Change-Id: Ia8ab06d4b8a16bb144d6887624c478fb911f29ea
Reviewed-by: hjk <hjk@qt.io>
2022-09-01 08:17:40 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
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
Jarek Kobus
686603ae83 Remove unused includes of QThread from cpp files
Change-Id: I61b8e9182bf03fa96d2aabe399a6c93964fc8d03
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 10:37:20 +00:00
Jarek Kobus
6d5e302157 Use typed syntax in calls to QMetaObject::invokeMethod
We do it wherever possible. Some places can't be fixed
since they still rely on dynamic introspection
(mainly QQuickItem cases).

Change-Id: Ia00b4a04d8b995c9a43b7bf2dbe76a60364bb8ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-16 13:45:02 +00:00
hjk
43b658e9e7 Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays.

Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 12:42:27 +00:00
hjk
1c81a3b3e8 All: Use Utils::SkipEmptyParts
Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 05:55:25 +00:00
Eike Ziller
ed5e6a4999 Add some additional shortcuts for actions
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>
2020-03-17 09:39:37 +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
Tim Jenssen
a78e3e5dd5 use initializer lists
Change-Id: I82b04601f1db52197b3dc625b6b7e0f143c1c8b6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-21 15:10:54 +00:00
Alessandro Portale
616e19ff9e Fix warning: "Missing emit keyword on signal call"
[-Wclazy-incorrect-emit]

Change-Id: I93bdc6e23cdaccf35c9899ae16870ccc65a54f80
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-01-17 15:54:56 +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
Ulf Hermann
ee9ecf8661 ScxmlEditor: Avoid soft asserts when changing nullptr tags
At least TagCurrentChanged can be triggered with a nullptr tag. That
means the current tag is reset to "none". We should thus handle nullptr
in all receivers of beginTagChange and endTagChange.

Change-Id: Ife558beca9fb1ed5ab246b76bbaab19c1c227e8a
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
2017-12-14 10:52:30 +00:00
Leena Miettinen
506b372c76 SCXML Editor: Fix UI text
Change-Id: I2d6794682dfb05eaa3a926f33fffa039947afa87
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-10-20 14:17:34 +00:00
Nikita Baryshnikov
bf46cf8eaf ScxmlEditor: silent fallthrough warnings
Change-Id: I7bd7140f05e8342a2e10713eb1646e0bd3f028ff
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-09-18 11:08:08 +00:00
Marco Benelli
f00e629227 SCXML editor: fix crash on pressing copy/cut
QtCreator used to crash when copy or cut button were pressed without
having selected an item.

Task-number: QTCREATORBUG-17637
Change-Id: Iceaea7a9f826ed16c4caee9fc28b4c14eb304c62
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-01-26 13:08:49 +00:00
Tobias Hunger
b31bc37dca Scxml: Simplify code
Change-Id: Ia1ea8527054a9c94e5f40cca665f7f4b0a5c53e7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-11-29 15:23:04 +00:00
Christian Stenger
950b665741 ScxmlEditor: Fix compile with Qt5.6
Change-Id: I07ed1737b9a72338aa74aab0c6277df414d95cb5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-09-19 07:22:33 +00:00
Orgad Shaneh
7fbbd8f2fd ScxmlEditor: Cleanup nullptr comparisons
Change-Id: I8b61929f1d23a6a7c46043b8967c1aebe333a7e7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-09-18 10:20:03 +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