Commit c4a47e09 authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Remove ItemLibraryModel::m_itemInfos



Change-Id: Ie4d91fb6f433684d273317e1b2191474f70f156b
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 6c5a17c2
......@@ -145,7 +145,6 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
QMap<QString, int> sections;
clearSections();
m_itemInfos.clear();
m_sections.clear();
m_nextLibId = 0;
......@@ -177,8 +176,6 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
sections.insert(itemSectionName, sectionId);
}
m_itemInfos.insert(itemId, entry);
itemModel = new ItemLibraryItem(sectionModel);
itemModel->setItemLibraryEntry(entry);
sectionModel->addSectionEntry(itemModel);
......@@ -189,13 +186,6 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
updateVisibility();
}
QString ItemLibraryModel::getTypeName(int libId)
{
return m_itemInfos.value(libId).typeName();
}
QMimeData *ItemLibraryModel::getMimeData(const ItemLibraryEntry &itemLibraryEntry)
{
QMimeData *mimeData = new QMimeData();
......@@ -210,12 +200,6 @@ QMimeData *ItemLibraryModel::getMimeData(const ItemLibraryEntry &itemLibraryEntr
return mimeData;
}
QPixmap ItemLibraryModel::getLibraryEntryIcon(int libId)
{
return QPixmap(m_itemInfos.value(libId).libraryEntryIconPath());
}
ItemLibrarySection *ItemLibraryModel::section(int libraryId)
{
return m_sectionModels.value(libraryId);
......
......@@ -60,9 +60,7 @@ public:
void update(ItemLibraryInfo *itemLibraryInfo, Model *model);
QString getTypeName(int libId);
QMimeData *getMimeData(const ItemLibraryEntry &itemLibraryEntry);
QPixmap getLibraryEntryIcon(int libId);
ItemLibrarySection* section(int libraryId);
QList<ItemLibrarySection*> sections() const;
......@@ -96,7 +94,6 @@ private: // functions
private: // variables
QMap<int, ItemLibrarySection*> m_sectionModels;
QMap<int, ItemLibraryEntry> m_itemInfos;
QMap<int, int> m_sections;
QHash<int, QByteArray> m_roleNames;
......
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