| 311 | } |
| 312 | |
| 313 | void Instance::getProfile(const Settings& s) |
| 314 | { |
| 315 | if (!m_profile.isEmpty()) { |
| 316 | // there's already a profile set up, probably an override |
| 317 | return; |
| 318 | } |
| 319 | |
| 320 | if (auto name = s.game().selectedProfileName()) { |
| 321 | // use last profile |
| 322 | m_profile = *name; |
| 323 | return; |
| 324 | } |
| 325 | |
| 326 | // profile missing from ini, use the default |
| 327 | m_profile = QString::fromStdWString(AppConfig::defaultProfileName()); |
| 328 | |
| 329 | log::warn("no profile found in ini {}, using default '{}'", iniPath(), m_profile); |
| 330 | } |
| 331 | |
| 332 | // returns a list of files and folders that must be deleted when deleting |
| 333 | // this instance |
nothing calls this directly
no test coverage detected