forked from qt-creator/qt-creator
QmlDesigner: setType also gets defaults
Change-Id: Ibdef1f5979515e53d225d3966a4b23ce0f4d9a79 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user