aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/modelinglib
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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
| * 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>
* Deduplicate calls for obtaining model indexOrgad Shaneh2020-01-031-10/+10
| | | | | Change-Id: I799742a06ce592ab935ee0609d5930a7d26a44e1 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* ModelEditor: Clear selection before clearing diagram sceneJochen Becher2019-12-191-0/+1
| | | | | | | | Avoid assert due to inconsistent diagram scene in onSelectionChanged slot. Change-Id: I3e3341da4dd9414f2be2a86a4abe0a6bb0bfb4f5 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ModelEditor: Fix possible crash on deleting elementsJochen Becher2019-12-191-1/+2
| | | | | Change-Id: Iaae850d9bf965f457b49f5a0d56da603349d7978 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Remove usages of deprecated APIs (part 2)Sona Kurazyan2019-09-032-0/+9
| | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-07-261-1/+0
|\ | | | | | | Change-Id: I427280fdb207b878000697dfd37595ffdb26f4e7
| * CMake build: Add "Devel" packageCristian Adam2019-07-251-1/+0
| | | | | | | | | | | | | | | | | | The "Devel" package will contain headers, libraries, documentation needed by the 3rd parties to build Qt Creator plugins. Fixes: QTCREATORBUG-22514 Change-Id: If54929f823982b921b98a63ff6085d53618a3a49 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-07-251-2/+2
|\| | | | | | | | | | | | | Conflicts: src/plugins/baremetal/iarewtoolchain.cpp Change-Id: I483e81d7e920e724fb7cde84a8f6fa9bce4cd518
| * Modeling: Avoid deprecation warningshjk2019-07-221-2/+2
| | | | | | | | | | | | | | Also, one call should be enough. Change-Id: Ida1462a8ce49865bf6277d3f0f5625c737573776 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Avoid warning on empty expressionshjk2019-07-2341-182/+182
|/ | | | | | | | For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* More Utils::toSet/toListhjk2019-07-041-5/+7
| | | | | | | ... and unrelated cosmetic changes. Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Add toSet/toList functionshjk2019-07-022-2/+4
| | | | | | | | | As replacement for functionality that's being deprecated in Qt but still useful or needed, or that cannot easily be handled without resorting to #if QT_VERSION checks in user code. Change-Id: Id3575a54ff944bf0e89d452d13944fcaee270208 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ModelingLib: Use QElapsedTimer instead of QTimehjk2019-06-122-7/+6
| | | | | | | | ... because of recent deprecation of QTime::elapsed. Change-Id: I5bb8cd2a613a0258669055471008c5d6b4db1099 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Qt Creator CMake portCristian Adam2019-05-171-0/+196
| | | | | | | | | | | | | | Based on Tobias Hunger's work from a few months ago. The CMake configuration needs libclang and Qt paths specified as CMAKE_PREFIX_PATH. Auto tests are run with "ctest". At the moment the pass rate is 87%. Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Replace static_casts by QOverload where possiblehjk2019-02-261-8/+8
| | | | | | | | | Mainly to get rid of the QProcess::finished deprecation warning. Also adjust coding style in the surrounding connects when needed. Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* use initializer listsTim Jenssen2019-01-211-1/+1
| | | | | Change-Id: I82b04601f1db52197b3dc625b6b7e0f143c1c8b6 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Canonicalize some includesChristian Kandeler2019-01-102-2/+2
| | | | | | | | | | | | Our canonical style is #include <utils/fileutils.h> rather than #include "utils/fileutils.h" Which makes sense, as such headers will never be found in the local directory. Change-Id: I4ca46e90d6c4d19d4b1f235f4c79caad864ef222 Reviewed-by: hjk <hjk@qt.io>
* ModelEditor: Improve performance on finding a model delegateJochen Becher2018-10-083-8/+15
| | | | | Change-Id: Ide45583093d1d95c433858fc57c8c6ff772783a7 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>