* @brief Builds display text for a user. * @param user User to format * @return Formatted user text */
| 296 | * @return Formatted user text |
| 297 | */ |
| 298 | QString UsersDialog::buildUserText(const UserInfo &user) const { |
| 299 | QString text = user.name + "\n" + user.key_id; |
| 300 | if (user.created.toSecsSinceEpoch() > 0) { |
| 301 | text += " " + tr("created") + " " + |
| 302 | QLocale::system().toString(user.created, QLocale::ShortFormat); |
| 303 | } |
| 304 | if (user.expiry.toSecsSinceEpoch() > 0) { |
| 305 | text += " " + tr("expires") + " " + |
| 306 | QLocale::system().toString(user.expiry, QLocale::ShortFormat); |
| 307 | } |
| 308 | return text; |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * @brief Applies visual styling to a user list item based on key status. |
nothing calls this directly
no outgoing calls
no test coverage detected