Delete shortcut when deleting instances

Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
Yihe Li 2025-06-01 08:13:10 +08:00
parent 0a89f5cfaa
commit d3f337d6ef
No known key found for this signature in database
11 changed files with 168 additions and 67 deletions

View file

@ -398,6 +398,17 @@ bool BaseInstance::syncInstanceDirName(const QString& newRoot) const
return oldRoot == newRoot || QFile::rename(oldRoot, newRoot);
}
void BaseInstance::registerShortcut(const ShortcutData& data)
{
m_shortcuts.append(data);
qDebug() << "Registering shortcut for instance" << id() << "with name" << data.name << "and path" << data.filePath;
}
QList<ShortcutData>& BaseInstance::getShortcuts()
{
return m_shortcuts;
}
QString BaseInstance::name() const
{
return m_settings->get("name").toString();