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

QmlDesigner: setType also gets defaults



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