Allow the user to restrict rc creation to certain .pro

Task-number: QTCREATORBUG-10953
Change-Id: Iff1a31c007ac777bfa390d48237480ef56ffc0e4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Daniel Teske
2014-06-12 16:24:52 +02:00
parent d15e0aa9e7
commit c78258cd57
31 changed files with 127 additions and 53 deletions

View File

@@ -37,6 +37,25 @@
namespace Utils
{
template<typename T, typename F>
bool anyOf(const T &container, F predicate)
{
return std::any_of(container.begin(), container.end(), predicate);
}
template<typename T, typename F>
bool allOf(const T &container, F predicate)
{
return std::all_of(container.begin(), container.end(), predicate);
}
template<typename T, typename F>
void erase(QList<T> &container, F predicate)
{
container.erase(std::remove_if(container.begin(), container.end(), predicate),
container.end());
}
// Note: add overloads for other container types as needed
template<typename T, typename F>
Q_REQUIRED_RESULT