mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-25 04:44:59 +00:00
GH-336 Rename directories on instance rename
This commit is contained in:
@@ -175,6 +175,11 @@ QString BaseInstance::instanceRoot() const
|
||||
return m_rootDir;
|
||||
}
|
||||
|
||||
void BaseInstance::setInstanceRoot(QString newRoot)
|
||||
{
|
||||
m_rootDir = std::move(newRoot);
|
||||
}
|
||||
|
||||
SettingsObjectPtr BaseInstance::settings() const
|
||||
{
|
||||
return m_settings;
|
||||
@@ -225,11 +230,17 @@ QString BaseInstance::iconKey() const
|
||||
return m_settings->get("iconKey").toString();
|
||||
}
|
||||
|
||||
void BaseInstance::setName(QString val)
|
||||
void BaseInstance::setName(QString val, bool requestDirChange)
|
||||
{
|
||||
//FIXME: if no change, do not set. setting involves saving a file.
|
||||
if(m_settings->get("name") == val) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_settings->set("name", val);
|
||||
emit propertiesChanged(this);
|
||||
if(requestDirChange) {
|
||||
emit instanceDirChangeRequest(this);
|
||||
}
|
||||
}
|
||||
|
||||
QString BaseInstance::name() const
|
||||
|
||||
Reference in New Issue
Block a user