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:
parent
24cbe48656
commit
0aa288bfae
1 changed files with 2 additions and 4 deletions
6
rules.h
6
rules.h
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue