Commit 7076272b authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.Instances: fix delemiting of type names



Import are delemited with a "." and there is a "/" between
import and type.

e.g.: QtQuick.Layout/QQuickLayout

Change-Id: I7750b333296cceef99992610cca126530f777777
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 06cfc22f
......@@ -33,16 +33,25 @@
namespace QmlDesigner {
static TypeName properDelemitingOfType(const TypeName &typeName)
{
TypeName convertedTypeName = typeName;
int lastIndex = typeName.lastIndexOf('.');
if (lastIndex > 0)
convertedTypeName[lastIndex] = '/';
return convertedTypeName;
}
InstanceContainer::InstanceContainer()
: m_instanceId(-1), m_majorNumber(-1), m_minorNumber(-1)
{
}
InstanceContainer::InstanceContainer(qint32 instanceId, const TypeName &type, int majorNumber, int minorNumber, const QString &componentPath, const QString &nodeSource, NodeSourceType nodeSourceType, NodeMetaType metaType)
: m_instanceId(instanceId), m_type(type), m_majorNumber(majorNumber), m_minorNumber(minorNumber), m_componentPath(componentPath),
: m_instanceId(instanceId), m_type(properDelemitingOfType(type)), m_majorNumber(majorNumber), m_minorNumber(minorNumber), m_componentPath(componentPath),
m_nodeSource(nodeSource), m_nodeSourceType(nodeSourceType), m_metaType(metaType)
{
m_type.replace('.', '/');
}
qint32 InstanceContainer::instanceId() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment