MCPcopy Create free account
hub / github.com/IJHack/QtPass / buildUserText

Method buildUserText

src/usersdialog.cpp:298–309  ·  view source on GitHub ↗

* @brief Builds display text for a user. * @param user User to format * @return Formatted user text */

Source from the content-addressed store, hash-verified

296 * @return Formatted user text
297 */
298QString 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected