Commit aac3db7a authored by Laurent Montel's avatar Laurent Montel 😁

Avoid to make loop twice. Return -1 if we don't find it

Reviewers: hein, davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8475
parent a4205b4e
......@@ -254,11 +254,7 @@ int Positioner::indexForUrl(const QUrl &url) const
}
}
if (m_sourceToProxy.contains(sourceIndex)) {
return m_sourceToProxy.value(sourceIndex);
}
return -1;
return m_sourceToProxy.value(sourceIndex, -1);
}
void Positioner::setRangeSelected(int anchor, int to)
......
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