forked from qt-creator/qt-creator
QmlDesigner: Use simplfied type name to avoid ambiguities
Types can be prefixed with QtQuick. or <cpp>. Task-number: QDS-8947 Change-Id: If2b1423d6a08a9e083f6abeeca62be690ce20d3e Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
@@ -2564,7 +2564,7 @@ bool NodeMetaInfo::isBool() const
|
||||
if (!isValid())
|
||||
return false;
|
||||
|
||||
auto type = m_privateData->qualfiedTypeName();
|
||||
auto type = simplifiedTypeName();
|
||||
|
||||
return type == "bool" || type == "boolean";
|
||||
}
|
||||
@@ -2579,7 +2579,7 @@ bool NodeMetaInfo::isInteger() const
|
||||
if (!isValid())
|
||||
return false;
|
||||
|
||||
auto type = m_privateData->qualfiedTypeName();
|
||||
auto type = simplifiedTypeName();
|
||||
|
||||
return type == "int" || type == "integer";
|
||||
}
|
||||
@@ -2597,7 +2597,7 @@ bool NodeMetaInfo::isFloat() const
|
||||
if (!isValid())
|
||||
return false;
|
||||
|
||||
auto type = m_privateData->qualfiedTypeName();
|
||||
auto type = simplifiedTypeName();
|
||||
|
||||
return type == "qreal" || type == "double" || type == "float";
|
||||
}
|
||||
@@ -2609,7 +2609,7 @@ bool NodeMetaInfo::isVariant() const
|
||||
using namespace Storage::Info;
|
||||
return isTypeId(m_typeId, m_projectStorage->builtinTypeId<QVariant>());
|
||||
} else {
|
||||
return isValid() && m_privateData->qualfiedTypeName() == "QVariant";
|
||||
return isValid() && simplifiedTypeName() == "QVariant";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2622,7 +2622,7 @@ bool NodeMetaInfo::isString() const
|
||||
if (!isValid())
|
||||
return false;
|
||||
|
||||
auto type = m_privateData->qualfiedTypeName();
|
||||
auto type = simplifiedTypeName();
|
||||
|
||||
return type == "string" || type == "QString";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user