Commit b18d7c9d authored by Tomaz  Canabrava's avatar Tomaz Canabrava
Browse files

Use the correct variable on the inner loop

~Someone~ should fix the Qt model view framework to work with
range based for.
parent d2d2157f
......@@ -120,7 +120,7 @@ bool SSHManagerModel::hasHost(const QString &host) const
// runs in O(N), should be ok for the amount of data peophe have.
for (int i = 0, end = invisibleRootItem()->rowCount(); i < end; i++) {
QStandardItem *iChild = invisibleRootItem()->child(i);
for (int e = 0, end = iChild->rowCount(); i < end; e++) {
for (int e = 0, end = iChild->rowCount(); e < end; e++) {
QStandardItem *eChild = iChild->child(e);
const auto data = eChild->data(SSHManagerModel::Roles::SSHRole).value<SSHConfigurationData>();
if (data.host == host) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment