| 496 | } |
| 497 | |
| 498 | void UILocker::updateLabel() |
| 499 | { |
| 500 | if (!m_ui) { |
| 501 | // this can happen if the lock overlay was destroyed while a cross-thread |
| 502 | // call for updateLabel() was in flight |
| 503 | return; |
| 504 | } |
| 505 | |
| 506 | QStringList labels; |
| 507 | |
| 508 | for (auto itor = m_sessions.rbegin(); itor != m_sessions.rend(); ++itor) { |
| 509 | if (auto ss = itor->lock()) { |
| 510 | labels.push_back(QString("%1 (%2)").arg(ss->name()).arg(ss->pid())); |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | m_ui->setInfo(labels); |
| 515 | } |
| 516 | |
| 517 | UILocker::Results UILocker::result() const |
| 518 | { |