void Profile::scanProfiles() { profiles.clear(); QVector<QString> toxfiles = getFilesByExt("tox"), inifiles = getFilesByExt("ini"); for (QString toxfile : toxfiles) { if (!inifiles.contains(toxfile)) importProfile(toxfile); profiles.append(toxfile); } }
/** * @brief Scan for profile, automatically importing them if needed. * @warning NOT thread-safe. */ void Profile::scanProfiles() { profiles.clear(); QVector<QString> toxfiles = getFilesByExt("tox"), inifiles = getFilesByExt("ini"); for (QString toxfile : toxfiles) { if (!inifiles.contains(toxfile)) { Settings::getInstance().createPersonal(toxfile); } profiles.append(toxfile); } }