commit
f8bb1a872a
@ -290,7 +290,7 @@ void InstanceList::deleteGroup(const GroupId& name)
|
|||||||
qDebug() << "Remove" << instID << "from group" << name;
|
qDebug() << "Remove" << instID << "from group" << name;
|
||||||
removed = true;
|
removed = true;
|
||||||
auto idx = getInstIndex(instance.get());
|
auto idx = getInstIndex(instance.get());
|
||||||
if (idx > 0)
|
if (idx >= 0)
|
||||||
emit dataChanged(index(idx), index(idx), { GroupRole });
|
emit dataChanged(index(idx), index(idx), { GroupRole });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -315,7 +315,7 @@ void InstanceList::renameGroup(const QString& src, const QString& dst)
|
|||||||
qDebug() << "Set" << instID << "group to" << dst;
|
qDebug() << "Set" << instID << "group to" << dst;
|
||||||
modified = true;
|
modified = true;
|
||||||
auto idx = getInstIndex(instance.get());
|
auto idx = getInstIndex(instance.get());
|
||||||
if (idx > 0)
|
if (idx >= 0)
|
||||||
emit dataChanged(index(idx), index(idx), { GroupRole });
|
emit dataChanged(index(idx), index(idx), { GroupRole });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -947,9 +947,12 @@ QString InstanceList::getStagedInstancePath()
|
|||||||
|
|
||||||
bool InstanceList::commitStagedInstance(const QString& path,
|
bool InstanceList::commitStagedInstance(const QString& path,
|
||||||
InstanceName const& instanceName,
|
InstanceName const& instanceName,
|
||||||
const QString& groupName,
|
QString groupName,
|
||||||
InstanceTask const& commiting)
|
InstanceTask const& commiting)
|
||||||
{
|
{
|
||||||
|
if (groupName.isEmpty() && !groupName.isNull())
|
||||||
|
groupName = QString();
|
||||||
|
|
||||||
QDir dir;
|
QDir dir;
|
||||||
QString instID;
|
QString instID;
|
||||||
InstancePtr inst;
|
InstancePtr inst;
|
||||||
|
@ -130,7 +130,7 @@ class InstanceList : public QAbstractListModel {
|
|||||||
* should_override is used when another similar instance already exists, and we want to override it
|
* should_override is used when another similar instance already exists, and we want to override it
|
||||||
* - for instance, when updating it.
|
* - for instance, when updating it.
|
||||||
*/
|
*/
|
||||||
bool commitStagedInstance(const QString& keyPath, const InstanceName& instanceName, const QString& groupName, const InstanceTask&);
|
bool commitStagedInstance(const QString& keyPath, const InstanceName& instanceName, QString groupName, const InstanceTask&);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy a previously created staging area given by @keyPath - used when creation fails.
|
* Destroy a previously created staging area given by @keyPath - used when creation fails.
|
||||||
|
Loading…
Reference in New Issue
Block a user