Port away from deprecated qFind

Test Plan: Compiles, the number of compiler warnings has been reduced from 990 to 202.

Reviewers: #kwin, apol, davidedmundson

Reviewed By: #kwin, apol, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D21217
This commit is contained in:
Vlad Zagorodniy 2019-05-14 18:22:11 +03:00
parent 24cbe48656
commit 0aa288bfae

View file

@ -374,15 +374,13 @@ WindowRules::WindowRules()
inline
bool WindowRules::contains(const Rules* rule) const
{
return qFind(rules.begin(), rules.end(), rule) != rules.end();
return rules.contains(const_cast<Rules *>(rule));
}
inline
void WindowRules::remove(Rules* rule)
{
QVector< Rules* >::Iterator pos = qFind(rules.begin(), rules.end(), rule);
if (pos != rules.end())
rules.erase(pos);
rules.removeOne(rule);
}
#endif