diff options
Diffstat (limited to 'src/usersdialog.cpp')
-rw-r--r-- | src/usersdialog.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/usersdialog.cpp b/src/usersdialog.cpp index b89da883..db115fd6 100644 --- a/src/usersdialog.cpp +++ b/src/usersdialog.cpp @@ -71,9 +71,7 @@ UsersDialog::UsersDialog(QString dir, QWidget *parent) connect(ui->listWidget, &QListWidget::itemChanged, this, &UsersDialog::itemChange); -#if QT_VERSION >= 0x050200 ui->lineEdit->setClearButtonEnabled(true); -#endif } /** @@ -136,7 +134,9 @@ void UsersDialog::itemChange(QListWidgetItem *item) { * @param filter */ void UsersDialog::populateList(const QString &filter) { - QRegularExpression nameFilter(QRegularExpression::wildcardToRegularExpression("*" + filter + "*"), QRegularExpression::CaseInsensitiveOption); + QRegularExpression nameFilter( + QRegularExpression::wildcardToRegularExpression("*" + filter + "*"), + QRegularExpression::CaseInsensitiveOption); ui->listWidget->clear(); if (!m_userList.isEmpty()) { for (auto &user : m_userList) { @@ -149,12 +149,14 @@ void UsersDialog::populateList(const QString &filter) { continue; QString userText = user.name + "\n" + user.key_id; if (user.created.toSecsSinceEpoch() > 0) { - userText += " " + tr("created") + " " + - QLocale::system().toString(user.created, QLocale::ShortFormat); + userText += + " " + tr("created") + " " + + QLocale::system().toString(user.created, QLocale::ShortFormat); } if (user.expiry.toSecsSinceEpoch() > 0) - userText += " " + tr("expires") + " " + - QLocale::system().toString(user.expiry, QLocale::ShortFormat); + userText += + " " + tr("expires") + " " + + QLocale::system().toString(user.expiry, QLocale::ShortFormat); auto *item = new QListWidgetItem(userText, ui->listWidget); item->setCheckState(user.enabled ? Qt::Checked : Qt::Unchecked); item->setData(Qt::UserRole, QVariant::fromValue(&user)); |