void Config::GameSettings::validatePaths() { QStringList paths = mSettings.values(QString("data")); Files::PathContainer dataDirs; foreach (const QString &path, paths) { QByteArray bytes = path.toUtf8(); dataDirs.push_back(Files::PathContainer::value_type(std::string(bytes.constData(), bytes.length()))); }
void Launcher::GameSettings::validatePaths() { if (mSettings.isEmpty() || !mDataDirs.isEmpty()) return; // Don't re-validate paths if they are already parsed QStringList paths = mSettings.values(QString("data")); Files::PathContainer dataDirs; foreach (const QString &path, paths) { dataDirs.push_back(Files::PathContainer::value_type(path.toStdString())); }