Commit 6c5a17c2 authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Remove itemLibId in ItemLibraryItem



Change-Id: I0b7fc69b405f59b5f20fb453556eab0a1881f9eb
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 4494e74a
......@@ -31,9 +31,8 @@
namespace QmlDesigner {
ItemLibraryItem::ItemLibraryItem(int itemLibId, QObject *parent)
: QObject(parent),
m_libId(itemLibId)
ItemLibraryItem::ItemLibraryItem(QObject *parent)
: QObject(parent)
{
}
......@@ -41,12 +40,6 @@ ItemLibraryItem::~ItemLibraryItem()
{
}
int ItemLibraryItem::itemLibId() const
{
return m_libId;
}
QString ItemLibraryItem::itemName() const
{
return m_itemLibraryEntry.name();
......
......@@ -43,17 +43,15 @@ class ItemLibraryItem: public QObject {
Q_OBJECT
Q_PROPERTY(int itemLibId READ itemLibId FINAL)
Q_PROPERTY(QVariant itemLibraryEntry READ itemLibraryEntry FINAL)
Q_PROPERTY(QString itemName READ itemName FINAL)
Q_PROPERTY(QString itemLibraryIconPath READ itemLibraryIconPath FINAL)
Q_PROPERTY(QVariant sortingRole READ sortingRole FINAL)
public:
ItemLibraryItem(int itemLibId, QObject *parent);
ItemLibraryItem(QObject *parent);
~ItemLibraryItem();
int itemLibId() const;
QString itemName() const;
QString itemLibraryIconPath() const;
QVariant sortingRole() const;
......@@ -66,7 +64,6 @@ public:
private:
ItemLibraryEntry m_itemLibraryEntry;
int m_libId;
bool m_isVisible;
};
......
......@@ -179,7 +179,7 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
m_itemInfos.insert(itemId, entry);
itemModel = new ItemLibraryItem(itemId, sectionModel);
itemModel = new ItemLibraryItem(sectionModel);
itemModel->setItemLibraryEntry(entry);
sectionModel->addSectionEntry(itemModel);
m_sections.insert(itemId, sectionId);
......
Supports Markdown
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