forked from qt-creator/qt-creator
QmlDesigner: Simply property type name check
Move some repetitive pattern to PropertyMetaInfo Change-Id: Iba8722d3d95881c1db85c12cbc2b2b8c4b629f2c Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -139,7 +139,7 @@ void MaterialEditorView::changeValue(const QString &name)
|
||||
bool propertyTypeUrl = false;
|
||||
|
||||
if (metaInfo.isValid() && metaInfo.hasProperty(propertyName)) {
|
||||
if (metaInfo.property(propertyName).hasPropertyTypeName("QUrl", "url")) {
|
||||
if (metaInfo.property(propertyName).propertyTypeNameIsUrl()) {
|
||||
// turn absolute local file paths into relative paths
|
||||
propertyTypeUrl = true;
|
||||
QString filePath = castedValue.toUrl().toString();
|
||||
|
||||
Reference in New Issue
Block a user