示例#1
0
/**
 * @param info new session info
 */
void SessionState::update(const Session& info)
{
    Session old = info_;
    info_ = info;
    // Locking warrants its own signal
    if(old.lock() != info.lock())
        emit sessionLocked(info.lock());
    emit boardChanged();
}
示例#2
0
LoginManager::LoginManager(SessionManager *sm, QObject *parent)
    : QObject(parent)
{
    // Create backend
#ifdef ENABLE_SYSTEMD
    m_backend = LogindBackend::create(sm);
    if (!m_backend)
#endif
        m_backend = FakeBackend::create();
    qCDebug(LOGINMANAGER) << "Using" << m_backend->name() << "login manager backend";

    // Relay backend signals
    connect(m_backend, SIGNAL(logOutRequested()),
            this, SIGNAL(logOutRequested()));
    connect(m_backend, SIGNAL(sessionLocked()),
            this, SIGNAL(sessionLocked()));
    connect(m_backend, SIGNAL(sessionUnlocked()),
            this, SIGNAL(sessionUnlocked()));
}