aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scxmleditor/plugin_interface/scxmldocument.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace QFile::exists by QFileInfo::existshjk2023-09-011-1/+1
| | | | | | | | QFile::exists only calls QFileInfo::exists, so this saves one function call per invocation. Change-Id: I41cb407345654eeead14455a4955b8b9b015aedc Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Reduce usage of app_version headerEike Ziller2023-06-261-5/+3
| | | | | | | | | | | | Most information is available via Q(Core|Gui)Application. Add an AppInfo structure for the things that are not. This avoids that the information ends up duplicated and hardcoded in the plugins, which is not needed or desired. Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-5/+5
| | | | | | | | | | | | | | 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>
* ScxmlEditor: Convert to using Tr::trAlessandro Portale2022-09-011-12/+13
| | | | | Change-Id: Ia8ab06d4b8a16bb144d6887624c478fb911f29ea Reviewed-by: hjk <hjk@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | 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>
* ScXMLEditor: Remove foreach / Q_FOREACH usageArtem Sokolovskii2022-06-021-4/+4
| | | | | | | Task-number: QTCREATORBUG-27464 Change-Id: Ifaacfe54553e5400ae334263c2d346eeafe4b66c Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Use qAsConst with non-const Qt containers in range-loopsAlessandro Portale2021-02-171-1/+1
| | | | | | | ... in various places Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix vanishing transitions when zooming to stateJarek Kobus2021-01-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Qt6: Sprinkle QLatin1Strings for QStringView comparisonsEike Ziller2020-10-081-1/+1
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: I2fb79bcfd0537a6704a1ee8db840401d6beca7a0 Reviewed-by: hjk <hjk@qt.io>
* Use isEmpty() instead of count() or size()Alessandro Portale2020-01-201-2/+2
| | | | | Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Compile fix with recent Qt devhjk2019-07-291-12/+8
| | | | | | | | | The reasoning in 1b4766e26c6b did not take into account that the scope of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with f70905448f6 in Qt base. Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* SCXML editor: Fix UI textLeena Miettinen2017-04-051-7/+7
| | | | | | | ... capitalization, punctualization, and grammar Change-Id: I15205b899387e8a91529c3a6b6a2e81cf4315a4a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* ScxmlEditor: Don't generate invalid state namesUlf Hermann2017-03-151-1/+1
| | | | | | | '(' and ')' should be avoided when copy/pasting states. Change-Id: Ic54528ed51b2f4596651bb1d23f282e70210f3a7 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* Fix error messagesJarek Kobus2016-11-151-4/+4
| | | | | Change-Id: I88b72925c15e7bc70106cf5f8d9c21f558f8c918 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Revert "Replace virtual isModified method with a getter/setter/notifier"Jarek Kobus2016-10-211-8/+0
| | | | | | | | | | This doesn't fix the issue with cleaning the clear state of undo stack. This introduced the issue when ui file is opened it's marked as modified. It reverts 59c90e00c1e8b18d120f5b5c15b331b1ee427ace and d0c537ca759aa7facfdd0efedac5f5385d16ddb9 Change-Id: Ifd4ff8483d6c297461632de500a4502b1fd0871f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Replace virtual isModified method with a getter/setter/notifierJarek Kobus2016-10-171-0/+8
| | | | | | | We have lacked the setter and dedicated notifier before. Change-Id: I58845a48259d260c5cc90ae94b173c79cddcfef9 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ScxmlEditor: Cleanup nullptr comparisonsOrgad Shaneh2016-09-181-1/+1
| | | | | Change-Id: I8b61929f1d23a6a7c46043b8967c1aebe333a7e7 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* ScxmlEditor: Initial importAlessandro Portale2016-09-161-0/+701
Change-Id: I4701b77ebd4e2520f2616c42206ac17be3a12b60 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>