Changeset View
Changeset View
Standalone View
Standalone View
rules.h
Show First 20 Lines • Show All 368 Lines • ▼ Show 20 Line(s) | |||||
369 | inline | 369 | inline | ||
370 | WindowRules::WindowRules() | 370 | WindowRules::WindowRules() | ||
371 | { | 371 | { | ||
372 | } | 372 | } | ||
373 | 373 | | |||
374 | inline | 374 | inline | ||
375 | bool WindowRules::contains(const Rules* rule) const | 375 | bool WindowRules::contains(const Rules* rule) const | ||
376 | { | 376 | { | ||
377 | return qFind(rules.begin(), rules.end(), rule) != rules.end(); | 377 | return rules.contains(const_cast<Rules *>(rule)); | ||
378 | } | 378 | } | ||
379 | 379 | | |||
380 | inline | 380 | inline | ||
381 | void WindowRules::remove(Rules* rule) | 381 | void WindowRules::remove(Rules* rule) | ||
382 | { | 382 | { | ||
383 | QVector< Rules* >::Iterator pos = qFind(rules.begin(), rules.end(), rule); | 383 | rules.removeOne(rule); | ||
384 | if (pos != rules.end()) | | |||
385 | rules.erase(pos); | | |||
386 | } | 384 | } | ||
387 | 385 | | |||
388 | #endif | 386 | #endif | ||
389 | 387 | | |||
390 | QDebug& operator<<(QDebug& stream, const Rules*); | 388 | QDebug& operator<<(QDebug& stream, const Rules*); | ||
391 | 389 | | |||
392 | } // namespace | 390 | } // namespace | ||
393 | 391 | | |||
394 | Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::Rules::Types) | 392 | Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::Rules::Types) | ||
395 | 393 | | |||
396 | #endif | 394 | #endif |