Beispiel #1
0
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);
    }
}
Beispiel #2
0
/**
 * @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);
    }
}