diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-05-12 09:40:33 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2015-05-12 09:40:33 +0200 |
commit | e1e4adbbaf20d570daecf84f40d194a43619b3ef (patch) | |
tree | fa3aa3f2b98da9d01f4c057444114362d8b6e84a /usersdialog.cpp | |
parent | 5983c147a9ff6beafc484d54e80f6f0cd5b4b6c9 (diff) | |
parent | 4c8b9cf0ada9f93299e898e325b2069304089ac8 (diff) |
Merge pull request #46 from rdoeffinger/c++11
Enable C++11 and use it to simplify loops.
Diffstat (limited to 'usersdialog.cpp')
-rw-r--r-- | usersdialog.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usersdialog.cpp b/usersdialog.cpp index 64e69d1a..189fd1b8 100644 --- a/usersdialog.cpp +++ b/usersdialog.cpp @@ -40,8 +40,7 @@ void UsersDialog::populateList(const QString &filter) nameFilter.setCaseSensitivity(Qt::CaseInsensitive); ui->listWidget->clear(); if (userList) { - for (QList<UserInfo>::iterator it = userList->begin(); it != userList->end(); ++it) { - UserInfo &user(*it); + for (UserInfo &user : *userList) { if (filter.isEmpty() || nameFilter.exactMatch(user.name)) { QListWidgetItem *item = new QListWidgetItem(user.name + "\n" + user.key_id, ui->listWidget); item->setCheckState(user.enabled ? Qt::Checked : Qt::Unchecked); |