summaryrefslogtreecommitdiffstats
path: root/qmake/library/proitems.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/library/proitems.cpp')
-rw-r--r--qmake/library/proitems.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/qmake/library/proitems.cpp b/qmake/library/proitems.cpp
index 1a7a4f3dea..e780259417 100644
--- a/qmake/library/proitems.cpp
+++ b/qmake/library/proitems.cpp
@@ -386,6 +386,20 @@ void ProStringList::removeAll(const char *str)
remove(i);
}
+void ProStringList::removeEach(const ProStringList &value)
+{
+ foreach (const ProString &str, value)
+ if (!str.isEmpty())
+ removeAll(str);
+}
+
+void ProStringList::removeEmpty()
+{
+ for (int i = size(); --i >= 0;)
+ if (at(i).isEmpty())
+ remove(i);
+}
+
void ProStringList::removeDuplicates()
{
int n = size();
@@ -405,6 +419,13 @@ void ProStringList::removeDuplicates()
erase(begin() + j, end());
}
+void ProStringList::insertUnique(const ProStringList &value)
+{
+ foreach (const ProString &str, value)
+ if (!str.isEmpty() && !contains(str))
+ append(str);
+}
+
ProStringList::ProStringList(const QStringList &list)
{
reserve(list.size());