--- a/src/model.h Wed Feb 14 15:17:30 2018 +0200 +++ b/src/model.h Thu Feb 15 10:24:39 2018 +0200 @@ -79,7 +79,7 @@ public: enum { - ObjectRole = Qt::UserRole + ObjectIdRole = Qt::UserRole, }; Model(class DocumentManager* manager); @@ -112,10 +112,11 @@ LDObject* addFromString(QString line); LDObject* replaceWithFromString(LDObject* object, QString line); IndexGenerator indices() const; + LDObject* lookup(const QModelIndex& index) const; int rowCount(const QModelIndex& parent) const override; QVariant data(const QModelIndex& index, int role) const override; - bool removeRows(int row, int count, const QModelIndex& ) override; + // bool removeRows(int row, int count, const QModelIndex& ) override; signals: void objectAdded(LDObject* object);