summaryrefslogtreecommitdiff
path: root/src/libs/modelinglib/qmt
Commit message (Collapse)AuthorAgeFilesLines
* ModelingLib: Tr::tr()Alessandro Portale2023-02-1015-163/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Replace GPL-3.0 with GPL-3.0-onlyKai Köhne2023-01-10288-288/+288
| | | | | | | | | | | | | 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>
* modelinglib: Remove foreach usage part 2Artem Sokolovskii2023-01-0316-75/+90
| | | | | 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-248-95/+118
| | | | | | 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>
* Use SPDX license identifiersLucie Gérard2022-08-26288-6912/+576
| | | | | | | | | 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-061-0/+0
| | | | | | | | | 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-291-0/+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-201-295/+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>
* 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-212-4/+8
| | | | | | | | | 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>
* 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
| * Fix QPainterPath-related compilation errors in Qt 5.15Friedemann Kleint2020-03-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some include of QPainterPath was removed in Qt, causing errors like: easingpane\easinggraph.cpp(258): error C2079: 'path' uses undefined class 'QPainterPath' easingpane\easinggraph.cpp(275): error C2027: use of undefined type 'QPainterPath' easingpane\easinggraph.cpp(305): error C2664: 'void QPainter::drawPath(const QPainterPath &)': cannot convert argument 1 from 'int' to 'const QPainterPath &' easingpane\easinggraph.cpp(305): note: Reason: cannot convert from 'int' to 'const QPainterPath' easingpane\easinggraph.cpp(305): note: use of undefined type 'QPainterPath' ... Add the missing include statements. Change-Id: I4f3383cbcec891a52480a683c9c76ed5deee2b2a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | modeleditor: Add icon name to object outline for intersectionJochen Becher2020-02-285-0/+55
| | | | | | | | | | Change-Id: I09b65a675e4d2205d0be2b1ca1687f2ceffe4285 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-02-261-0/+2
|\ \ | |/ | | | | Change-Id: I3e7049da2c3da6f784e3cb3407c22ada556e5d24
| * Modeling: Fix deprecation warninghjk2020-02-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file included from /data/dev/qt-5/qtbase/include/QtCore/qlist.h:1, from /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qobject.h:49, from /data/dev/qt-5/qtbase/include/QtCore/qobject.h:1, from /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/io/qiodevice.h:45, from /data/dev/qt-5/qtbase/include/QtCore/qiodevice.h:1, from /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/serialization/qdatastream.h:44, from /data/dev/qt-5/qtbase/include/QtCore/qdatastream.h:1, from /data/dev/qt-5/qtbase/include/QtCore/QDataStream:1, from ./qmt/infrastructure/uid.h:30, from qmt/model/melement.h:28, from qmt/model/mobject.h:28, from qmt/model/mobject.cpp:26: /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qlist.h: In instantiation of ‘void QList<T>::node_construct(QList<T>::Node*, const T&) [with T = qmt::Handle<qmt::MObject>]’: /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qlist.h:622:13: required from ‘void QList<T>::append(const T&) [with T = qmt::Handle<qmt::MObject>]’ ./qmt/infrastructure/handles.h:162:9: required from ‘void qmt::Handles<T>::add(const qmt::Uid&) [with T = qmt::MObject]’ qmt/model/mobject.cpp:80:23: required from here /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qlist.h:471:35: warning: implicitly-declared ‘constexpr qmt::Handle<qmt::MObject>& qmt::Handle<qmt::MObject>::operator=(const qmt::Handle<qmt::MObject>&)’ is deprecated [-Wdeprecated-copy] 471 | else *reinterpret_cast<T*>(n) = t; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from ./qmt/infrastructure/handles.h:28, from qmt/model/mobject.h:29, from qmt/model/mobject.cpp:26: ./qmt/infrastructure/handle.h:40:5: note: because ‘qmt::Handle<qmt::MObject>’ has user-provided ‘qmt::Handle<T>::Handle(const qmt::Handle<T>&) [with T = qmt::MObject]’ 40 | Handle(const Handle &rhs) : m_uid(rhs.m_uid), m_target(rhs.m_target) { } | ^~~~~~ Change-Id: I9fe85f5b46912a52d1722da0f048d4eee6171ade Reviewed-by: Jochen Becher <jochen_becher@gmx.de> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | modeleditor: Intersect relations with shape of itemJochen Becher2020-02-2516-38/+309
| | | | | | | | | | Change-Id: I40d898715772f74ffa225ac27b91ee7ad4d8fedc Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | modeleditor: Improve intersection of line with polygonJochen Becher2020-02-232-8/+25
| | | | | | | | | | Change-Id: Ie546801fadedffaef24c53ce83ce0a039e77a04a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | modeleditor: Fix intersection of relation with componentJochen Becher2020-02-231-4/+8
| | | | | | | | | | Change-Id: Ib0a999e56f98bc2a4483583a322e107560c17dc0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | modeleditor: Keep some border around the diagram sceneJochen Becher2020-02-232-3/+5
|/ | | | | Change-Id: I09aeaffa0a36048c8a6c8e7787750b08e07f08d5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* modeleditor: Improve debugging of relations on diagramsJochen Becher2020-01-222-0/+17
| | | | | Change-Id: I39d357f0b2fffe2db93cd389110cf3fc995d6e59 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Use isEmpty() instead of count() or size()Alessandro Portale2020-01-202-2/+2
| | | | | Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>