aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/designer/qquickdesignersupportproperties.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie GĂ©rard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQmlEngine: Remove methods that merely forward to QQmlMetaTypeUlf Hermann2022-01-181-2/+2
| | | | | | | There is no reason to drag an engine around for those. Change-Id: I02100b207f197e75dfd458ff1cce5c4920dd94bd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Avoid infinite loop in designer supportThomas Hartmann2021-07-221-6/+18
| | | | | | | Pick-to: 5.15 6.0 6.1 6.2 Task-number: QTBUG-94928 Change-Id: I1ee14600fb0fd9f0ee499546e3ffcd66114aaeff Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* crash fix - avoid wrong gcc optimizationTim Jenssen2021-07-021-6/+7
| | | | | | | | | | | | | | | This fixes a crash that gcc optimized the code in the way that inspectedObjects->contains(object) executed at a nullptr. (only release only some gcc versions) This was already fixed in the past but reintroduced by another commit in the past. Pick-to: 5.15 6.1 6.2 Task-number: QTBUG-94798 Change-Id: I9759f3347712f706dd99303ce9d804667c1525f3 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove QQmlMetaType::isQObjectFabian Kosmale2021-03-051-1/+1
| | | | | | | | All callers do have a metatype which they can query instead. Task-number: QTBUG-82931 Change-Id: I2ff514354a43d677da963d4239333fc66a42df59 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* DesignerSupport: Don't skip already inspected objectsMiikka Heikkinen2021-01-041-9/+4
| | | | | | | | | | | | | | | Already inspected objects should not be skipped when determining their properties, as recursive call will always have different base name for the properties. Internally we don't need inspectedObjects list at all anymore, but it's kept to avoid changing API and in case the caller is interested in inspected objects. Fixes: QDS-3301 Change-Id: I76198b96d420e2a5ae6b13cfee65df4bce22d8f5 (cherry picked from commit 5e0ba6b797ca7843609fc19d8c4c96f6f26aacd2) Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* Use QMetaType instead of metatype-id, take 2Fabian Kosmale2020-12-031-2/+2
| | | | | | | | | This time, the ValueTypeFactory gets converted. As a consequence, many callers get touched again. Task-number: QTBUG-88766 Change-Id: I3a8b7d5cfeb7fac85daf1702febba205971d4256 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix wrong optimization on ARM64 ubuntu qemuFawzi Mohamed2020-08-131-3/+1
| | | | | | | | | | | | | | | | | | | | in QQuickDesignerSupportProperties::propertyNameListForWritableProperties inspected object is initialized with a stack variable in the first iteration: if (inspectedObjects == nullptr) inspectedObjects = &localObjectList; Subsequently inspectedObjects->contains(object) is called. This crashes on ubuntu ARM64 QEMU unless one performs other operations before that call (just in optimized code without debug information). As the contains will return false in the first iteration doing it only in subsequent recursions (by putting it in an else clause) does not change the expected execution, but avoid the optimization bug that was blocking CI integration of qdeclarative (a crash cannot be blacklisted). Change-Id: I2d14ecc78673ad06073825c094e4e1dcd935e73a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Get rid of global gadgetPtr in QQmlValueTypeUlf Hermann2020-01-291-4/+4
| | | | | | | | | | | | We should not keep user-created objects in global data structures. This is inherently thread-unsafe and crashes when the user passes static data and later unloads the same. Instead we keep the cached gadgetPtr wrapper objects in the engine now. Fixes: QTBUG-79553 Change-Id: I24ac3e84b572831d1d70b61b8a6001338579e284 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Do not look up objects in deferred propertiesThomas Hartmann2018-03-211-1/+10
| | | | | | | | | | | If a property is a deferred property then skip it if searching for qobjects. This is not enough to avoid all asserts, but not reading deferred properties does make sense in any case. Task-number: QTBUG-67152 Change-Id: I495051745a5daf458909ff6c4cb5210597774ded Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-2/+2
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix warningsThomas Hartmann2015-07-301-1/+1
| | | | | Change-Id: I4acbf9bdc09ef2d906c1ae1894e5f5995b93ae72 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Property names can be utf8Thomas Hartmann2015-07-221-1/+1
| | | | | Change-Id: Ib337fa9a366725b8f0491a4816597fa5baeef7a9 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Fix QString-related warnings in quick designer support.Friedemann Kleint2015-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | designer/qquickdesignersupportmetainfo.cpp: In static member function 'static bool QQuickDesignerSupportMetaInfo::isSubclassOf(QObject*, const QByteArray&)': designer/qquickdesignersupportmetainfo.cpp:50:51: warning: 'bool QString::operator==(const QByteArray&) const' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:1229) [-Wdeprecated-declarations] designer/qquickdesignersupportitems.cpp: In function 'void stopAnimation(QObject*)': designer/qquickdesignersupportitems.cpp:62:35: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations] designer/qquickdesignersupportitems.cpp:63:33: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations] designer/qquickdesignersupportitems.cpp: In function 'void allSubObjects(QObject*, QObjectList&)': designer/qquickdesignersupportitems.cpp:93:62: warning: 'bool operator!=(const char*, QLatin1String)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:1192) [-Wdeprecated-declarations] designer/qquickdesignersupportitems.cpp: In function 'QQmlType* getQmlType(const QString&, int, int)': designer/qquickdesignersupportitems.cpp:166:78: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations] designer/qquickdesignersupportitems.cpp: In static member function 'static QObject* QQuickDesignerSupportItems::createPrimitive(const QString&, int, int, QQmlContext*)': designer/qquickdesignersupportitems.cpp:223:41: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations] designer/qquickdesignersupportitems.cpp: In static member function 'static void QQuickDesignerSupportItems::disableTransition(QObject*)': designer/qquickdesignersupportitems.cpp:295:42: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations] designer/qquickdesignersupportitems.cpp:296:44: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations] designer/qquickdesignersupportproperties.cpp: In static member function 'static QQuickDesignerSupport::PropertyNameList QQuickDesignerSupportProperties::propertyNameListForWritableProperties(QObject*, const PropertyName&, QObjectList*)': designer/qquickdesignersupportproperties.cpp:145:47: warning: 'bool QString::operator!=(const char*) const' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:1166) [-Wdeprecated-declarations] designer/qquickdesignersupportstates.cpp: In static member function 'static bool QQuickDesignerSupportStates::isStateActive(QObject*, QQmlContext*)': designer/qquickdesignersupportstates.cpp:50:50: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations] designer/qquickdesignersupportstates.cpp: In static member function 'static void QQuickDesignerSupportStates::activateState(QObject*, QQmlContext*)': designer/qquickdesignersupportstates.cpp:64:50: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations] designer/qquickdesignercustomobjectdata.cpp: In member function 'void QQuickDesignerCustomObjectData::populateResetHashes()': designer/qquickdesignercustomobjectdata.cpp:146:93: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations] designer/qquickdesignercustomobjectdata.cpp: In member function 'void QQuickDesignerCustomObjectData::doResetProperty(QQmlContext*, const PropertyName&)': designer/qquickdesignercustomobjectdata.cpp:170:58: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations] designer/qquickdesignercustomobjectdata.cpp: In member function 'bool QQuickDesignerCustomObjectData::hasBindingForProperty(QQmlContext*, const PropertyName&, bool*) const': designer/qquickdesignercustomobjectdata.cpp:227:58: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations] designer/qquickdesignercustomobjectdata.cpp: In member function 'void QQuickDesignerCustomObjectData::setPropertyBinding(QQmlContext*, const PropertyName&, const QString&)': designer/qquickdesignercustomobjectdata.cpp:244:58: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations] designer/qquickdesignercustomobjectdata.cpp:259:55: warning: 'QString::QString(const char*)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:653) [-Wdeprecated-declarations] designer/qquickdesignersupportpropertychanges.cpp: In static member function 'static void QQuickDesignerSupportPropertyChanges::changeValue(QObject*, const PropertyName&, const QVariant&)': designer/qquickdesignersupportpropertychanges.cpp:91:52: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations] designer/qquickdesignersupportpropertychanges.cpp: In static member function 'static void QQuickDesignerSupportPropertyChanges::changeExpression(QObject*, const PropertyName&, const QString&)': designer/qquickdesignersupportpropertychanges.cpp:103:62: warning: 'QString::QString(const QByteArray&)' is deprecated (declared at /depot/fkleint/qt-5/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:656) [-Wdeprecated-declarations] Change-Id: Icdaec28b5bea23244303b082217660c38aefa40f Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Implmementing missing function of QQuickDesignerSupportPropertiesThomas Hartmann2015-07-221-0/+49
| | | | | Change-Id: Iafeda8755df80fdc2329ef778aa563eb0636ef40 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* Adding more DesignerSupport functionsThomas Hartmann2015-07-171-0/+184
The new functions/enablers are split into new classes. * DesignerSupportItems Helper functions to tweak and create items. * DesignerSupportProperties Helper functions to deal with properties and bindings. * DesignerSupportPropertyChanges Helper functions to deal with PropertyChanges. * DesignerSupportStates Helper functions to deal with States. * DesignerSupportMetaInfo Two helper functions to deal with meta info and notication. DesignerMetaObject is a specialized QQmlVMEMetaObject that implments notification of property changes and allows to create dynamic properties. DesignerCustomObjectData provides additional data for each Object. The main functionality atm is to keep the default values and bindings for properties, so they can be restored. Change-Id: I6b6f501c8c5848d62bfcb7e704bc45662e731d54 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>