Commit 33bd9b38 authored by Tim Jenssen's avatar Tim Jenssen

QmlDesigner: setType also gets defaults

Change-Id: Ibdef1f5979515e53d225d3966a4b23ce0f4d9a79
Reviewed-by: default avatarTim Jenssen <tim.jenssen@theqtcompany.com>
parent bb516e49
......@@ -76,7 +76,7 @@ public:
QList<Property> properties() const;
void setType(const TypeName &typeName, int majorVersion, int minorVersion);
void setType(const TypeName &typeName, int majorVersion = -1, int minorVersion = -1);
void setName(const QString &name);
void setLibraryEntryIconPath(const QString &libraryEntryIconPath);
void addProperty(const Property &p);
......
......@@ -160,7 +160,7 @@ MetaInfoReader::ParserSate MetaInfoReader::readTypeElement(const QString &name)
{
if (name == ItemLibraryEntryElementName) {
m_currentEntry = ItemLibraryEntry();
m_currentEntry.setType(m_currentClassName, -1, -1);
m_currentEntry.setType(m_currentClassName);
m_currentEntry.setTypeIcon(QIcon(m_currentIcon));
return ParsingItemLibrary;
} else {
......
......@@ -384,7 +384,7 @@ void SubComponentManager::registerQmlFile(const QFileInfo &fileInfo, const QStri
if (addToLibrary) {
// Add file components to the library
ItemLibraryEntry itemLibraryEntry;
itemLibraryEntry.setType(componentName.toUtf8(), -1, -1);
itemLibraryEntry.setType(componentName.toUtf8());
itemLibraryEntry.setName(baseComponentName);
itemLibraryEntry.setCategory(QLatin1String("QML Components"));
if (!qualifier.isEmpty()) {
......
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