summaryrefslogtreecommitdiff
path: root/src/libs/modelinglib
Commit message (Collapse)AuthorAgeFilesLines
* Translations: Change translation context prefix from "::" to "QtC::"Alessandro Portale2023-02-101-1/+1
| | | | | | | lupdate would be confused by translation contexts starting with :: Change-Id: Ie95e73436fd3cafc80a8e89f908efadc747e644c Reviewed-by: hjk <hjk@qt.io>
* ModelingLib: Tr::tr()Alessandro Portale2023-02-1016-166/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Following orphaned contexts are merged into ::qmt qmt::ClassItem qmt::DiagramController qmt::DiagramSceneController qmt::DocumentController qmt::Exception qmt::FileCreationException qmt::FileNotFoundException qmt::FileReadError qmt::FileWriteError qmt::IllegalXmlFile qmt::ModelController qmt::ModelTreeView qmt::NullPointerException qmt::ObjectItem qmt::ProjectController qmt::PropertiesView::MView qmt::TreeModel qmt::UnknownFileVersion qmt::V Change-Id: Iaf98c2bfc654452d44f6bed155be6ddfe7556b19 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Translations: Prefix translation contexts for libraries with "::"Alessandro Portale2023-01-261-1/+1
| | | | | Change-Id: I0631ad6fdc9f341a162d879e54ff09fbdb74398e Reviewed-by: hjk <hjk@qt.io>
* Replace GPL-3.0 with GPL-3.0-onlyKai Köhne2023-01-10312-312/+312
| | | | | | | | | | | | | GPL-3.0 is deprecated by SPDX. Change done by find . -type f -exec perl -pi -e 's/LicenseRef-Qt-Commercial OR GPL-3.0(?!-)/LicenseRef-Qt-Commercial OR GPL-3.0-only/g' {} \; Change-Id: If316a498e3f27d2030b86d4e7743b3237ce09939 Reviewed-by: Lucie Gerard <lucie.gerard@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* 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>
* CMake build: Use version-less Qt targetsEike Ziller2023-01-051-1/+1
| | | | | | | | | Since we do not support Qt < 5.15 anymore, and as a first step for getting rid of our special FindQt5.cmake. Change-Id: Icc5dbaf9b0a3a622b1f609ff114b9decb6d2856c Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* modelinglib: Remove foreach usage part 2Artem Sokolovskii2023-01-0317-78/+94
| | | | | Change-Id: Ia898cc019a0534a97d20a3dc48e69c6617773766 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* modelinglib: Remove foreach usage part 1Artem Sokolovskii2022-12-2217-43/+49
| | | | | | | Change-Id: Ib185d0dbe7df2e5452502278d9a2c3151cf9812e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Use M_PI for 3.14Jarek Kobus2022-11-252-2/+2
| | | | | | | Change-Id: I19078a791afa1c74cd34e59b033525e029755d7e Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* ModelingLib: Replace foreach with range-based for loopsJarek Kobus2022-11-249-101/+124
| | | | | | Change-Id: I3e51c9477b6995ec06b119fb4518a53aa1d71ec9 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Utils: Add sorted() functionChristian Kandeler2022-10-251-2/+1
| | | | | | | | | For simpler calling code. Change-Id: Ia0a16a28770fd172f74d06a626148248bf5d3c0c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-072-6/+6
| | | | | | | | | | | | | | 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>
* ModelingLib: Limit the usage of qMakePairJarek Kobus2022-09-306-149/+147
| | | | | Change-Id: Ic89f2a9598faadbda964f71dbe84bfd5400aec4f Reviewed-by: hjk <hjk@qt.io>
* Remove outdated version checksRobert Löhning2022-09-121-4/+0
| | | | | | Change-Id: I972a7fe0842a0310ba5df1233a4f417627dad87c Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Libs: Fix Qbs buildChristian Stenger2022-09-011-1/+7
| | | | | | | Amends a621aa1d8bcc. Change-Id: If5276e5558bf8139286c2084400eac915253c7f7 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Libs: Add *tr.h filehjk2022-09-013-0/+17
| | | | | Change-Id: I827d3bc1fd24cf2e3fb6dbe9d255f12cc91cd409 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-26312-7488/+624
| | | | | | | | | 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>
* Drop Qt5: ModelingLib: Get rid of QOverloadJarek Kobus2022-07-201-7/+7
| | | | | | Change-Id: If7b6c4daf3c092eb844eb279049cac2f510dbc47 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Utils: More porting.h related changeshjk2022-07-142-3/+0
| | | | | Change-Id: I528a6950dfa6e09eb7f7ada265c8c41dba816bfd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Collapse most of porting,hhjk2022-07-133-7/+7
| | | | | | | | | Taking the Qt 6 branches, leaving some dummies until downstream adapted. Change-Id: Ib9b86568d73c341c8f740ba497c3cbfab830d8a1 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Modeling: Fix crash while reset modelChristian Stenger2022-06-141-3/+5
| | | | | | | Fixes: QTCREATORBUG-27226 Change-Id: I1333379a99ff5ebd08b121f2f014c6971a192699 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Static Build: make sure the .qrc files have unique namesCristian Adam2022-05-063-2/+2
| | | | | | | | | resources.qrc was present in multiple plugins and Q_INIT_RESOURCE requires an unique name to proper initialize the resource. Change-Id: I2d514ab4b8cc41655009996f28aadca9c454d818 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* CMake: Qt Creator Static build supportCristian Adam2022-04-292-1/+2
| | | | | | | | | | | | | | | | | | | This adds the build system feature that allows Qt Creator's libraries and plugins to be compiled statically. Fixes some symbol clashes when all plugins are linked into the same executable. Support for actually loading static plugins will be added in a separate commit. The feature is controlled by QTC_STATIC_BUILD which by default is OFF. Change-Id: I1fab7953c43e42dc75619e35660029ee067106df Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove qmake build filesEike Ziller2022-01-205-346/+0
| | | | | | | | | | Removes qmake as a build system for building Qt Creator itself. Keep them for some tests that are not completely moved to CMake yet. Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/6.0'Eike Ziller2022-01-067-20/+23
|\ | | | | | | Change-Id: I405e3f95b0cdcd7b2686f31baae16c03c787f007
| * ModelEditor: Fix build with Qt 5Eike Ziller2022-01-061-0/+3
| | | | | | | | | | | | | | | | | | Add missing Q_DECLARE_METATYPEs Amends 5a135ba44266dc34264f70fd53c95eb53be0af1d Change-Id: I12297243f0ed28405bd9f225d7c1dbf5a3511f0c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
| * Modeling: Fix queued connections for Qt 6Eike Ziller2022-01-046-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | The argument must be registered as a meta type for queued connections. This also depends on a consistent naming of the type in the signal arguments (which best is fully qualified). Fixes: QTCREATORBUG-26760 Task-number: QTCREATORBUG-24098 Change-Id: I83991326f051d592a1665ae8cdb472d8376e74bc Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Make some qHash and comparison operators overloads hidden friendshjk2021-12-065-69/+53
|/ | | | | | | Restricts lookup scope more to necessary bits. Change-Id: Ia42c95aaa70534843b7f6a90bfc56d2a1202c612 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix qHash-related size compatibility warnings by MSVCOrgad Shaneh2021-10-204-10/+13
| | | | | | Change-Id: I3b7981ce78b67db4b996f99682284a0b911d8cd7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Avoid size_t to (u)int warnings with auto, where it is possibleTim Jenssen2021-07-073-5/+5
| | | | | Change-Id: I1ec7454ebce59d99bc828bfd5086907eb0905632 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Extend Utils::FilePath for relative pathsJochen Becher2021-04-191-0/+1
| | | | | | | | | The new methods allows converting a path to a file or directory into a path relative to another path to a file or directory. Change-Id: I8c743d5bced9fec81b05ce94ac2b7bec307d9028 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Remove dead code "< QT_VERSION_CHECK(5, 14, 0)"Alessandro Portale2021-03-182-13/+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>
* Libs: Use qAsConst with non-const Qt containers in range-loopsAlessandro Portale2021-02-171-1/+1
| | | | | Change-Id: I00d9f7c1634bbb62191470d58158e1fd150533c0 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Modeling: Rename D{Association,Connection}End::setCardina{t,}lityhjk2021-01-116-10/+10
| | | | | | | | Typos. Note that this doesn't fix the typos in the saved models yet. Task-number: QTCREATORBUG-24543 Change-Id: I3317160692efdbaab10b00a76129ca128b57e259 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Don't access static functions/fields via instanceAlessandro Portale2020-11-191-4/+4
| | | | | | | Courtesy of readability-static-accessed-through-instance Change-Id: I71f54244f1e091315dac2943d9e1bfad6efa56a9 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Add missing "final" to unexported/unshared classesAlessandro Portale2020-11-189-45/+45
| | | | | Change-Id: I84d5fc39d7ef5588a20545854d0cfd0b993db090 Reviewed-by: hjk <hjk@qt.io>
* Compile fix in serialize_container when building with Qt 6Jarek Kobus2020-11-051-5/+11
| | | | | | | | | | | | | | | | | | After bfc6e2d69d2514f7b4e889d08475972eb2f340a6 in Qt 6 we have a different signature of QList::append when QList is instantiated with a pointer to type (T *). After the change we get QList<T *>::append(T *), and before we got QList<T *>::append(T * const &). This breaks the code in serializer. In addition, get rid of warning: "use of function template name with no prior declaration in function call with explicit template arguments is a C++2a extension". In order to fix it, we explicitly declare the full function signature and let compiler choose the right overload of attr() function template. Change-Id: I4132a1307faa9a6bd1b585251a6bb5189a0b1764 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Adapt to key sequence changes in Qt6Eike Ziller2020-09-292-4/+6
| | | | | | | | | | Use operator| instead of operator+ which was removed. Individual keys in QKeySequence are now QKeyCombinations instead of ints. Task-number: QTCREATORBUG-24098 Change-Id: I43a6122cf660e6a6de7edbf3ac9954e0a39cec06 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Modeling: Fix build with Qt6Eike Ziller2020-09-213-5/+9
| | | | | | | | | QUuid constructor with QString became explicit. QStringRef gone. Task-number: QTCREATORBUG-24098 Change-Id: I76d74bbce788c2349b777e76416ddec4a5933eb1 Reviewed-by: hjk <hjk@qt.io>
* Modeling: More Qt6hjk2020-06-192-3/+1
| | | | | | | | Forward declarations for items in QList are not sufficient for moc anymore. Task-number: QTCREATORBUG-24098 Change-Id: I537b9fbd4fb0b95937a051fdc0c7f106a6c8cd65 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Modeling: Compile with Qt 6hjk2020-06-181-1/+3
| | | | | | | Implicitly included header was removed. Change-Id: Ib96242b11a17261c755124a2355c757cc5ec41bd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Modeling: Add missing #include for Qt6hjk2020-06-181-0/+1
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: I89ec3ea02e2ec03fe370692a2ff4b5bc70e82615 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Modeling: Avoid undefined behaviorhjk2020-04-291-1/+1
| | | | | | | | | | With vector based QStringList there's no sequence point between decrement and assignment. Drop the assignment, it's unneeded anyway. Change-Id: Ib88008ec4e3ddada3807ca41fbcc0c981cef5fe3 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Modeling: Avoid QStringList constructor when creating QList<QString>hjk2020-04-293-4/+4
| | | | | | | | This avoids slicing, is shorter, and will do the right thing no matter what the QList/QVector/QStringList discussion will end up with. Change-Id: I3e317e1677f3942aacf83401324f7022bd164823 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-04-281-0/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp Change-Id: If6963d1ef7b5a1ea6343f68c8e7ce6fb5f482f21
| * CMake build: export less generic public includesEike Ziller2020-04-241-0/+2
| | | | | | | | | | | | | | | | | | Do not put every plugin's and lib's source folder into public includes. We require includes of the style <somelib/foo.h> and <someplugin/bar.h> if someone depends on somelib or someplugin. Change-Id: I3a9f200b7c3879cf431b00a1bab4a70f7aa0a9ec Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | Modeling: Remove unused class memberChristian Kandeler2020-04-271-11/+7
| | | | | | | | | | | | Change-Id: Ic243ace9fd27920c9c16b116e3e8139c04be1057 Reviewed-by: Jochen Becher <jochen_becher@gmx.de> Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-03-195-0/+6
|\ \ | |/ | | | | | | | | | | Conflicts: src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp Change-Id: I2a0ccb84560174c5170d5baaff526c0e095f0ba0
| * fix QPainterPath against Qt 5.15.0Tim Jenssen2020-03-185-0/+6
| | | | | | | | | | Change-Id: I08aaf6886b04407f1e52ca4f56607c81fccec85c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-03-161-0/+2
|\ \ | |/ | | | | | | | | | | Conflicts: src/plugins/baremetal/debugservers/uvsc/uvtargetdevicemodel.cpp Change-Id: I4a90920e52dbbe9eb46aef3437ee3c5a6e7b31c6