Use custom signals to record previous name
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
parent
11a0dbf810
commit
a2e44c0ef7
8 changed files with 18 additions and 44 deletions
|
@ -583,18 +583,6 @@ InstancePtr InstanceList::getInstanceById(QString instId) const
|
|||
return InstancePtr();
|
||||
}
|
||||
|
||||
InstancePtr InstanceList::getInstanceByRoot(QString instanceRoot) const
|
||||
{
|
||||
if (instanceRoot.isEmpty())
|
||||
return InstancePtr();
|
||||
for (auto& inst : m_instances) {
|
||||
if (inst->instanceRoot() == instanceRoot) {
|
||||
return inst;
|
||||
}
|
||||
}
|
||||
return InstancePtr();
|
||||
}
|
||||
|
||||
InstancePtr InstanceList::getInstanceByManagedName(const QString& managed_name) const
|
||||
{
|
||||
if (managed_name.isEmpty())
|
||||
|
@ -613,11 +601,6 @@ QModelIndex InstanceList::getInstanceIndexById(const QString& id) const
|
|||
return index(getInstIndex(getInstanceById(id).get()));
|
||||
}
|
||||
|
||||
QModelIndex InstanceList::getInstanceIndexByRoot(const QString& instanceRoot) const
|
||||
{
|
||||
return index(getInstIndex(getInstanceByRoot(instanceRoot).get()));
|
||||
}
|
||||
|
||||
int InstanceList::getInstIndex(BaseInstance* inst) const
|
||||
{
|
||||
int count = m_instances.count();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue