Пример #1
0
void Core::setUsername(const QString& username)
{
    CString cUsername(username);

    if (tox_setname(tox, cUsername.data(), cUsername.size()) == -1) {
        emit failedToSetUsername(username);
    } else {
        emit usernameSet(username);
    }
}
Пример #2
0
void Core::setUsername(const QString& username)
{
    CString cUsername(username);

    if (tox_set_name(tox, cUsername.data(), cUsername.size()) == -1) {
        emit failedToSetUsername(username);
    } else {
        saveConfiguration();
        emit usernameSet(username);
    }
}
Пример #3
0
void Core::setUsername(const QString& username)
{
    CString cUsername(username);

    if (tox_self_set_name(tox, cUsername.data(), cUsername.size(), nullptr) == false)
    {
        emit failedToSetUsername(username);
    }
    else
    {
        emit usernameSet(username);
        if (ready)
            profile.saveToxSave();
    }
}
Пример #4
0
void Core::setUsername(const QString& username)
{
    if (username == getUsername())
        return;

    CString cUsername(username);

    if (!tox_self_set_name(tox, cUsername.data(), cUsername.size(), nullptr))
    {
        emit failedToSetUsername(username);
        return;
    }

    emit usernameSet(username);
    if (ready)
        profile.saveToxSave();
}