aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/designer/qquickdesignercustomobjectdata.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Quick/DesignerSupport: Use QByteArrayList when checking property listsFriedemann Kleint2018-03-271-2/+2
| | | | | | | | | | Fix warnings like designer/qquickdesignersupportitems.cpp:112:63: warning: 'QString::QString(const char*)' is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations] Amends 01a40e1f920b58f00d52ff4542f6ef9c606a9b03. Change-Id: I0e8167f8eacc0d901f79fb5dd8b2772ab29c55a8 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Do not look up objects in deferred propertiesThomas Hartmann2018-03-211-0/+12
| | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | 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>
* Cleanup and reduce the number of overloads for QQmlBinding::create()Lars Knoll2016-12-061-1/+1
| | | | | Change-Id: Ibcd277bc434638e5c6e8e9ccea634aa25cde1643 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Quick: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-181-2/+2
| | | | | Change-Id: I3493b16a184fc811289db9e98eff37bb987113a3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QML: Unify property reads/writes and use accessorsErik Verbruggen2016-07-251-2/+2
| | | | | | | | | Pass property reads/writes through utility functions in QQmlProperty, which in turn will try to use accessors when available (and no interceptors have to be called). Change-Id: I60ecfc202b6024bfe4a33206a46299787b152546 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Specialize bindings based on target property type.Erik Verbruggen2016-06-271-1/+2
| | | | | | | | | | | When we can determine the type of a target property during type compilation, we can skip a whole bunch of code that deals with converting the result of a binding to the correct (target) type. This removes 65 instructions on x86 for such typed bindings. Change-Id: Id2c7c57b9ae6dfbeb921121beae9630604ca1d17 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>
* Fixing compilation with -no-rttiThomas Hartmann2015-11-201-0/+4
| | | | | | | | | | DesignerSupport should not keep users from compiling with -no-rtti. Next step is to move DesignerSupport into a library and only build it on desktop platforms. Task-number: QTBUG-49154 Change-Id: Ie0037f3371c24da56f34f27b1f39e8c318e41451 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix QString-related warnings in quick designer support.Friedemann Kleint2015-07-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Adding more DesignerSupport functionsThomas Hartmann2015-07-171-0/+282
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>