summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2015-07-09 01:33:35 +0200
committerAnne Jan Brouwer <brouwer@annejan.com>2015-07-09 01:33:35 +0200
commit4054ee24a37e58ecfb18fcf4c307b987bf138c13 (patch)
tree4b8557f7ea9d6f478ea40c5511fb9a83874af0d1
parent268ec9d3d93f5b5d4591c47f882e285e7eaec4de (diff)
Revert "Enable C++11 and use it to simplify loops."
-rw-r--r--mainwindow.cpp4
-rw-r--r--qtpass.pro2
-rw-r--r--usersdialog.cpp3
3 files changed, 4 insertions, 5 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index be1bef3c..0eb1e1df 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -1038,8 +1038,8 @@ void MainWindow::on_usersButton_clicked()
selected_users = listKeys(recipients);
}
foreach (const UserInfo &sel, selected_users) {
- for (UserInfo &user : users) {
- if (sel.key_id == user.key_id) user.enabled = true;
+ for (QList<UserInfo>::iterator it = users.begin(); it != users.end(); ++it) {
+ if (sel.key_id == it->key_id) it->enabled = true;
}
}
if (count > selected_users.size())
diff --git a/qtpass.pro b/qtpass.pro
index 8547a7a5..f9383a0f 100644
--- a/qtpass.pro
+++ b/qtpass.pro
@@ -11,8 +11,6 @@ QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
-CONFIG += c++11
-
macx {
TARGET = QtPass
} else {
diff --git a/usersdialog.cpp b/usersdialog.cpp
index 36129315..0853a675 100644
--- a/usersdialog.cpp
+++ b/usersdialog.cpp
@@ -41,7 +41,8 @@ void UsersDialog::populateList(const QString &filter)
nameFilter.setCaseSensitivity(Qt::CaseInsensitive);
ui->listWidget->clear();
if (userList) {
- for (UserInfo &user : *userList) {
+ for (QList<UserInfo>::iterator it = userList->begin(); it != userList->end(); ++it) {
+ UserInfo &user(*it);
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);