QmlDesigner: setType also gets defaults

Change-Id: Ibdef1f5979515e53d225d3966a4b23ce0f4d9a79
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Tim Jenssen
2016-04-06 11:47:37 +02:00
parent bb516e49ae
commit 33bd9b387a
3 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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 {

View File

@@ -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()) {