Extend bindingmodel and minor fixes

- Include singletons in the list of sources (former sourceModelNodes)
- Do not suggest sources on bindings that are initialized without a
  source node. Prevent constructs like
  "property string p: button.qsTr("STREXPR3")".
- Allow changing the name of the target property and update the
  delegate properly when doing so.
- Remove superfluous emitCurrentIndex emission from the
  dynamicpropertiesmodel.
- Add missing qml imports.

Note that it is still possible to create illegal constructs if the user
wants to.

Change-Id: I084978f2f8d451df076d1b556db15764e17e31fb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Knud Dollereder
2023-09-08 15:49:58 +02:00
parent 1d884898be
commit 2dda34f781
10 changed files with 172 additions and 98 deletions

View File

@@ -168,7 +168,6 @@ void DynamicPropertiesModel::removeItem(const AbstractProperty &property)
static_cast<void>(removeRow(*index));
setCurrentProperty(current);
emit currentIndexChanged();
}
QHash<int, QByteArray> DynamicPropertiesModel::roleNames() const